cli: set sysroot when --sysroot option was passed

Fixes regression introduced in 0b47e69b7c
This commit is contained in:
Jakub Konka 2022-11-01 11:56:25 +01:00
parent 0d192ee9ef
commit ebf9ffd342

View File

@ -1034,8 +1034,9 @@ fn buildOutputType(
} else if (mem.eql(u8, arg, "--dynamic-linker")) { } else if (mem.eql(u8, arg, "--dynamic-linker")) {
target_dynamic_linker = args_iter.nextOrFatal(); target_dynamic_linker = args_iter.nextOrFatal();
} else if (mem.eql(u8, arg, "--sysroot")) { } else if (mem.eql(u8, arg, "--sysroot")) {
sysroot = args_iter.nextOrFatal();
try clang_argv.append("-isysroot"); try clang_argv.append("-isysroot");
try clang_argv.append(args_iter.nextOrFatal()); try clang_argv.append(sysroot.?);
} else if (mem.eql(u8, arg, "--libc")) { } else if (mem.eql(u8, arg, "--libc")) {
libc_paths_file = args_iter.nextOrFatal(); libc_paths_file = args_iter.nextOrFatal();
} else if (mem.eql(u8, arg, "--test-filter")) { } else if (mem.eql(u8, arg, "--test-filter")) {