diff --git a/src/clang_options_data.zig b/src/clang_options_data.zig index 3c4c0849761a29d20eb111aca5684b75a9412676..85ff8097616b458318ee845053bf2707258900bd 100644 --- a/src/clang_options_data.zig +++ b/src/clang_options_data.zig @@ -1983,7 +1983,7 @@ flagpsl("MT"), .{ .name = "sysroot", .syntax = .separate, - .zig_equivalent = .other, + .zig_equivalent = .sysroot, .pd1 = false, .pd2 = true, .psl = false, @@ -5970,7 +5970,7 @@ jspd1("undefined"), .{ .name = "sysroot=", .syntax = .joined, - .zig_equivalent = .other, + .zig_equivalent = .sysroot, .pd1 = false, .pd2 = true, .psl = false, diff --git a/src/main.zig b/src/main.zig index 4747772b8a88ba5fed258653e56c5e2030aa088f..7756f48e26b8c7e9473473d85f92ed15eae21abd 100644 --- a/src/main.zig +++ b/src/main.zig @@ -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. @@ -4130,6 +4133,7 @@ pub const ClangArgIterator = struct { strip, exec_model, emit_llvm, + sysroot, }; const Args = struct { diff --git a/tools/update_clang_options.zig b/tools/update_clang_options.zig index 7360f96560067a0440036f2303538fcb497079e7..73b1bbd284cb3b32193f7e8e011b5cee2da00c8b 100644 --- a/tools/update_clang_options.zig +++ b/tools/update_clang_options.zig @@ -412,6 +412,10 @@ const known_options = [_]KnownOpt{ .name = "emit-llvm", .ident = "emit_llvm", }, + .{ + .name = "sysroot", + .ident = "sysroot", + }, }; const blacklisted_options = [_][]const u8{};