diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-18 09:32:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-02-18 09:32:31 -0700 |
| commit | 06df842e4d313e81444063803deff306602e0a17 (patch) | |
| tree | f9db27cf7b19a63a8baf16d3bf9ddafa5bf77009 /src | |
| parent | 09cee1d5e34dd4187242a693c2d7b5a9d1e689b1 (diff) | |
| download | zig-06df842e4d313e81444063803deff306602e0a17.tar.gz zig-06df842e4d313e81444063803deff306602e0a17.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index e09b8f18ab..2aae38c260 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -4242,6 +4242,13 @@ pub fn addCCArgs( ) !void { const target = comp.getTarget(); + // 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. + try argv.append("--no-default-config"); + if (ext == .cpp) { try argv.append("-nostdinc++"); } |
