commit a338eaccc8c3d20a476cb763afebeb7bb1b1a94a (tree)
parent 173db6eea6f7fd46c21e8e156c8437f9e2e7a710
Author: Andrew Kelley <andrew@ziglang.org>
Date: Wed, 1 Sep 2021 15:34:39 -0700
stage2: libcxx: logic for skipping OS-specific files
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/libcxx.zig b/src/libcxx.zig
@@ -121,10 +121,12 @@ pub fn buildLibCXX(comp: *Compilation) !void {
continue;
}
- if (target.os.tag != .windows) {
- if (std.mem.startsWith(u8, cxx_src, "src/support/win32/"))
- continue;
- }
+ if (std.mem.startsWith(u8, cxx_src, "src/support/win32/") and target.os.tag != .windows)
+ continue;
+ if (std.mem.startsWith(u8, cxx_src, "src/support/solaris/") and target.os.tag != .solaris)
+ continue;
+ if (std.mem.startsWith(u8, cxx_src, "src/support/ibm/") and target.os.tag != .zos)
+ continue;
try cflags.append("-DNDEBUG");
try cflags.append("-D_LIBCPP_BUILDING_LIBRARY");