| author | |
| committer | |
| log | 24215df8c56ba64e624487f914513212e3e747e9 |
| tree | 1c8db80cdda1e44bd89074e03d9c260ffd3e240a |
| parent | 85eb05e9a8ed0998501535755cdf726552998e54 |
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: D908432 files changed, 2 insertions(+), 0 deletions(-)
src/Compilation.zig+1| ... | @@ -2264,6 +2264,7 @@ pub fn addCCArgs( | ... | @@ -2264,6 +2264,7 @@ pub fn addCCArgs( |
| 2264 | } | 2264 | } |
| 2265 | try argv.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); | 2265 | try argv.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 2266 | try argv.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); | 2266 | try argv.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 2267 | try argv.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); | ||
| 2267 | } | 2268 | } |
| 2268 | 2269 | ||
| 2269 | const llvm_triple = try @import("codegen/llvm.zig").targetTriple(arena, target); | 2270 | const llvm_triple = try @import("codegen/llvm.zig").targetTriple(arena, target); |
src/libcxx.zig+1| ... | @@ -128,6 +128,7 @@ pub fn buildLibCXX(comp: *Compilation) !void { | ... | @@ -128,6 +128,7 @@ pub fn buildLibCXX(comp: *Compilation) !void { |
| 128 | try cflags.append("-DLIBCXX_BUILDING_LIBCXXABI"); | 128 | try cflags.append("-DLIBCXX_BUILDING_LIBCXXABI"); |
| 129 | try cflags.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); | 129 | try cflags.append("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 130 | try cflags.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); | 130 | try cflags.append("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS"); |
| 131 | try cflags.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); | ||
| 131 | 132 | ||
| 132 | if (target.abi.isMusl()) { | 133 | if (target.abi.isMusl()) { |
| 133 | try cflags.append("-D_LIBCPP_HAS_MUSL_LIBC"); | 134 | try cflags.append("-D_LIBCPP_HAS_MUSL_LIBC"); |