| author | |
| committer | |
| log | 7401f06f99ac93aa479dcde2b6e17e2cdbf34a60 |
| tree | 1fd9b23d298fc98b2431099c65fae8e77b5afbfe |
| parent | f0feda820e678a7a8f7c2716b515145f4b9a5303 |
It remains 1 everywhere else.
Also remove some code that allowed setting the libc++ ABI version on the
Compilation since there are no current plans to actually expose this in the CLI.2 files changed, 3 insertions(+), 13 deletions(-)
src/Compilation.zig-4| ... | ... | @@ -259,8 +259,6 @@ crt_files: std.StringHashMapUnmanaged(CrtFile) = .empty, |
| 259 | 259 | /// Null means only show snippet on first error. |
| 260 | 260 | reference_trace: ?u32 = null, |
| 261 | 261 | |
| 262 | libcxx_abi_version: libcxx.AbiVersion = libcxx.AbiVersion.default, | |
| 263 | ||
| 264 | 262 | /// This mutex guards all `Compilation` mutable state. |
| 265 | 263 | /// Disabled in single-threaded mode because the thread pool spawns in the same thread. |
| 266 | 264 | mutex: if (builtin.single_threaded) struct { |
| ... | ... | @@ -1171,7 +1169,6 @@ pub const CreateOptions = struct { |
| 1171 | 1169 | force_load_objc: bool = false, |
| 1172 | 1170 | /// Whether local symbols should be discarded from the symbol table. |
| 1173 | 1171 | discard_local_symbols: bool = false, |
| 1174 | libcxx_abi_version: libcxx.AbiVersion = libcxx.AbiVersion.default, | |
| 1175 | 1172 | /// (Windows) PDB source path prefix to instruct the linker how to resolve relative |
| 1176 | 1173 | /// paths when consolidating CodeView streams into a single PDB file. |
| 1177 | 1174 | pdb_source_path: ?[]const u8 = null, |
| ... | ... | @@ -1555,7 +1552,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil |
| 1555 | 1552 | .debug_compiler_runtime_libs = options.debug_compiler_runtime_libs, |
| 1556 | 1553 | .debug_compile_errors = options.debug_compile_errors, |
| 1557 | 1554 | .incremental = options.incremental, |
| 1558 | .libcxx_abi_version = options.libcxx_abi_version, | |
| 1559 | 1555 | .root_name = root_name, |
| 1560 | 1556 | .sysroot = sysroot, |
| 1561 | 1557 | .windows_libs = windows_libs, |
src/libcxx.zig+3-9| ... | ... | @@ -8,13 +8,6 @@ const build_options = @import("build_options"); |
| 8 | 8 | const trace = @import("tracy.zig").trace; |
| 9 | 9 | const Module = @import("Package/Module.zig"); |
| 10 | 10 | |
| 11 | pub const AbiVersion = enum(u2) { | |
| 12 | @"1" = 1, | |
| 13 | @"2" = 2, | |
| 14 | ||
| 15 | pub const default: AbiVersion = .@"1"; | |
| 16 | }; | |
| 17 | ||
| 18 | 11 | const libcxxabi_files = [_][]const u8{ |
| 19 | 12 | "src/abort_message.cpp", |
| 20 | 13 | "src/cxa_aux_runtime.cpp", |
| ... | ... | @@ -535,11 +528,12 @@ pub fn addCxxArgs( |
| 535 | 528 | const target = comp.getTarget(); |
| 536 | 529 | const optimize_mode = comp.compilerRtOptMode(); |
| 537 | 530 | |
| 531 | const abi_version: u2 = if (target.os.tag == .emscripten) 2 else 1; | |
| 538 | 532 | try cflags.append(try std.fmt.allocPrint(arena, "-D_LIBCPP_ABI_VERSION={d}", .{ |
| 539 | @intFromEnum(comp.libcxx_abi_version), | |
| 533 | abi_version, | |
| 540 | 534 | })); |
| 541 | 535 | try cflags.append(try std.fmt.allocPrint(arena, "-D_LIBCPP_ABI_NAMESPACE=__{d}", .{ |
| 542 | @intFromEnum(comp.libcxx_abi_version), | |
| 536 | abi_version, | |
| 543 | 537 | })); |
| 544 | 538 | try cflags.append(try std.fmt.allocPrint(arena, "-D_LIBCPP_HAS_{s}THREADS", .{ |
| 545 | 539 | if (!comp.config.any_non_single_threaded) "NO_" else "", |