diff options
| author | Motiejus Jakštys <motiejus@uber.com> | 2023-05-23 10:50:15 +0300 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2023-05-30 08:18:10 +0200 |
| commit | ac9f72d87e8eeb4a9d0dead80b61420485279ddd (patch) | |
| tree | 63046c79edfb445d0eef7092d695ab1646655061 /src/codegen/spirv.zig | |
| parent | 706bdf6512aec9f5d003cc2ec64ba16ac0a202dc (diff) | |
| download | zig-ac9f72d87e8eeb4a9d0dead80b61420485279ddd.tar.gz zig-ac9f72d87e8eeb4a9d0dead80b61420485279ddd.zip | |
zig ld: handle `--library :path/to/lib.so`
`-l :path/to/lib.so` behavior on gcc/clang is:
- the path is recorded as-is: no paths, exact filename (`libX.so.Y`).
- no rpaths.
The previous version removed the `:` and pretended it's a positional
argument to the linker. That works in almost all cases, except in how
rules_go[1] does things (the Bazel wrapper for Go).
Test case in #15743, output:
gcc rpath:
0x0000000000000001 (NEEDED) Shared library: [libversioned.so.2]
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/x]
gcc plain:
0x0000000000000001 (NEEDED) Shared library: [libversioned.so.2]
zig cc rpath:
0x0000000000000001 (NEEDED) Shared library: [libversioned.so.2]
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/x]
zig cc plain:
0x0000000000000001 (NEEDED) Shared library: [libversioned.so.2]
Fixes #15743
[1]: https://github.com/bazelbuild/rules_go
Diffstat (limited to 'src/codegen/spirv.zig')
0 files changed, 0 insertions, 0 deletions
