authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2020-03-13 00:55:52+11:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-12 12:27:45-04:00
log8a22c50c081e4495216ef961a9c1f2db6fbac916
tree420f449a2e1dab2d33f85b649428c11ca70cccf7
parent214af69814b3940236ace44ada0243726d29debf

Remove unused static_crt_dir field from libc config


4 files changed, 0 insertions(+), 41 deletions(-)

src-self-hosted/libc_installation.zig-25
......@@ -17,7 +17,6 @@ pub const LibCInstallation = struct {
1717 include_dir: ?[:0]const u8 = null,
1818 sys_include_dir: ?[:0]const u8 = null,
1919 crt_dir: ?[:0]const u8 = null,
20 static_crt_dir: ?[:0]const u8 = null,
2120 msvc_lib_dir: ?[:0]const u8 = null,
2221 kernel32_lib_dir: ?[:0]const u8 = null,
2322
......@@ -98,13 +97,6 @@ pub const LibCInstallation = struct {
9897 try stderr.print("crt_dir may not be empty for {}\n", .{@tagName(Target.current.os.tag)});
9998 return error.ParseError;
10099 }
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 }
108100 if (self.msvc_lib_dir == null and is_windows and !is_gnu) {
109101 try stderr.print("msvc_lib_dir may not be empty for {}-{}\n", .{
110102 @tagName(Target.current.os.tag),
......@@ -128,7 +120,6 @@ pub const LibCInstallation = struct {
128120 const include_dir = self.include_dir orelse "";
129121 const sys_include_dir = self.sys_include_dir orelse "";
130122 const crt_dir = self.crt_dir orelse "";
131 const static_crt_dir = self.static_crt_dir orelse "";
132123 const msvc_lib_dir = self.msvc_lib_dir orelse "";
133124 const kernel32_lib_dir = self.kernel32_lib_dir orelse "";
134125
......@@ -147,11 +138,6 @@ pub const LibCInstallation = struct {
147138 \\# Not needed when targeting MacOS.
148139 \\crt_dir={}
149140 \\
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 \\
155141 \\# The directory that contains `vcruntime.lib`.
156142 \\# Only needed when targeting MSVC on Windows.
157143 \\msvc_lib_dir={}
......@@ -164,7 +150,6 @@ pub const LibCInstallation = struct {
164150 include_dir,
165151 sys_include_dir,
166152 crt_dir,
167 static_crt_dir,
168153 msvc_lib_dir,
169154 kernel32_lib_dir,
170155 });
......@@ -186,7 +171,6 @@ pub const LibCInstallation = struct {
186171 var batch = Batch(FindError!void, 3, .auto_async).init();
187172 batch.add(&async self.findNativeIncludeDirPosix(args));
188173 batch.add(&async self.findNativeCrtDirPosix(args));
189 batch.add(&async self.findNativeStaticCrtDirPosix(args));
190174 try batch.wait();
191175 } else {
192176 var sdk: *ZigWindowsSDK = undefined;
......@@ -428,15 +412,6 @@ pub const LibCInstallation = struct {
428412 });
429413 }
430414
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
440415 fn findNativeKernel32LibDir(
441416 self: *LibCInstallation,
442417 args: FindNativeOptions,
src-self-hosted/stage2.zig-12
......@@ -744,8 +744,6 @@ const Stage2LibCInstallation = extern struct {
744744 sys_include_dir_len: usize,
745745 crt_dir: [*:0]const u8,
746746 crt_dir_len: usize,
747 static_crt_dir: [*:0]const u8,
748 static_crt_dir_len: usize,
749747 msvc_lib_dir: [*:0]const u8,
750748 msvc_lib_dir_len: usize,
751749 kernel32_lib_dir: [*:0]const u8,
......@@ -773,13 +771,6 @@ const Stage2LibCInstallation = extern struct {
773771 self.crt_dir = "";
774772 self.crt_dir_len = 0;
775773 }
776 if (libc.static_crt_dir) |s| {
777 self.static_crt_dir = s.ptr;
778 self.static_crt_dir_len = s.len;
779 } else {
780 self.static_crt_dir = "";
781 self.static_crt_dir_len = 0;
782 }
783774 if (libc.msvc_lib_dir) |s| {
784775 self.msvc_lib_dir = s.ptr;
785776 self.msvc_lib_dir_len = s.len;
......@@ -807,9 +798,6 @@ const Stage2LibCInstallation = extern struct {
807798 if (self.crt_dir_len != 0) {
808799 libc.crt_dir = self.crt_dir[0..self.crt_dir_len :0];
809800 }
810 if (self.static_crt_dir_len != 0) {
811 libc.static_crt_dir = self.static_crt_dir[0..self.static_crt_dir_len :0];
812 }
813801 if (self.msvc_lib_dir_len != 0) {
814802 libc.msvc_lib_dir = self.msvc_lib_dir[0..self.msvc_lib_dir_len :0];
815803 }
src/stage2.cpp-2
......@@ -272,8 +272,6 @@ enum Error stage2_libc_parse(struct Stage2LibCInstallation *libc, const char *li
272272 libc->sys_include_dir_len = strlen(libc->sys_include_dir);
273273 libc->crt_dir = "";
274274 libc->crt_dir_len = strlen(libc->crt_dir);
275 libc->static_crt_dir = "";
276 libc->static_crt_dir_len = strlen(libc->static_crt_dir);
277275 libc->msvc_lib_dir = "";
278276 libc->msvc_lib_dir_len = strlen(libc->msvc_lib_dir);
279277 libc->kernel32_lib_dir = "";
src/stage2.h-2
......@@ -209,8 +209,6 @@ struct Stage2LibCInstallation {
209209 size_t sys_include_dir_len;
210210 const char *crt_dir;
211211 size_t crt_dir_len;
212 const char *static_crt_dir;
213 size_t static_crt_dir_len;
214212 const char *msvc_lib_dir;
215213 size_t msvc_lib_dir_len;
216214 const char *kernel32_lib_dir;