diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-09-13 15:39:19 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-09-13 15:39:19 -0700 |
| commit | 716d9237cb757c15217b21964fde8e755aabe853 (patch) | |
| tree | 92760021e4d49af92db2d37701f4a303d32d69ac /src/Compilation.zig | |
| parent | fda6d44778f3faf53c66945a0db65be68113416f (diff) | |
| parent | 0a4cfb81bcca0ca514758049f8d7d99224537f93 (diff) | |
| download | zig-716d9237cb757c15217b21964fde8e755aabe853.tar.gz zig-716d9237cb757c15217b21964fde8e755aabe853.zip | |
Merge remote-tracking branch 'origin/llvm15'
Upgrade to LLVM 15
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 5a1abcb52b..18dab183a5 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -154,6 +154,8 @@ owned_link_dir: ?std.fs.Dir, /// Don't use this for anything other than stage1 compatibility. color: Color = .auto, +libcxx_abi_version: libcxx.AbiVersion = libcxx.AbiVersion.default, + /// This mutex guards all `Compilation` mutable state. mutex: std.Thread.Mutex = .{}, @@ -950,6 +952,7 @@ pub const InitOptions = struct { headerpad_max_install_names: bool = false, /// (Darwin) remove dylibs that are unreachable by the entry point or exported symbols dead_strip_dylibs: bool = false, + libcxx_abi_version: libcxx.AbiVersion = libcxx.AbiVersion.default, }; fn addPackageTableToCacheHash( @@ -1843,6 +1846,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { .test_evented_io = options.test_evented_io, .debug_compiler_runtime_libs = options.debug_compiler_runtime_libs, .debug_compile_errors = options.debug_compile_errors, + .libcxx_abi_version = options.libcxx_abi_version, }; break :comp comp; }; @@ -4026,6 +4030,13 @@ pub fn addCCArgs( if (comp.bin_file.options.single_threaded) { try argv.append("-D_LIBCPP_HAS_NO_THREADS"); } + + try argv.append(try std.fmt.allocPrint(arena, "-D_LIBCPP_ABI_VERSION={d}", .{ + @enumToInt(comp.libcxx_abi_version), + })); + try argv.append(try std.fmt.allocPrint(arena, "-D_LIBCPP_ABI_NAMESPACE=__{d}", .{ + @enumToInt(comp.libcxx_abi_version), + })); } if (comp.bin_file.options.link_libunwind) { |
