diff options
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index a071ca9a60..115f3748b6 100644 --- a/src/main.zig +++ b/src/main.zig @@ -433,6 +433,7 @@ const usage_build_generic = \\ -framework [name] (Darwin) link against framework \\ -F[dir] (Darwin) add search path for frameworks \\ -install_name=[value] (Darwin) add dylib's install name + \\ --entitlements [path] (Darwin) add path to entitlements file for embedding in code signature \\ --import-memory (WebAssembly) import memory from the environment \\ --import-table (WebAssembly) import function table from the host environment \\ --export-table (WebAssembly) export function table to the host environment @@ -680,6 +681,7 @@ fn buildOutputType( var native_darwin_sdk: ?std.zig.system.darwin.DarwinSDK = null; var install_name: ?[]const u8 = null; var hash_style: link.HashStyle = .both; + var entitlements: ?[]const u8 = null; // e.g. -m3dnow or -mno-outline-atomics. They correspond to std.Target llvm cpu feature names. // This array is populated by zig cc frontend and then has to be converted to zig-style @@ -1036,6 +1038,10 @@ fn buildOutputType( } else { enable_link_snapshots = true; } + } else if (mem.eql(u8, arg, "--entitlements")) { + entitlements = args_iter.next() orelse { + fatal("expected parameter after {s}", .{arg}); + }; } else if (mem.eql(u8, arg, "-fcompiler-rt")) { want_compiler_rt = true; } else if (mem.eql(u8, arg, "-fno-compiler-rt")) { @@ -2729,6 +2735,7 @@ fn buildOutputType( .enable_link_snapshots = enable_link_snapshots, .native_darwin_sdk = native_darwin_sdk, .install_name = install_name, + .entitlements = entitlements, }) catch |err| switch (err) { error.LibCUnavailable => { const target = target_info.target; |
