| ... | @@ -17,7 +17,6 @@ pub const LibCInstallation = struct { | ... | @@ -17,7 +17,6 @@ pub const LibCInstallation = struct { |
| 17 | include_dir: ?[:0]const u8 = null, | 17 | include_dir: ?[:0]const u8 = null, |
| 18 | sys_include_dir: ?[:0]const u8 = null, | 18 | sys_include_dir: ?[:0]const u8 = null, |
| 19 | crt_dir: ?[:0]const u8 = null, | 19 | crt_dir: ?[:0]const u8 = null, |
| 20 | static_crt_dir: ?[:0]const u8 = null, | | |
| 21 | msvc_lib_dir: ?[:0]const u8 = null, | 20 | msvc_lib_dir: ?[:0]const u8 = null, |
| 22 | kernel32_lib_dir: ?[:0]const u8 = null, | 21 | kernel32_lib_dir: ?[:0]const u8 = null, |
| 23 | | 22 | |
| ... | @@ -98,13 +97,6 @@ pub const LibCInstallation = struct { | ... | @@ -98,13 +97,6 @@ pub const LibCInstallation = struct { |
| 98 | try stderr.print("crt_dir may not be empty for {}\n", .{@tagName(Target.current.os.tag)}); | 97 | try stderr.print("crt_dir may not be empty for {}\n", .{@tagName(Target.current.os.tag)}); |
| 99 | return error.ParseError; | 98 | return error.ParseError; |
| 100 | } | 99 | } |
| 101 | if (self.static_crt_dir == null and is_windows and is_gnu) { | | |
| 102 | try stderr.print("static_crt_dir may not be empty for {}-{}\n", .{ | | |
| 103 | @tagName(Target.current.os.tag), | | |
| 104 | @tagName(Target.current.abi), | | |
| 105 | }); | | |
| 106 | return error.ParseError; | | |
| 107 | } | | |
| 108 | if (self.msvc_lib_dir == null and is_windows and !is_gnu) { | 100 | if (self.msvc_lib_dir == null and is_windows and !is_gnu) { |
| 109 | try stderr.print("msvc_lib_dir may not be empty for {}-{}\n", .{ | 101 | try stderr.print("msvc_lib_dir may not be empty for {}-{}\n", .{ |
| 110 | @tagName(Target.current.os.tag), | 102 | @tagName(Target.current.os.tag), |
| ... | @@ -128,7 +120,6 @@ pub const LibCInstallation = struct { | ... | @@ -128,7 +120,6 @@ pub const LibCInstallation = struct { |
| 128 | const include_dir = self.include_dir orelse ""; | 120 | const include_dir = self.include_dir orelse ""; |
| 129 | const sys_include_dir = self.sys_include_dir orelse ""; | 121 | const sys_include_dir = self.sys_include_dir orelse ""; |
| 130 | const crt_dir = self.crt_dir orelse ""; | 122 | const crt_dir = self.crt_dir orelse ""; |
| 131 | const static_crt_dir = self.static_crt_dir orelse ""; | | |
| 132 | const msvc_lib_dir = self.msvc_lib_dir orelse ""; | 123 | const msvc_lib_dir = self.msvc_lib_dir orelse ""; |
| 133 | const kernel32_lib_dir = self.kernel32_lib_dir orelse ""; | 124 | const kernel32_lib_dir = self.kernel32_lib_dir orelse ""; |
| 134 | | 125 | |
| ... | @@ -147,11 +138,6 @@ pub const LibCInstallation = struct { | ... | @@ -147,11 +138,6 @@ pub const LibCInstallation = struct { |
| 147 | \\# Not needed when targeting MacOS. | 138 | \\# Not needed when targeting MacOS. |
| 148 | \\crt_dir={} | 139 | \\crt_dir={} |
| 149 | \\ | 140 | \\ |
| 150 | \\# The directory that contains `crtbegin.o`. | | |
| 151 | \\# On POSIX, can be found with `cc -print-file-name=crtbegin.o`. | | |
| 152 | \\# Only needed when targeting MinGW-w64 on Windows. | | |
| 153 | \\static_crt_dir={} | | |
| 154 | \\ | | |
| 155 | \\# The directory that contains `vcruntime.lib`. | 141 | \\# The directory that contains `vcruntime.lib`. |
| 156 | \\# Only needed when targeting MSVC on Windows. | 142 | \\# Only needed when targeting MSVC on Windows. |
| 157 | \\msvc_lib_dir={} | 143 | \\msvc_lib_dir={} |
| ... | @@ -164,7 +150,6 @@ pub const LibCInstallation = struct { | ... | @@ -164,7 +150,6 @@ pub const LibCInstallation = struct { |
| 164 | include_dir, | 150 | include_dir, |
| 165 | sys_include_dir, | 151 | sys_include_dir, |
| 166 | crt_dir, | 152 | crt_dir, |
| 167 | static_crt_dir, | | |
| 168 | msvc_lib_dir, | 153 | msvc_lib_dir, |
| 169 | kernel32_lib_dir, | 154 | kernel32_lib_dir, |
| 170 | }); | 155 | }); |
| ... | @@ -186,7 +171,6 @@ pub const LibCInstallation = struct { | ... | @@ -186,7 +171,6 @@ pub const LibCInstallation = struct { |
| 186 | var batch = Batch(FindError!void, 3, .auto_async).init(); | 171 | var batch = Batch(FindError!void, 3, .auto_async).init(); |
| 187 | batch.add(&async self.findNativeIncludeDirPosix(args)); | 172 | batch.add(&async self.findNativeIncludeDirPosix(args)); |
| 188 | batch.add(&async self.findNativeCrtDirPosix(args)); | 173 | batch.add(&async self.findNativeCrtDirPosix(args)); |
| 189 | batch.add(&async self.findNativeStaticCrtDirPosix(args)); | | |
| 190 | try batch.wait(); | 174 | try batch.wait(); |
| 191 | } else { | 175 | } else { |
| 192 | var sdk: *ZigWindowsSDK = undefined; | 176 | var sdk: *ZigWindowsSDK = undefined; |
| ... | @@ -428,15 +412,6 @@ pub const LibCInstallation = struct { | ... | @@ -428,15 +412,6 @@ pub const LibCInstallation = struct { |
| 428 | }); | 412 | }); |
| 429 | } | 413 | } |
| 430 | | 414 | |
| 431 | fn findNativeStaticCrtDirPosix(self: *LibCInstallation, args: FindNativeOptions) FindError!void { | | |
| 432 | self.static_crt_dir = try ccPrintFileName(.{ | | |
| 433 | .allocator = args.allocator, | | |
| 434 | .search_basename = "crtbegin.o", | | |
| 435 | .want_dirname = .only_dir, | | |
| 436 | .verbose = args.verbose, | | |
| 437 | }); | | |
| 438 | } | | |
| 439 | | | |
| 440 | fn findNativeKernel32LibDir( | 415 | fn findNativeKernel32LibDir( |
| 441 | self: *LibCInstallation, | 416 | self: *LibCInstallation, |
| 442 | args: FindNativeOptions, | 417 | args: FindNativeOptions, |