| ... | ... | @@ -106,7 +106,7 @@ pub fn build(b: *Builder) !void { |
| 106 | 106 | softfloat.addCSourceFiles(&softfloat_sources, &[_][]const u8{ "-std=c99", "-O3" }); |
| 107 | 107 | exe.linkLibrary(softfloat); |
| 108 | 108 | |
| 109 | | const exe_cflags = &[_][]const u8{ |
| 109 | const exe_cflags = [_][]const u8{ |
| 110 | 110 | "-std=c++14", |
| 111 | 111 | "-D__STDC_CONSTANT_MACROS", |
| 112 | 112 | "-D__STDC_FORMAT_MACROS", |
| ... | ... | @@ -119,9 +119,13 @@ pub fn build(b: *Builder) !void { |
| 119 | 119 | "-Wno-missing-braces", |
| 120 | 120 | "-Wno-comment", |
| 121 | 121 | }; |
| 122 | | exe.addCSourceFiles(&stage1_sources, exe_cflags); |
| 122 | exe.addCSourceFiles(&stage1_sources, &exe_cflags); |
| 123 | 123 | exe.addCSourceFiles(&optimized_c_sources, &[_][]const u8{ "-std=c99", "-O3" }); |
| 124 | | exe.addCSourceFiles(&zig_cpp_sources, exe_cflags); |
| 124 | // We need this because otherwise zig_clang_cc1_main.cpp ends up pulling |
| 125 | // in a dependency on llvm::cfg::Update<llvm::BasicBlock*>::dump() which is |
| 126 | // unavailable when LLVM is compiled in Release mode. |
| 127 | const zig_cpp_cflags = exe_cflags ++ [_][]const u8{"-DNDEBUG=1"}; |
| 128 | exe.addCSourceFiles(&zig_cpp_sources, &zig_cpp_cflags); |
| 125 | 129 | } |
| 126 | 130 | |
| 127 | 131 | for (clang_libs) |lib_name| { |
| ... | ... | @@ -138,6 +142,11 @@ pub fn build(b: *Builder) !void { |
| 138 | 142 | |
| 139 | 143 | // This means we rely on clang-or-zig-built LLVM, Clang, LLD libraries. |
| 140 | 144 | exe.linkSystemLibrary("c++"); |
| 145 | |
| 146 | if (target.getOs().tag == .windows) { |
| 147 | exe.linkSystemLibrary("version"); |
| 148 | exe.linkSystemLibrary("uuid"); |
| 149 | } |
| 141 | 150 | } |
| 142 | 151 | if (link_libc) { |
| 143 | 152 | exe.linkLibC(); |