aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-06-21 22:45:43 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2021-06-25 19:13:43 +0200
commit260c5aed86d662d2e2bd03c06d123bef9455053d (patch)
tree9bbf9bcbce9447ecacb5e92b969d0565fb4cce53 /src/link.zig
parent411f9c60b1cb30aec8706ffac75992ac8cc59cba (diff)
downloadzig-260c5aed86d662d2e2bd03c06d123bef9455053d.tar.gz
zig-260c5aed86d662d2e2bd03c06d123bef9455053d.zip
stage2: add --sysroot link option
This feature is necessary for cross-compiling code that dynamically links system libraries, at least with the current feature set of lld.
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/link.zig b/src/link.zig
index bae468d075..c26feb10fd 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -38,6 +38,8 @@ pub const Options = struct {
/// Not every Compilation compiles .zig code! For example you could do `zig build-exe foo.o`.
module: ?*Module,
dynamic_linker: ?[]const u8,
+ /// The root path for the dynamic linker and system libraries (as well as frameworks on Darwin)
+ sysroot: ?[]const u8,
/// Used for calculating how much space to reserve for symbols in case the binary file
/// does not already have a symbol table.
symbol_count_hint: u64 = 32,
@@ -104,8 +106,6 @@ pub const Options = struct {
llvm_cpu_features: ?[*:0]const u8,
/// Extra args passed directly to LLD. Ignored when not linking with LLD.
extra_lld_args: []const []const u8,
- /// Darwin-only. Set the root path to the system libraries and frameworks.
- syslibroot: ?[]const u8,
objects: []const []const u8,
framework_dirs: []const []const u8,