authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-06 19:50:53-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-04-06 19:50:53-07:00
logf253822415304fc069f68452f7f4abbded58a24e
tree2333e64c7d81b2948ec30b29c659f90b066e5c45
parentec212c82bef3cbf01517eece67a8599348c7ac86

stage2: do not set clang_passthrough_mode for `zig run`

Thanks to @g-w1 for discovering this bug. closes #8450

1 files changed, 6 insertions(+), 1 deletions(-)

src/main.zig+6-1
......@@ -1815,6 +1815,11 @@ fn buildOutputType(
18151815 @import("codegen/llvm/bindings.zig").ParseCommandLineOptions(argv.len, &argv);
18161816 }
18171817
1818 const clang_passthrough_mode = switch (arg_mode) {
1819 .cc, .cpp, .translate_c => true,
1820 else => false,
1821 };
1822
18181823 gimmeMoreOfThoseSweetSweetFileDescriptors();
18191824
18201825 const comp = Compilation.create(gpa, .{
......@@ -1886,7 +1891,7 @@ fn buildOutputType(
18861891 .function_sections = function_sections,
18871892 .self_exe_path = self_exe_path,
18881893 .thread_pool = &thread_pool,
1889 .clang_passthrough_mode = arg_mode != .build,
1894 .clang_passthrough_mode = clang_passthrough_mode,
18901895 .clang_preprocessor_mode = clang_preprocessor_mode,
18911896 .version = optional_version,
18921897 .libc_installation = if (libc_installation) |*lci| lci else null,