Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zig cc: integration with sysroot arg #10568

Merged
merged 1 commit into from Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/clang_options_data.zig
Expand Up @@ -1983,7 +1983,7 @@ flagpsl("MT"),
.{
.name = "sysroot",
.syntax = .separate,
.zig_equivalent = .other,
.zig_equivalent = .sysroot,
.pd1 = false,
.pd2 = true,
.psl = false,
Expand Down Expand Up @@ -5970,7 +5970,7 @@ jspd1("undefined"),
.{
.name = "sysroot=",
.syntax = .joined,
.zig_equivalent = .other,
.zig_equivalent = .sysroot,
.pd1 = false,
.pd2 = true,
.psl = false,
Expand Down
4 changes: 4 additions & 0 deletions src/main.zig
Expand Up @@ -1476,6 +1476,9 @@ fn buildOutputType(
fatal("expected [command|reactor] for -mexec-mode=[value], found '{s}'", .{it.only_arg});
};
},
.sysroot => {
sysroot = it.only_arg;
},
}
}
// Parse linker args.
Expand Down Expand Up @@ -4130,6 +4133,7 @@ pub const ClangArgIterator = struct {
strip,
exec_model,
emit_llvm,
sysroot,
};

const Args = struct {
Expand Down
4 changes: 4 additions & 0 deletions tools/update_clang_options.zig
Expand Up @@ -412,6 +412,10 @@ const known_options = [_]KnownOpt{
.name = "emit-llvm",
.ident = "emit_llvm",
},
.{
.name = "sysroot",
.ident = "sysroot",
},
};

const blacklisted_options = [_][]const u8{};
Expand Down