authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-02-18 09:32:31-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-02-18 09:32:31-07:00
log06df842e4d313e81444063803deff306602e0a17
treef9db27cf7b19a63a8baf16d3bf9ddafa5bf77009
parent09cee1d5e34dd4187242a693c2d7b5a9d1e689b1

unconditionally pass --no-default-config to clang

As of Clang 16.x, it will by default read extra flags from /etc/clang. I'm sure the person who implemented this means well, but they have a lot to learn about abstractions and where the appropriate boundaries between them are. The road to hell is paved with good intentions. Fortunately it can be disabled.

1 files changed, 7 insertions(+), 0 deletions(-)

src/Compilation.zig+7
......@@ -4242,6 +4242,13 @@ pub fn addCCArgs(
42424242) !void {
42434243 const target = comp.getTarget();
42444244
4245 // As of Clang 16.x, it will by default read extra flags from /etc/clang.
4246 // I'm sure the person who implemented this means well, but they have a lot
4247 // to learn about abstractions and where the appropriate boundaries between
4248 // them are. The road to hell is paved with good intentions. Fortunately it
4249 // can be disabled.
4250 try argv.append("--no-default-config");
4251
42454252 if (ext == .cpp) {
42464253 try argv.append("-nostdinc++");
42474254 }