mirror of
https://github.com/ziglang/zig.git
synced 2025-12-14 10:13:07 +00:00
zig cc: integration with sysroot arg (#10568)
Prior to this change, even if the use specified the sysroot on the compiler line like so ``` zig cc --sysroot=/path/to/sdk ``` it would only be used as a prefix to include paths and not as a prefix for `zig ld` linker.
This commit is contained in:
parent
9b97edb012
commit
3542dcad33
@ -1983,7 +1983,7 @@ flagpsl("MT"),
|
|||||||
.{
|
.{
|
||||||
.name = "sysroot",
|
.name = "sysroot",
|
||||||
.syntax = .separate,
|
.syntax = .separate,
|
||||||
.zig_equivalent = .other,
|
.zig_equivalent = .sysroot,
|
||||||
.pd1 = false,
|
.pd1 = false,
|
||||||
.pd2 = true,
|
.pd2 = true,
|
||||||
.psl = false,
|
.psl = false,
|
||||||
@ -5970,7 +5970,7 @@ jspd1("undefined"),
|
|||||||
.{
|
.{
|
||||||
.name = "sysroot=",
|
.name = "sysroot=",
|
||||||
.syntax = .joined,
|
.syntax = .joined,
|
||||||
.zig_equivalent = .other,
|
.zig_equivalent = .sysroot,
|
||||||
.pd1 = false,
|
.pd1 = false,
|
||||||
.pd2 = true,
|
.pd2 = true,
|
||||||
.psl = false,
|
.psl = false,
|
||||||
|
|||||||
@ -1468,6 +1468,9 @@ fn buildOutputType(
|
|||||||
fatal("expected [command|reactor] for -mexec-mode=[value], found '{s}'", .{it.only_arg});
|
fatal("expected [command|reactor] for -mexec-mode=[value], found '{s}'", .{it.only_arg});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
.sysroot => {
|
||||||
|
sysroot = it.only_arg;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Parse linker args.
|
// Parse linker args.
|
||||||
@ -4115,6 +4118,7 @@ pub const ClangArgIterator = struct {
|
|||||||
strip,
|
strip,
|
||||||
exec_model,
|
exec_model,
|
||||||
emit_llvm,
|
emit_llvm,
|
||||||
|
sysroot,
|
||||||
};
|
};
|
||||||
|
|
||||||
const Args = struct {
|
const Args = struct {
|
||||||
|
|||||||
@ -412,6 +412,10 @@ const known_options = [_]KnownOpt{
|
|||||||
.name = "emit-llvm",
|
.name = "emit-llvm",
|
||||||
.ident = "emit_llvm",
|
.ident = "emit_llvm",
|
||||||
},
|
},
|
||||||
|
.{
|
||||||
|
.name = "sysroot",
|
||||||
|
.ident = "sysroot",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const blacklisted_options = [_][]const u8{};
|
const blacklisted_options = [_][]const u8{};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user