| author | |
| committer | |
| log | 566e4ab6b19fb8075dd591968eeb4cad53679cfd |
| tree | 630d39611175a8d39375483236a94dd26ebbc15a |
| parent | 7b45bd3c09e04edbd5bdd8a443e0ae3757b1a709 |
| signature |
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 { |
| ... | ... | @@ -1172,7 +1170,6 @@ pub const CreateOptions = struct { |
| 1172 | 1170 | force_load_objc: bool = false, |
| 1173 | 1171 | /// Whether local symbols should be discarded from the symbol table. |
| 1174 | 1172 | discard_local_symbols: bool = false, |
| 1175 | libcxx_abi_version: libcxx.AbiVersion = libcxx.AbiVersion.default, | |
| 1176 | 1173 | /// (Windows) PDB source path prefix to instruct the linker how to resolve relative |
| 1177 | 1174 | /// paths when consolidating CodeView streams into a single PDB file. |
| 1178 | 1175 | pdb_source_path: ?[]const u8 = null, |
| ... | ... | @@ -1545,7 +1542,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil |
| 1545 | 1542 | .debug_compiler_runtime_libs = options.debug_compiler_runtime_libs, |
| 1546 | 1543 | .debug_compile_errors = options.debug_compile_errors, |
| 1547 | 1544 | .incremental = options.incremental, |
| 1548 | .libcxx_abi_version = options.libcxx_abi_version, | |
| 1549 | 1545 | .root_name = root_name, |
| 1550 | 1546 | .sysroot = sysroot, |
| 1551 | 1547 | .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", |
| ... | ... | @@ -145,11 +138,12 @@ pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError! |
| 145 | 138 | const cxxabi_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxxabi", "include" }); |
| 146 | 139 | const cxx_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "include" }); |
| 147 | 140 | const cxx_src_include_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libcxx", "src" }); |
| 141 | const abi_version: u2 = if (target.os.tag == .emscripten) 2 else 1; | |
| 148 | 142 | const abi_version_arg = try std.fmt.allocPrint(arena, "-D_LIBCPP_ABI_VERSION={d}", .{ |
| 149 | @intFromEnum(comp.libcxx_abi_version), | |
| 143 | abi_version, | |
| 150 | 144 | }); |
| 151 | 145 | const abi_namespace_arg = try std.fmt.allocPrint(arena, "-D_LIBCPP_ABI_NAMESPACE=__{d}", .{ |
| 152 | @intFromEnum(comp.libcxx_abi_version), | |
| 146 | abi_version, | |
| 153 | 147 | }); |
| 154 | 148 | |
| 155 | 149 | const optimize_mode = comp.compilerRtOptMode(); |