diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2021-03-01 19:52:51 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-01 11:02:20 -0800 |
| commit | 24215df8c56ba64e624487f914513212e3e747e9 (patch) | |
| tree | 1c8db80cdda1e44bd89074e03d9c260ffd3e240a /src/Compilation.zig | |
| parent | 85eb05e9a8ed0998501535755cdf726552998e54 (diff) | |
| download | zig-24215df8c56ba64e624487f914513212e3e747e9.tar.gz zig-24215df8c56ba64e624487f914513212e3e747e9.zip | |
zig c++: fix compilation that includes any c++ std library file
LLVM 12 included a patch that changed the way availability annotations
are specified. We now have to define the _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
flag to make sure that we tell the c++ headers that we don't use
visibility annotations.
Related LLVM patch: D90843
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 39e10becec..d4e3981b85 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2264,6 +2264,7 @@ pub fn addCCArgs( } try argv.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); try argv.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); + try argv.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); } const llvm_triple = try @import("codegen/llvm.zig").targetTriple(arena, target); |
