diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-27 19:48:10 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-27 19:53:38 +0200 |
| commit | 0dd28920daa5127ffe5a3691343fa519f7547cfd (patch) | |
| tree | 949f6078a42f12415508667377b40ea0e84eac0b /src/link.zig | |
| parent | efc5c97bff87d4c28ae9642fe69d9bc2c7e9eeb7 (diff) | |
| download | zig-0dd28920daa5127ffe5a3691343fa519f7547cfd.tar.gz zig-0dd28920daa5127ffe5a3691343fa519f7547cfd.zip | |
macho: implement and handle `-needed-*` and `-needed_*` family of flags
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`.
Diffstat (limited to 'src/link.zig')
| -rw-r--r-- | src/link.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/link.zig b/src/link.zig index 18e10dc74c..c3d1d216c0 100644 --- a/src/link.zig +++ b/src/link.zig @@ -162,7 +162,7 @@ pub const Options = struct { objects: []Compilation.LinkObject, framework_dirs: []const []const u8, - frameworks: []const []const u8, + frameworks: std.StringArrayHashMapUnmanaged(SystemLib), system_libs: std.StringArrayHashMapUnmanaged(SystemLib), wasi_emulated_libs: []const wasi_libc.CRTFile, lib_dirs: []const []const u8, |
