aboutsummaryrefslogtreecommitdiff
path: root/test/link.zig
AgeCommit message (Collapse)Author
2022-09-08wasm: temporarily save curr file pointer before pwriting on WinJakub Konka
This is a temporary workaround to an unclear platform-dependence behavior we have in libstd for `std.fs.File` abstraction. See https://github.com/ziglang/zig/issues/12783 for more information.
2022-08-30test/link: add test for extern resolutionLuuk de Gram
Adds a linker tests to verify extern/undefined symbols representing non-functions are being resolved correctly.
2022-08-20test/link: add wasm linker-test for archivesLuuk de Gram
Adds a test case that will pull-in compiler-rt symbols, and therefore link with the compiler-rt archive file.
2022-08-17link-test: refactor and reorgJakub Konka
Move common tests by target file format (Wasm, MachO) into helper functions in `link.zig`, and sort alphabetically within for easier tracking versus file organization on disk.
2022-08-17link-test: move tls test to macho/tlsJakub Konka
This test was always really testing correct behavior of our in-house MachO linker to begin with.
2022-08-11disable failing link tests on windowsAndrew Kelley
See tracking issue #12421
2022-07-23enable link-test on linux CILuuk de Gram
2022-07-22link-tests: add checkNotPresent and add -dead_strip smoke testJakub Konka
`checkNotPresent` is the inverse of `checkNext` - if the phrase is found in the output, then it fails the test.
2022-07-12wasm-linker: Implement linker tests (#12006)Luuk de Gram
* test/link: initial wasm support This adds basic parsing and dumping of wasm section so they can be tested using the new linker-test infrastructure. * test/link: all wasm sections parsing and dumping We now parse and dump all sections for the wasm binary format. Currently, this only dumps the name of a custom section. Later this should also dump symbol table, name, linking metadata and relocations. All of those live within the custom sections. * Add wasm linker test This also fixes a parser mistake in reading the flags. * test/link: implement linker tests wasm & fixes Adds several test cases to test the wasm self-hosted linker. This also introduces fixes that were caught during the implementation of those tests. * test-runner: obey omit_stage2 for standalone When a standalone test requires stage2, but stage2 is omit from the compiler, such test case will not be included as part of the test suite that is being ran. This is to support CI's where we omit stage2 to lower the memory usage.
2022-06-28link-tests: test -weak-lx and -weak_framework xJakub Konka
2022-06-27macho: implement and handle `-needed-*` and `-needed_*` family of flagsJakub Konka
MachO linker now handles `-needed-l<name>`, `-needed_library=<name>` and `-needed_framework=<name>`. While on macOS `-l` is equivalent to `-needed-l`, and `-framework` to `-needed_framework`, it can be used to the same effect as on Linux if combined with `-dead_strip_dylibs`. This commit also adds handling for `-needed_library` which is macOS specific flag only (in addition to `-needed-l`). Finally, in order to leverage new linker testing harness, this commit added ability to specify lowering to those flags via `build.zig`: `linkSystemLibraryNeeded` (and related), and `linkFrameworkNeeded`.
2022-06-27macho: implement -dead_strip_dylibs linker flagJakub Konka
2022-06-25macho: implement -headerpad_max_install_namesJakub Konka
2022-06-25link-tests: put macho search strategy tests into one test caseJakub Konka
2022-06-24link-tests: test -search_paths_first and -search_dylibs_first macho flagsJakub Konka
2022-06-22link-tests: rename CheckMachOStep to CheckObjectStep and accept obj formatJakub Konka
2022-06-21link-tests: move macho tests to subfolderJakub Konka
Handle `-e` option in MachO linker allowing the user to set a custom entrypoint address.
2022-06-20link-tests: test pagezero_size option for machoJakub Konka
2022-06-20link-tests: CheckFileStep to do grep test on the binaryJakub Konka
2022-06-20test: introduce link(er) tests - builds on standalone testsJakub Konka