master
1const std = @import("std");
2const Allocator = std.mem.Allocator;
3const mem = std.mem;
4const path = std.fs.path;
5const assert = std.debug.assert;
6const log = std.log.scoped(.mingw);
7
8const builtin = @import("builtin");
9const Compilation = @import("../Compilation.zig");
10const build_options = @import("build_options");
11const Cache = std.Build.Cache;
12const dev = @import("../dev.zig");
13const def = @import("mingw/def.zig");
14const implib = @import("mingw/implib.zig");
15
16test {
17 _ = def;
18 _ = implib;
19}
20
21pub const CrtFile = enum {
22 crt2_o,
23 dllcrt2_o,
24 libmingw32_lib,
25};
26
27/// TODO replace anyerror with explicit error set, recording user-friendly errors with
28/// lockAndSetMiscFailure and returning error.AlreadyReported. see libcxx.zig for example.
29pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progress.Node) anyerror!void {
30 if (!build_options.have_llvm) {
31 return error.ZigCompilerNotBuiltWithLLVMExtensions;
32 }
33 var arena_allocator = std.heap.ArenaAllocator.init(comp.gpa);
34 defer arena_allocator.deinit();
35 const arena = arena_allocator.allocator();
36 const target = comp.getTarget();
37
38 // The old 32-bit x86 variant of SEH doesn't use tables.
39 const unwind_tables: std.builtin.UnwindTables = if (target.cpu.arch != .x86) .async else .none;
40
41 switch (crt_file) {
42 .crt2_o => {
43 var args = std.array_list.Managed([]const u8).init(arena);
44 try addCrtCcArgs(comp, arena, &args);
45 if (comp.mingw_unicode_entry_point) {
46 try args.appendSlice(&.{ "-DUNICODE", "-D_UNICODE" });
47 }
48 var files = [_]Compilation.CSourceFile{
49 .{
50 .src_path = try comp.dirs.zig_lib.join(arena, &.{
51 "libc", "mingw", "crt", "crtexe.c",
52 }),
53 .extra_flags = args.items,
54 .owner = undefined,
55 },
56 };
57 return comp.build_crt_file("crt2", .Obj, .@"mingw-w64 crt2.o", prog_node, &files, .{
58 .unwind_tables = unwind_tables,
59 });
60 },
61
62 .dllcrt2_o => {
63 var args = std.array_list.Managed([]const u8).init(arena);
64 try addCrtCcArgs(comp, arena, &args);
65 var files = [_]Compilation.CSourceFile{
66 .{
67 .src_path = try comp.dirs.zig_lib.join(arena, &.{
68 "libc", "mingw", "crt", "crtdll.c",
69 }),
70 .extra_flags = args.items,
71 .owner = undefined,
72 },
73 };
74 return comp.build_crt_file("dllcrt2", .Obj, .@"mingw-w64 dllcrt2.o", prog_node, &files, .{
75 .unwind_tables = unwind_tables,
76 });
77 },
78
79 .libmingw32_lib => {
80 var c_source_files = std.array_list.Managed(Compilation.CSourceFile).init(arena);
81
82 {
83 var crt_args = std.array_list.Managed([]const u8).init(arena);
84 try addCrtCcArgs(comp, arena, &crt_args);
85
86 for (mingw32_generic_src) |dep| {
87 try c_source_files.append(.{
88 .src_path = try comp.dirs.zig_lib.join(arena, &.{
89 "libc", "mingw", dep,
90 }),
91 .extra_flags = crt_args.items,
92 .owner = undefined,
93 });
94 }
95 if (target.cpu.arch.isX86()) {
96 for (mingw32_x86_src) |dep| {
97 try c_source_files.append(.{
98 .src_path = try comp.dirs.zig_lib.join(arena, &.{
99 "libc", "mingw", dep,
100 }),
101 .extra_flags = crt_args.items,
102 .owner = undefined,
103 });
104 }
105 if (target.cpu.arch == .x86) {
106 for (mingw32_x86_32_src) |dep| {
107 try c_source_files.append(.{
108 .src_path = try comp.dirs.zig_lib.join(arena, &.{
109 "libc", "mingw", dep,
110 }),
111 .extra_flags = crt_args.items,
112 .owner = undefined,
113 });
114 }
115 }
116 } else if (target.cpu.arch == .thumb) {
117 for (mingw32_arm_src) |dep| {
118 try c_source_files.append(.{
119 .src_path = try comp.dirs.zig_lib.join(arena, &.{
120 "libc", "mingw", dep,
121 }),
122 .extra_flags = crt_args.items,
123 .owner = undefined,
124 });
125 }
126 for (mingw32_arm32_src) |dep| {
127 try c_source_files.append(.{
128 .src_path = try comp.dirs.zig_lib.join(arena, &.{
129 "libc", "mingw", dep,
130 }),
131 .extra_flags = crt_args.items,
132 .owner = undefined,
133 });
134 }
135 } else if (target.cpu.arch == .aarch64) {
136 for (mingw32_arm_src) |dep| {
137 try c_source_files.append(.{
138 .src_path = try comp.dirs.zig_lib.join(arena, &.{
139 "libc", "mingw", dep,
140 }),
141 .extra_flags = crt_args.items,
142 .owner = undefined,
143 });
144 }
145 for (mingw32_arm64_src) |dep| {
146 try c_source_files.append(.{
147 .src_path = try comp.dirs.zig_lib.join(arena, &.{
148 "libc", "mingw", dep,
149 }),
150 .extra_flags = crt_args.items,
151 .owner = undefined,
152 });
153 }
154 } else {
155 @panic("unsupported arch");
156 }
157 }
158
159 {
160 var winpthreads_args = std.array_list.Managed([]const u8).init(arena);
161 try addCcArgs(comp, arena, &winpthreads_args);
162 try winpthreads_args.appendSlice(&[_][]const u8{
163 "-DIN_WINPTHREAD",
164 // winpthreads incorrectly assumes that Clang has `-Wprio-ctor-dtor`.
165 "-Wno-unknown-warning-option",
166 });
167
168 switch (comp.compilerRtOptMode()) {
169 .Debug, .ReleaseSafe => try winpthreads_args.append("-DWINPTHREAD_DBG"),
170 .ReleaseFast, .ReleaseSmall => {},
171 }
172
173 for (mingw32_winpthreads_src) |dep| {
174 try c_source_files.append(.{
175 .src_path = try comp.dirs.zig_lib.join(arena, &.{
176 "libc", "mingw", dep,
177 }),
178 .extra_flags = winpthreads_args.items,
179 .owner = undefined,
180 });
181 }
182 }
183
184 return comp.build_crt_file("libmingw32", .Lib, .@"mingw-w64 libmingw32.lib", prog_node, c_source_files.items, .{
185 .unwind_tables = unwind_tables,
186 // https://github.com/llvm/llvm-project/issues/43698#issuecomment-2542660611
187 .allow_lto = false,
188 });
189 },
190 }
191}
192
193fn addCcArgs(
194 comp: *Compilation,
195 arena: Allocator,
196 args: *std.array_list.Managed([]const u8),
197) error{OutOfMemory}!void {
198 try args.appendSlice(&[_][]const u8{
199 "-std=gnu11",
200 "-D__USE_MINGW_ANSI_STDIO=0",
201
202 "-isystem",
203 try comp.dirs.zig_lib.join(arena, &.{ "libc", "include", "any-windows-any" }),
204 });
205}
206
207fn addCrtCcArgs(
208 comp: *Compilation,
209 arena: Allocator,
210 args: *std.array_list.Managed([]const u8),
211) error{OutOfMemory}!void {
212 try addCcArgs(comp, arena, args);
213
214 if (comp.getTarget().cpu.arch == .thumb) {
215 try args.append("-mfpu=vfp");
216 }
217
218 try args.appendSlice(&[_][]const u8{
219 // According to Martin Storsjö,
220 // > the files under mingw-w64-crt are designed to always
221 // be built with __MSVCRT_VERSION__=0x700
222 "-D__MSVCRT_VERSION__=0x700",
223 "-D_CRTBLD",
224 "-D_SYSCRT=1",
225 "-D_WIN32_WINNT=0x0f00",
226 "-DCRTDLL=1",
227 "-DHAVE_CONFIG_H",
228
229 "-I",
230 try comp.dirs.zig_lib.join(arena, &.{ "libc", "mingw", "include" }),
231 });
232}
233
234pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {
235 dev.check(.build_import_lib);
236
237 const gpa = comp.gpa;
238 const io = comp.io;
239
240 var arena_allocator = std.heap.ArenaAllocator.init(gpa);
241 defer arena_allocator.deinit();
242 const arena = arena_allocator.allocator();
243
244 const def_file_path = findDef(arena, comp.getTarget(), comp.dirs.zig_lib, lib_name) catch |err| switch (err) {
245 error.FileNotFound => {
246 log.debug("no {s}.def file available to make a DLL import {s}.lib", .{ lib_name, lib_name });
247 // In this case we will end up putting foo.lib onto the linker line and letting the linker
248 // use its library paths to look for libraries and report any problems.
249 return;
250 },
251 else => |e| return e,
252 };
253
254 const target = comp.getTarget();
255
256 // Use the global cache directory.
257 var cache: Cache = .{
258 .gpa = gpa,
259 .io = io,
260 .manifest_dir = try comp.dirs.global_cache.handle.makeOpenPath("h", .{}),
261 };
262 cache.addPrefix(.{ .path = null, .handle = std.fs.cwd() });
263 cache.addPrefix(comp.dirs.zig_lib);
264 cache.addPrefix(comp.dirs.global_cache);
265 defer cache.manifest_dir.close();
266
267 cache.hash.addBytes(build_options.version);
268 cache.hash.addOptionalBytes(comp.dirs.zig_lib.path);
269 cache.hash.add(target.cpu.arch);
270
271 var man = cache.obtain();
272 defer man.deinit();
273
274 _ = try man.addFile(def_file_path, null);
275
276 const final_lib_basename = try std.fmt.allocPrint(gpa, "{s}.lib", .{lib_name});
277 errdefer gpa.free(final_lib_basename);
278
279 if (try man.hit()) {
280 const digest = man.final();
281 const sub_path = try std.fs.path.join(gpa, &.{ "o", &digest, final_lib_basename });
282 errdefer gpa.free(sub_path);
283
284 comp.mutex.lock();
285 defer comp.mutex.unlock();
286 try comp.crt_files.ensureUnusedCapacity(gpa, 1);
287 comp.crt_files.putAssumeCapacityNoClobber(final_lib_basename, .{
288 .full_object_path = .{
289 .root_dir = comp.dirs.global_cache,
290 .sub_path = sub_path,
291 },
292 .lock = man.toOwnedLock(),
293 });
294 return;
295 }
296
297 const digest = man.final();
298 const o_sub_path = try std.fs.path.join(arena, &[_][]const u8{ "o", &digest });
299 var o_dir = try comp.dirs.global_cache.handle.makeOpenPath(o_sub_path, .{});
300 defer o_dir.close();
301
302 const aro = @import("aro");
303 var diagnostics: aro.Diagnostics = .{
304 .output = .{ .to_list = .{ .arena = .init(gpa) } },
305 };
306 defer diagnostics.deinit();
307 var aro_comp = aro.Compilation.init(gpa, arena, io, &diagnostics, std.fs.cwd());
308 defer aro_comp.deinit();
309
310 aro_comp.target = .fromZigTarget(target.*);
311
312 const include_dir = try comp.dirs.zig_lib.join(arena, &.{ "libc", "mingw", "def-include" });
313
314 if (comp.verbose_cc) print: {
315 var stderr, _ = std.debug.lockStderrWriter(&.{});
316 defer std.debug.unlockStderrWriter();
317 nosuspend stderr.print("def file: {s}\n", .{def_file_path}) catch break :print;
318 nosuspend stderr.print("include dir: {s}\n", .{include_dir}) catch break :print;
319 }
320
321 try aro_comp.search_path.append(gpa, .{ .path = include_dir, .kind = .normal });
322
323 const builtin_macros = try aro_comp.generateBuiltinMacros(.include_system_defines);
324 const def_file_source = try aro_comp.addSourceFromPath(def_file_path);
325
326 var pp = aro.Preprocessor.init(&aro_comp, .{ .provided = 0 });
327 defer pp.deinit();
328 pp.linemarkers = .none;
329 pp.preserve_whitespace = true;
330
331 try pp.preprocessSources(.{ .main = def_file_source, .builtin = builtin_macros });
332
333 if (aro_comp.diagnostics.output.to_list.messages.items.len != 0) {
334 var buffer: [64]u8 = undefined;
335 const w, const ttyconf = std.debug.lockStderrWriter(&buffer);
336 defer std.debug.unlockStderrWriter();
337 for (aro_comp.diagnostics.output.to_list.messages.items) |msg| {
338 if (msg.kind == .@"fatal error" or msg.kind == .@"error") {
339 msg.write(w, ttyconf, true) catch {};
340 return error.AroPreprocessorFailed;
341 }
342 }
343 }
344
345 const members = members: {
346 var aw: std.Io.Writer.Allocating = .init(gpa);
347 errdefer aw.deinit();
348 try pp.prettyPrintTokens(&aw.writer, .result_only);
349
350 const input = try aw.toOwnedSliceSentinel(0);
351 defer gpa.free(input);
352
353 const machine_type = target.toCoffMachine();
354 var def_diagnostics: def.Diagnostics = undefined;
355 var module_def = def.parse(gpa, input, machine_type, .mingw, &def_diagnostics) catch |err| switch (err) {
356 error.OutOfMemory => |e| return e,
357 error.ParseError => {
358 var buffer: [64]u8 = undefined;
359 const w, _ = std.debug.lockStderrWriter(&buffer);
360 defer std.debug.unlockStderrWriter();
361 try w.writeAll("error: ");
362 try def_diagnostics.writeMsg(w, input);
363 try w.writeByte('\n');
364 return error.WritingImportLibFailed;
365 },
366 };
367 defer module_def.deinit();
368
369 module_def.fixupForImportLibraryGeneration(machine_type);
370
371 break :members try implib.getMembers(gpa, module_def, machine_type);
372 };
373 defer members.deinit();
374
375 const lib_final_path = try std.fs.path.join(gpa, &.{ "o", &digest, final_lib_basename });
376 errdefer gpa.free(lib_final_path);
377
378 {
379 const lib_final_file = try o_dir.createFile(final_lib_basename, .{ .truncate = true });
380 defer lib_final_file.close();
381 var buffer: [1024]u8 = undefined;
382 var file_writer = lib_final_file.writer(&buffer);
383 try implib.writeCoffArchive(gpa, &file_writer.interface, members);
384 try file_writer.interface.flush();
385 }
386
387 man.writeManifest() catch |err| {
388 log.warn("failed to write cache manifest for DLL import {s}.lib: {s}", .{ lib_name, @errorName(err) });
389 };
390
391 comp.mutex.lock();
392 defer comp.mutex.unlock();
393 try comp.crt_files.putNoClobber(gpa, final_lib_basename, .{
394 .full_object_path = .{
395 .root_dir = comp.dirs.global_cache,
396 .sub_path = lib_final_path,
397 },
398 .lock = man.toOwnedLock(),
399 });
400}
401
402pub fn libExists(
403 allocator: Allocator,
404 target: *const std.Target,
405 zig_lib_directory: Cache.Directory,
406 lib_name: []const u8,
407) !bool {
408 const s = findDef(allocator, target, zig_lib_directory, lib_name) catch |err| switch (err) {
409 error.FileNotFound => return false,
410 else => |e| return e,
411 };
412 defer allocator.free(s);
413 return true;
414}
415
416/// This function body is verbose but all it does is test 3 different paths and
417/// see if a .def file exists.
418fn findDef(
419 allocator: Allocator,
420 target: *const std.Target,
421 zig_lib_directory: Cache.Directory,
422 lib_name: []const u8,
423) ![]u8 {
424 const lib_path = switch (target.cpu.arch) {
425 .thumb => "libarm32",
426 .aarch64 => "libarm64",
427 .x86 => "lib32",
428 .x86_64 => "lib64",
429 else => unreachable,
430 };
431
432 var override_path = std.array_list.Managed(u8).init(allocator);
433 defer override_path.deinit();
434
435 const s = path.sep_str;
436
437 {
438 // Try the archtecture-specific path first.
439 const fmt_path = "libc" ++ s ++ "mingw" ++ s ++ "{s}" ++ s ++ "{s}.def";
440 if (zig_lib_directory.path) |p| {
441 try override_path.print("{s}" ++ s ++ fmt_path, .{ p, lib_path, lib_name });
442 } else {
443 try override_path.print(fmt_path, .{ lib_path, lib_name });
444 }
445 if (std.fs.cwd().access(override_path.items, .{})) |_| {
446 return override_path.toOwnedSlice();
447 } else |err| switch (err) {
448 error.FileNotFound => {},
449 else => |e| return e,
450 }
451 }
452
453 {
454 // Try the generic version.
455 override_path.shrinkRetainingCapacity(0);
456 const fmt_path = "libc" ++ s ++ "mingw" ++ s ++ "lib-common" ++ s ++ "{s}.def";
457 if (zig_lib_directory.path) |p| {
458 try override_path.print("{s}" ++ s ++ fmt_path, .{ p, lib_name });
459 } else {
460 try override_path.print(fmt_path, .{lib_name});
461 }
462 if (std.fs.cwd().access(override_path.items, .{})) |_| {
463 return override_path.toOwnedSlice();
464 } else |err| switch (err) {
465 error.FileNotFound => {},
466 else => |e| return e,
467 }
468 }
469
470 {
471 // Try the generic version and preprocess it.
472 override_path.shrinkRetainingCapacity(0);
473 const fmt_path = "libc" ++ s ++ "mingw" ++ s ++ "lib-common" ++ s ++ "{s}.def.in";
474 if (zig_lib_directory.path) |p| {
475 try override_path.print("{s}" ++ s ++ fmt_path, .{ p, lib_name });
476 } else {
477 try override_path.print(fmt_path, .{lib_name});
478 }
479 if (std.fs.cwd().access(override_path.items, .{})) |_| {
480 return override_path.toOwnedSlice();
481 } else |err| switch (err) {
482 error.FileNotFound => {},
483 else => |e| return e,
484 }
485 }
486
487 return error.FileNotFound;
488}
489
490const mingw32_generic_src = [_][]const u8{
491 // mingw32
492 "crt" ++ path.sep_str ++ "crtexewin.c",
493 "crt" ++ path.sep_str ++ "dll_argv.c",
494 "crt" ++ path.sep_str ++ "gccmain.c",
495 "crt" ++ path.sep_str ++ "natstart.c",
496 "crt" ++ path.sep_str ++ "pseudo-reloc-list.c",
497 "crt" ++ path.sep_str ++ "wildcard.c",
498 "crt" ++ path.sep_str ++ "charmax.c",
499 "crt" ++ path.sep_str ++ "ucrtexewin.c",
500 "crt" ++ path.sep_str ++ "dllargv.c",
501 "crt" ++ path.sep_str ++ "_newmode.c",
502 "crt" ++ path.sep_str ++ "tlssup.c",
503 "crt" ++ path.sep_str ++ "xncommod.c",
504 "crt" ++ path.sep_str ++ "cinitexe.c",
505 "crt" ++ path.sep_str ++ "merr.c",
506 "crt" ++ path.sep_str ++ "usermatherr.c",
507 "crt" ++ path.sep_str ++ "pesect.c",
508 "crt" ++ path.sep_str ++ "udllargc.c",
509 "crt" ++ path.sep_str ++ "xthdloc.c",
510 "crt" ++ path.sep_str ++ "mingw_helpers.c",
511 "crt" ++ path.sep_str ++ "pseudo-reloc.c",
512 "crt" ++ path.sep_str ++ "udll_argv.c",
513 "crt" ++ path.sep_str ++ "xtxtmode.c",
514 "crt" ++ path.sep_str ++ "crt_handler.c",
515 "crt" ++ path.sep_str ++ "tlsthrd.c",
516 "crt" ++ path.sep_str ++ "tlsmthread.c",
517 "crt" ++ path.sep_str ++ "tlsmcrt.c",
518 "crt" ++ path.sep_str ++ "cxa_atexit.c",
519 "crt" ++ path.sep_str ++ "cxa_thread_atexit.c",
520 "crt" ++ path.sep_str ++ "tls_atexit.c",
521 "intrincs" ++ path.sep_str ++ "RtlSecureZeroMemory.c",
522 // mingwex
523 "cfguard" ++ path.sep_str ++ "mingw_cfguard_support.c",
524 "complex" ++ path.sep_str ++ "_cabs.c",
525 "complex" ++ path.sep_str ++ "cabs.c",
526 "complex" ++ path.sep_str ++ "cabsf.c",
527 "complex" ++ path.sep_str ++ "cabsl.c",
528 "complex" ++ path.sep_str ++ "cacos.c",
529 "complex" ++ path.sep_str ++ "cacosf.c",
530 "complex" ++ path.sep_str ++ "cacosl.c",
531 "complex" ++ path.sep_str ++ "carg.c",
532 "complex" ++ path.sep_str ++ "cargf.c",
533 "complex" ++ path.sep_str ++ "cargl.c",
534 "complex" ++ path.sep_str ++ "casin.c",
535 "complex" ++ path.sep_str ++ "casinf.c",
536 "complex" ++ path.sep_str ++ "casinl.c",
537 "complex" ++ path.sep_str ++ "catan.c",
538 "complex" ++ path.sep_str ++ "catanf.c",
539 "complex" ++ path.sep_str ++ "catanl.c",
540 "complex" ++ path.sep_str ++ "ccos.c",
541 "complex" ++ path.sep_str ++ "ccosf.c",
542 "complex" ++ path.sep_str ++ "ccosl.c",
543 "complex" ++ path.sep_str ++ "cexp.c",
544 "complex" ++ path.sep_str ++ "cexpf.c",
545 "complex" ++ path.sep_str ++ "cexpl.c",
546 "complex" ++ path.sep_str ++ "cimag.c",
547 "complex" ++ path.sep_str ++ "cimagf.c",
548 "complex" ++ path.sep_str ++ "cimagl.c",
549 "complex" ++ path.sep_str ++ "clog.c",
550 "complex" ++ path.sep_str ++ "clog10.c",
551 "complex" ++ path.sep_str ++ "clog10f.c",
552 "complex" ++ path.sep_str ++ "clog10l.c",
553 "complex" ++ path.sep_str ++ "clogf.c",
554 "complex" ++ path.sep_str ++ "clogl.c",
555 "complex" ++ path.sep_str ++ "conj.c",
556 "complex" ++ path.sep_str ++ "conjf.c",
557 "complex" ++ path.sep_str ++ "conjl.c",
558 "complex" ++ path.sep_str ++ "cpow.c",
559 "complex" ++ path.sep_str ++ "cpowf.c",
560 "complex" ++ path.sep_str ++ "cpowl.c",
561 "complex" ++ path.sep_str ++ "cproj.c",
562 "complex" ++ path.sep_str ++ "cprojf.c",
563 "complex" ++ path.sep_str ++ "cprojl.c",
564 "complex" ++ path.sep_str ++ "creal.c",
565 "complex" ++ path.sep_str ++ "crealf.c",
566 "complex" ++ path.sep_str ++ "creall.c",
567 "complex" ++ path.sep_str ++ "csin.c",
568 "complex" ++ path.sep_str ++ "csinf.c",
569 "complex" ++ path.sep_str ++ "csinl.c",
570 "complex" ++ path.sep_str ++ "csqrt.c",
571 "complex" ++ path.sep_str ++ "csqrtf.c",
572 "complex" ++ path.sep_str ++ "csqrtl.c",
573 "complex" ++ path.sep_str ++ "ctan.c",
574 "complex" ++ path.sep_str ++ "ctanf.c",
575 "complex" ++ path.sep_str ++ "ctanl.c",
576 "gdtoa" ++ path.sep_str ++ "arithchk.c",
577 "gdtoa" ++ path.sep_str ++ "dmisc.c",
578 "gdtoa" ++ path.sep_str ++ "dtoa.c",
579 "gdtoa" ++ path.sep_str ++ "g__fmt.c",
580 "gdtoa" ++ path.sep_str ++ "g_dfmt.c",
581 "gdtoa" ++ path.sep_str ++ "g_ffmt.c",
582 "gdtoa" ++ path.sep_str ++ "g_xfmt.c",
583 "gdtoa" ++ path.sep_str ++ "gdtoa.c",
584 "gdtoa" ++ path.sep_str ++ "gethex.c",
585 "gdtoa" ++ path.sep_str ++ "gmisc.c",
586 "gdtoa" ++ path.sep_str ++ "hd_init.c",
587 "gdtoa" ++ path.sep_str ++ "hexnan.c",
588 "gdtoa" ++ path.sep_str ++ "misc.c",
589 "gdtoa" ++ path.sep_str ++ "qnan.c",
590 "gdtoa" ++ path.sep_str ++ "smisc.c",
591 "gdtoa" ++ path.sep_str ++ "strtodg.c",
592 "gdtoa" ++ path.sep_str ++ "strtodnrp.c",
593 "gdtoa" ++ path.sep_str ++ "strtof.c",
594 "gdtoa" ++ path.sep_str ++ "strtopx.c",
595 "gdtoa" ++ path.sep_str ++ "sum.c",
596 "gdtoa" ++ path.sep_str ++ "ulp.c",
597 "math" ++ path.sep_str ++ "coshl.c",
598 "math" ++ path.sep_str ++ "fp_consts.c",
599 "math" ++ path.sep_str ++ "fp_constsf.c",
600 "math" ++ path.sep_str ++ "fp_constsl.c",
601 "math" ++ path.sep_str ++ "fpclassify.c",
602 "math" ++ path.sep_str ++ "fpclassifyf.c",
603 "math" ++ path.sep_str ++ "fpclassifyl.c",
604 "math" ++ path.sep_str ++ "frexpf.c",
605 "math" ++ path.sep_str ++ "frexpl.c",
606 "math" ++ path.sep_str ++ "hypotf.c",
607 "math" ++ path.sep_str ++ "hypotl.c",
608 "math" ++ path.sep_str ++ "ldexpf.c",
609 "math" ++ path.sep_str ++ "lgamma.c",
610 "math" ++ path.sep_str ++ "lgammaf.c",
611 "math" ++ path.sep_str ++ "lgammal.c",
612 "math" ++ path.sep_str ++ "modfl.c",
613 "math" ++ path.sep_str ++ "powi.c",
614 "math" ++ path.sep_str ++ "powif.c",
615 "math" ++ path.sep_str ++ "powil.c",
616 "math" ++ path.sep_str ++ "signbit.c",
617 "math" ++ path.sep_str ++ "signbitf.c",
618 "math" ++ path.sep_str ++ "signbitl.c",
619 "math" ++ path.sep_str ++ "signgam.c",
620 "math" ++ path.sep_str ++ "sinhl.c",
621 "math" ++ path.sep_str ++ "sqrtl.c",
622 "math" ++ path.sep_str ++ "tanhl.c",
623 "misc" ++ path.sep_str ++ "alarm.c",
624 "misc" ++ path.sep_str ++ "btowc.c",
625 "misc" ++ path.sep_str ++ "delay-f.c",
626 "misc" ++ path.sep_str ++ "delay-n.c",
627 "misc" ++ path.sep_str ++ "delayimp.c",
628 "misc" ++ path.sep_str ++ "dirent.c",
629 "misc" ++ path.sep_str ++ "dirname.c",
630 "misc" ++ path.sep_str ++ "dllmain.c",
631 "misc" ++ path.sep_str ++ "feclearexcept.c",
632 "misc" ++ path.sep_str ++ "fegetenv.c",
633 "misc" ++ path.sep_str ++ "fegetexceptflag.c",
634 "misc" ++ path.sep_str ++ "fegetround.c",
635 "misc" ++ path.sep_str ++ "feholdexcept.c",
636 "misc" ++ path.sep_str ++ "feraiseexcept.c",
637 "misc" ++ path.sep_str ++ "fesetenv.c",
638 "misc" ++ path.sep_str ++ "fesetexceptflag.c",
639 "misc" ++ path.sep_str ++ "fesetround.c",
640 "misc" ++ path.sep_str ++ "fetestexcept.c",
641 "misc" ++ path.sep_str ++ "mingw_controlfp.c",
642 "misc" ++ path.sep_str ++ "mingw_setfp.c",
643 "misc" ++ path.sep_str ++ "feupdateenv.c",
644 "misc" ++ path.sep_str ++ "ftruncate.c",
645 "misc" ++ path.sep_str ++ "ftw32.c",
646 "misc" ++ path.sep_str ++ "ftw32i64.c",
647 "misc" ++ path.sep_str ++ "ftw64.c",
648 "misc" ++ path.sep_str ++ "ftw64i32.c",
649 "misc" ++ path.sep_str ++ "fwide.c",
650 "misc" ++ path.sep_str ++ "getlogin.c",
651 "misc" ++ path.sep_str ++ "getopt.c",
652 "misc" ++ path.sep_str ++ "gettimeofday.c",
653 "misc" ++ path.sep_str ++ "mempcpy.c",
654 "misc" ++ path.sep_str ++ "mingw-access.c",
655 "misc" ++ path.sep_str ++ "mingw-aligned-malloc.c",
656 "misc" ++ path.sep_str ++ "mingw_getsp.S",
657 "misc" ++ path.sep_str ++ "mingw_longjmp.S",
658 "misc" ++ path.sep_str ++ "mingw_matherr.c",
659 "misc" ++ path.sep_str ++ "mingw_mbwc_convert.c",
660 "misc" ++ path.sep_str ++ "mingw_usleep.c",
661 "misc" ++ path.sep_str ++ "mingw_wcstod.c",
662 "misc" ++ path.sep_str ++ "mingw_wcstof.c",
663 "misc" ++ path.sep_str ++ "mingw_wcstold.c",
664 "misc" ++ path.sep_str ++ "mkstemp.c",
665 "misc" ++ path.sep_str ++ "sleep.c",
666 "misc" ++ path.sep_str ++ "strnlen.c",
667 "misc" ++ path.sep_str ++ "strsafe.c",
668 "misc" ++ path.sep_str ++ "tdelete.c",
669 "misc" ++ path.sep_str ++ "tdestroy.c",
670 "misc" ++ path.sep_str ++ "tfind.c",
671 "misc" ++ path.sep_str ++ "tsearch.c",
672 "misc" ++ path.sep_str ++ "twalk.c",
673 "misc" ++ path.sep_str ++ "wcsnlen.c",
674 "misc" ++ path.sep_str ++ "wcstof.c",
675 "misc" ++ path.sep_str ++ "wcstoimax.c",
676 "misc" ++ path.sep_str ++ "wcstold.c",
677 "misc" ++ path.sep_str ++ "wcstoumax.c",
678 "misc" ++ path.sep_str ++ "wctob.c",
679 "misc" ++ path.sep_str ++ "wdirent.c",
680 "misc" ++ path.sep_str ++ "winbs_uint64.c",
681 "misc" ++ path.sep_str ++ "winbs_ulong.c",
682 "misc" ++ path.sep_str ++ "winbs_ushort.c",
683 "misc" ++ path.sep_str ++ "wmemchr.c",
684 "misc" ++ path.sep_str ++ "wmemcmp.c",
685 "misc" ++ path.sep_str ++ "wmemcpy.c",
686 "misc" ++ path.sep_str ++ "wmemmove.c",
687 "misc" ++ path.sep_str ++ "wmempcpy.c",
688 "misc" ++ path.sep_str ++ "wmemset.c",
689 "stdio" ++ path.sep_str ++ "_Exit.c",
690 "stdio" ++ path.sep_str ++ "_findfirst64i32.c",
691 "stdio" ++ path.sep_str ++ "_findnext64i32.c",
692 "stdio" ++ path.sep_str ++ "_fstat64i32.c",
693 "stdio" ++ path.sep_str ++ "_stat64i32.c",
694 "stdio" ++ path.sep_str ++ "_wfindfirst64i32.c",
695 "stdio" ++ path.sep_str ++ "_wfindnext64i32.c",
696 "stdio" ++ path.sep_str ++ "_wstat64i32.c",
697 "stdio" ++ path.sep_str ++ "__mingw_fix_stat_path.c",
698 "stdio" ++ path.sep_str ++ "__mingw_fix_wstat_path.c",
699 "stdio" ++ path.sep_str ++ "asprintf.c",
700 "stdio" ++ path.sep_str ++ "fopen64.c",
701 "stdio" ++ path.sep_str ++ "fseeko32.c",
702 "stdio" ++ path.sep_str ++ "fseeko64.c",
703 "stdio" ++ path.sep_str ++ "ftello.c",
704 "stdio" ++ path.sep_str ++ "ftello64.c",
705 "stdio" ++ path.sep_str ++ "ftruncate64.c",
706 "stdio" ++ path.sep_str ++ "lltoa.c",
707 "stdio" ++ path.sep_str ++ "lltow.c",
708 "stdio" ++ path.sep_str ++ "lseek64.c",
709 "stdio" ++ path.sep_str ++ "mingw_asprintf.c",
710 "stdio" ++ path.sep_str ++ "mingw_fprintf.c",
711 "stdio" ++ path.sep_str ++ "mingw_fwprintf.c",
712 "stdio" ++ path.sep_str ++ "mingw_fscanf.c",
713 "stdio" ++ path.sep_str ++ "mingw_fwscanf.c",
714 "stdio" ++ path.sep_str ++ "mingw_pformat.c",
715 "stdio" ++ path.sep_str ++ "mingw_sformat.c",
716 "stdio" ++ path.sep_str ++ "mingw_swformat.c",
717 "stdio" ++ path.sep_str ++ "mingw_wpformat.c",
718 "stdio" ++ path.sep_str ++ "mingw_printf.c",
719 "stdio" ++ path.sep_str ++ "mingw_wprintf.c",
720 "stdio" ++ path.sep_str ++ "mingw_scanf.c",
721 "stdio" ++ path.sep_str ++ "mingw_snprintf.c",
722 "stdio" ++ path.sep_str ++ "mingw_snwprintf.c",
723 "stdio" ++ path.sep_str ++ "mingw_sprintf.c",
724 "stdio" ++ path.sep_str ++ "mingw_swprintf.c",
725 "stdio" ++ path.sep_str ++ "mingw_sscanf.c",
726 "stdio" ++ path.sep_str ++ "mingw_swscanf.c",
727 "stdio" ++ path.sep_str ++ "mingw_vasprintf.c",
728 "stdio" ++ path.sep_str ++ "mingw_vfprintf.c",
729 "stdio" ++ path.sep_str ++ "mingw_vfwprintf.c",
730 "stdio" ++ path.sep_str ++ "mingw_vfscanf.c",
731 "stdio" ++ path.sep_str ++ "mingw_vprintf.c",
732 "stdio" ++ path.sep_str ++ "mingw_vsscanf.c",
733 "stdio" ++ path.sep_str ++ "mingw_vwprintf.c",
734 "stdio" ++ path.sep_str ++ "mingw_vsnprintf.c",
735 "stdio" ++ path.sep_str ++ "mingw_vsnwprintf.c",
736 "stdio" ++ path.sep_str ++ "mingw_vsprintf.c",
737 "stdio" ++ path.sep_str ++ "mingw_vswprintf.c",
738 "stdio" ++ path.sep_str ++ "mingw_wscanf.c",
739 "stdio" ++ path.sep_str ++ "mingw_vfwscanf.c",
740 "stdio" ++ path.sep_str ++ "mingw_vswscanf.c",
741 "stdio" ++ path.sep_str ++ "snprintf.c",
742 "stdio" ++ path.sep_str ++ "snwprintf.c",
743 "stdio" ++ path.sep_str ++ "strtok_r.c",
744 "stdio" ++ path.sep_str ++ "truncate.c",
745 "stdio" ++ path.sep_str ++ "ulltoa.c",
746 "stdio" ++ path.sep_str ++ "ulltow.c",
747 "stdio" ++ path.sep_str ++ "vasprintf.c",
748 "stdio" ++ path.sep_str ++ "vsnprintf.c",
749 "stdio" ++ path.sep_str ++ "vsnwprintf.c",
750 "stdio" ++ path.sep_str ++ "wtoll.c",
751 // mingwthrd
752 "libsrc" ++ path.sep_str ++ "mingwthrd_mt.c",
753 // ucrtbase
754 "math" ++ path.sep_str ++ "_huge.c",
755 "misc" ++ path.sep_str ++ "__initenv.c",
756 "misc" ++ path.sep_str ++ "__winitenv.c",
757 "misc" ++ path.sep_str ++ "__p___initenv.c",
758 "misc" ++ path.sep_str ++ "__p___winitenv.c",
759 "misc" ++ path.sep_str ++ "_onexit.c",
760 "misc" ++ path.sep_str ++ "ucrt-access.c",
761 "misc" ++ path.sep_str ++ "ucrt__getmainargs.c",
762 "misc" ++ path.sep_str ++ "ucrt__wgetmainargs.c",
763 "misc" ++ path.sep_str ++ "ucrt_amsg_exit.c",
764 "misc" ++ path.sep_str ++ "ucrt_at_quick_exit.c",
765 "misc" ++ path.sep_str ++ "ucrt_tzset.c",
766 "stdio" ++ path.sep_str ++ "ucrt__scprintf.c",
767 "stdio" ++ path.sep_str ++ "ucrt__snprintf.c",
768 "stdio" ++ path.sep_str ++ "ucrt__snscanf.c",
769 "stdio" ++ path.sep_str ++ "ucrt__snwprintf.c",
770 "stdio" ++ path.sep_str ++ "ucrt__vscprintf.c",
771 "stdio" ++ path.sep_str ++ "ucrt__vsnprintf.c",
772 "stdio" ++ path.sep_str ++ "ucrt__vsnwprintf.c",
773 "stdio" ++ path.sep_str ++ "ucrt___local_stdio_printf_options.c",
774 "stdio" ++ path.sep_str ++ "ucrt___local_stdio_scanf_options.c",
775 "stdio" ++ path.sep_str ++ "ucrt_fprintf.c",
776 "stdio" ++ path.sep_str ++ "ucrt_fscanf.c",
777 "stdio" ++ path.sep_str ++ "ucrt_fwprintf.c",
778 "stdio" ++ path.sep_str ++ "ucrt_fwscanf.c",
779 "stdio" ++ path.sep_str ++ "ucrt_ms_fwprintf.c",
780 "stdio" ++ path.sep_str ++ "ucrt_printf.c",
781 "stdio" ++ path.sep_str ++ "ucrt_scanf.c",
782 "stdio" ++ path.sep_str ++ "ucrt_snprintf.c",
783 "stdio" ++ path.sep_str ++ "ucrt_snwprintf.c",
784 "stdio" ++ path.sep_str ++ "ucrt_sprintf.c",
785 "stdio" ++ path.sep_str ++ "ucrt_sscanf.c",
786 "stdio" ++ path.sep_str ++ "ucrt_swscanf.c",
787 "stdio" ++ path.sep_str ++ "ucrt_swprintf.c",
788 "stdio" ++ path.sep_str ++ "ucrt_vfprintf.c",
789 "stdio" ++ path.sep_str ++ "ucrt_vfscanf.c",
790 "stdio" ++ path.sep_str ++ "ucrt_vfwscanf.c",
791 "stdio" ++ path.sep_str ++ "ucrt_vfwprintf.c",
792 "stdio" ++ path.sep_str ++ "ucrt_vprintf.c",
793 "stdio" ++ path.sep_str ++ "ucrt_vscanf.c",
794 "stdio" ++ path.sep_str ++ "ucrt_vsnprintf.c",
795 "stdio" ++ path.sep_str ++ "ucrt_vsnwprintf.c",
796 "stdio" ++ path.sep_str ++ "ucrt_vsprintf.c",
797 "stdio" ++ path.sep_str ++ "ucrt_vswprintf.c",
798 "stdio" ++ path.sep_str ++ "ucrt_vsscanf.c",
799 "stdio" ++ path.sep_str ++ "ucrt_vwscanf.c",
800 "stdio" ++ path.sep_str ++ "ucrt_wscanf.c",
801 "stdio" ++ path.sep_str ++ "ucrt_vwprintf.c",
802 "stdio" ++ path.sep_str ++ "ucrt_wprintf.c",
803 "string" ++ path.sep_str ++ "ucrt__wcstok.c",
804 // uuid
805 "libsrc" ++ path.sep_str ++ "ativscp-uuid.c",
806 "libsrc" ++ path.sep_str ++ "atsmedia-uuid.c",
807 "libsrc" ++ path.sep_str ++ "bth-uuid.c",
808 "libsrc" ++ path.sep_str ++ "cguid-uuid.c",
809 "libsrc" ++ path.sep_str ++ "comcat-uuid.c",
810 "libsrc" ++ path.sep_str ++ "ctxtcall-uuid.c",
811 "libsrc" ++ path.sep_str ++ "devguid.c",
812 "libsrc" ++ path.sep_str ++ "docobj-uuid.c",
813 "libsrc" ++ path.sep_str ++ "dxva-uuid.c",
814 "libsrc" ++ path.sep_str ++ "exdisp-uuid.c",
815 "libsrc" ++ path.sep_str ++ "extras-uuid.c",
816 "libsrc" ++ path.sep_str ++ "fwp-uuid.c",
817 "libsrc" ++ path.sep_str ++ "guid_nul.c",
818 "libsrc" ++ path.sep_str ++ "hlguids-uuid.c",
819 "libsrc" ++ path.sep_str ++ "hlink-uuid.c",
820 "libsrc" ++ path.sep_str ++ "mlang-uuid.c",
821 "libsrc" ++ path.sep_str ++ "msctf-uuid.c",
822 "libsrc" ++ path.sep_str ++ "mshtmhst-uuid.c",
823 "libsrc" ++ path.sep_str ++ "mshtml-uuid.c",
824 "libsrc" ++ path.sep_str ++ "msxml-uuid.c",
825 "libsrc" ++ path.sep_str ++ "netcfg-uuid.c",
826 "libsrc" ++ path.sep_str ++ "netcon-uuid.c",
827 "libsrc" ++ path.sep_str ++ "ntddkbd-uuid.c",
828 "libsrc" ++ path.sep_str ++ "ntddmou-uuid.c",
829 "libsrc" ++ path.sep_str ++ "ntddpar-uuid.c",
830 "libsrc" ++ path.sep_str ++ "ntddscsi-uuid.c",
831 "libsrc" ++ path.sep_str ++ "ntddser-uuid.c",
832 "libsrc" ++ path.sep_str ++ "ntddstor-uuid.c",
833 "libsrc" ++ path.sep_str ++ "ntddvdeo-uuid.c",
834 "libsrc" ++ path.sep_str ++ "oaidl-uuid.c",
835 "libsrc" ++ path.sep_str ++ "objidl-uuid.c",
836 "libsrc" ++ path.sep_str ++ "objsafe-uuid.c",
837 "libsrc" ++ path.sep_str ++ "ocidl-uuid.c",
838 "libsrc" ++ path.sep_str ++ "oleacc-uuid.c",
839 "libsrc" ++ path.sep_str ++ "olectlid-uuid.c",
840 "libsrc" ++ path.sep_str ++ "oleidl-uuid.c",
841 "libsrc" ++ path.sep_str ++ "power-uuid.c",
842 "libsrc" ++ path.sep_str ++ "powrprof-uuid.c",
843 "libsrc" ++ path.sep_str ++ "uianimation-uuid.c",
844 "libsrc" ++ path.sep_str ++ "usbcamdi-uuid.c",
845 "libsrc" ++ path.sep_str ++ "usbiodef-uuid.c",
846 "libsrc" ++ path.sep_str ++ "uuid.c",
847 "libsrc" ++ path.sep_str ++ "vds-uuid.c",
848 "libsrc" ++ path.sep_str ++ "virtdisk-uuid.c",
849 "libsrc" ++ path.sep_str ++ "vss-uuid.c",
850 "libsrc" ++ path.sep_str ++ "wia-uuid.c",
851 "libsrc" ++ path.sep_str ++ "windowscodecs.c",
852 // ws2_32
853 "libsrc" ++ path.sep_str ++ "ws2_32.c",
854 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_addr_equal.c",
855 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6addr_isany.c",
856 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6addr_isloopback.c",
857 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6addr_setany.c",
858 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6addr_setloopback.c",
859 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_linklocal.c",
860 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_loopback.c",
861 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_mc_global.c",
862 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_mc_linklocal.c",
863 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_mc_nodelocal.c",
864 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_mc_orglocal.c",
865 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_mc_sitelocal.c",
866 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_multicast.c",
867 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_sitelocal.c",
868 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_unspecified.c",
869 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_v4compat.c",
870 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_is_addr_v4mapped.c",
871 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_set_addr_loopback.c",
872 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "in6_set_addr_unspecified.c",
873 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "gai_strerrorA.c",
874 "libsrc" ++ path.sep_str ++ "ws2tcpip" ++ path.sep_str ++ "gai_strerrorW.c",
875 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiStrdup.c",
876 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiParseV4Address.c",
877 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiNewAddrInfo.c",
878 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiQueryDNS.c",
879 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiLookupNode.c",
880 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiClone.c",
881 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiLegacyFreeAddrInfo.c",
882 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiLegacyGetAddrInfo.c",
883 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiLegacyGetNameInfo.c",
884 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiLoad.c",
885 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiGetAddrInfo.c",
886 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiGetNameInfo.c",
887 "libsrc" ++ path.sep_str ++ "wspiapi" ++ path.sep_str ++ "WspiapiFreeAddrInfo.c",
888 // dinput
889 "libsrc" ++ path.sep_str ++ "dinput_kbd.c",
890 "libsrc" ++ path.sep_str ++ "dinput_joy.c",
891 "libsrc" ++ path.sep_str ++ "dinput_joy2.c",
892 "libsrc" ++ path.sep_str ++ "dinput_mouse.c",
893 "libsrc" ++ path.sep_str ++ "dinput_mouse2.c",
894 // dloadhelper
895 "libsrc" ++ path.sep_str ++ "dloadhelper.c",
896 "misc" ++ path.sep_str ++ "delay-f.c",
897 // misc.
898 "libsrc" ++ path.sep_str ++ "bits.c",
899 "libsrc" ++ path.sep_str ++ "shell32.c",
900 "libsrc" ++ path.sep_str ++ "dmoguids.c",
901 "libsrc" ++ path.sep_str ++ "dxerr8.c",
902 "libsrc" ++ path.sep_str ++ "dxerr8w.c",
903 "libsrc" ++ path.sep_str ++ "dxerr9.c",
904 "libsrc" ++ path.sep_str ++ "dxerr9w.c",
905 "libsrc" ++ path.sep_str ++ "mfuuid.c",
906 "libsrc" ++ path.sep_str ++ "msxml2.c",
907 "libsrc" ++ path.sep_str ++ "msxml6.c",
908 "libsrc" ++ path.sep_str ++ "amstrmid.c",
909 "libsrc" ++ path.sep_str ++ "wbemuuid.c",
910 "libsrc" ++ path.sep_str ++ "wmcodecdspuuid.c",
911 "libsrc" ++ path.sep_str ++ "windowscodecs.c",
912 "libsrc" ++ path.sep_str ++ "dxguid.c",
913 "libsrc" ++ path.sep_str ++ "ksuser.c",
914 "libsrc" ++ path.sep_str ++ "largeint.c",
915 "libsrc" ++ path.sep_str ++ "locationapi.c",
916 "libsrc" ++ path.sep_str ++ "sapi.c",
917 "libsrc" ++ path.sep_str ++ "sensorsapi.c",
918 "libsrc" ++ path.sep_str ++ "portabledeviceguids.c",
919 "libsrc" ++ path.sep_str ++ "taskschd.c",
920 "libsrc" ++ path.sep_str ++ "strmiids.c",
921 "libsrc" ++ path.sep_str ++ "gdiplus.c",
922 "libsrc" ++ path.sep_str ++ "activeds-uuid.c",
923};
924
925const mingw32_x86_src = [_][]const u8{
926 // mingw32
927 "crt" ++ path.sep_str ++ "CRT_fp10.c",
928 // mingwex
929 "math" ++ path.sep_str ++ "cbrtl.c",
930 "math" ++ path.sep_str ++ "erfl.c",
931 "math" ++ path.sep_str ++ "fdiml.c",
932 "math" ++ path.sep_str ++ "fmal.c",
933 "math" ++ path.sep_str ++ "fmaxl.c",
934 "math" ++ path.sep_str ++ "fminl.c",
935 "math" ++ path.sep_str ++ "llrintl.c",
936 "math" ++ path.sep_str ++ "llroundl.c",
937 "math" ++ path.sep_str ++ "lrintl.c",
938 "math" ++ path.sep_str ++ "lroundl.c",
939 "math" ++ path.sep_str ++ "rintl.c",
940 "math" ++ path.sep_str ++ "roundl.c",
941 "math" ++ path.sep_str ++ "tgammal.c",
942 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "_chgsignl.S",
943 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acoshl.c",
944 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acosl.c",
945 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "asinhl.c",
946 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "asinl.c",
947 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atan2l.c",
948 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanhl.c",
949 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanl.c",
950 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "copysignl.S",
951 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl.c",
952 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl_internal.S",
953 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cossinl.c",
954 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "exp2l.S",
955 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expl.c",
956 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expm1l.c",
957 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "fmodl.c",
958 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "fucom.c",
959 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "ilogbl.S",
960 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "internal_logl.S",
961 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "ldexp.c",
962 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "ldexpl.c",
963 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "log10l.S",
964 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "log1pl.S",
965 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "log2l.S",
966 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "logbl.c",
967 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "logl.c",
968 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "nearbyintl.S",
969 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "powl.c",
970 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "remainderl.S",
971 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "remquol.S",
972 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbn.S",
973 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbnf.S",
974 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbnl.S",
975 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "sinl.c",
976 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "sinl_internal.S",
977 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "tanl.S",
978 // ucrtbase
979 "math" ++ path.sep_str ++ "nextafterl.c",
980 "math" ++ path.sep_str ++ "nexttoward.c",
981 "math" ++ path.sep_str ++ "nexttowardf.c",
982};
983
984const mingw32_x86_32_src = [_][]const u8{
985 // ucrtbase
986 "math" ++ path.sep_str ++ "coshf.c",
987 "math" ++ path.sep_str ++ "expf.c",
988 "math" ++ path.sep_str ++ "log10f.c",
989 "math" ++ path.sep_str ++ "logf.c",
990 "math" ++ path.sep_str ++ "modff.c",
991 "math" ++ path.sep_str ++ "powf.c",
992 "math" ++ path.sep_str ++ "sinhf.c",
993 "math" ++ path.sep_str ++ "sqrtf.c",
994 "math" ++ path.sep_str ++ "tanhf.c",
995 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acosf.c",
996 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "asinf.c",
997 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atan2f.c",
998 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanf.c",
999 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "fmodf.c",
1000};
1001
1002const mingw32_arm_src = [_][]const u8{
1003 // mingwex
1004 "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "ldexpl.c",
1005 "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "sincosl.c",
1006};
1007
1008const mingw32_arm32_src = [_][]const u8{
1009 // mingwex
1010 "math" ++ path.sep_str ++ "arm" ++ path.sep_str ++ "s_rint.c",
1011 "math" ++ path.sep_str ++ "arm" ++ path.sep_str ++ "s_rintf.c",
1012 "math" ++ path.sep_str ++ "arm" ++ path.sep_str ++ "sincos.S",
1013};
1014
1015const mingw32_arm64_src = [_][]const u8{
1016 // mingwex
1017 "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "rint.c",
1018 "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "rintf.c",
1019 "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "sincos.S",
1020};
1021
1022const mingw32_winpthreads_src = [_][]const u8{
1023 // winpthreads
1024 "winpthreads" ++ path.sep_str ++ "barrier.c",
1025 "winpthreads" ++ path.sep_str ++ "clock.c",
1026 "winpthreads" ++ path.sep_str ++ "cond.c",
1027 "winpthreads" ++ path.sep_str ++ "misc.c",
1028 "winpthreads" ++ path.sep_str ++ "mutex.c",
1029 "winpthreads" ++ path.sep_str ++ "nanosleep.c",
1030 "winpthreads" ++ path.sep_str ++ "rwlock.c",
1031 "winpthreads" ++ path.sep_str ++ "sched.c",
1032 "winpthreads" ++ path.sep_str ++ "sem.c",
1033 "winpthreads" ++ path.sep_str ++ "spinlock.c",
1034 "winpthreads" ++ path.sep_str ++ "thread.c",
1035};
1036
1037pub const always_link_libs = [_][]const u8{
1038 "api-ms-win-crt-conio-l1-1-0",
1039 "api-ms-win-crt-convert-l1-1-0",
1040 "api-ms-win-crt-environment-l1-1-0",
1041 "api-ms-win-crt-filesystem-l1-1-0",
1042 "api-ms-win-crt-heap-l1-1-0",
1043 "api-ms-win-crt-locale-l1-1-0",
1044 "api-ms-win-crt-math-l1-1-0",
1045 "api-ms-win-crt-multibyte-l1-1-0",
1046 "api-ms-win-crt-private-l1-1-0",
1047 "api-ms-win-crt-process-l1-1-0",
1048 "api-ms-win-crt-runtime-l1-1-0",
1049 "api-ms-win-crt-stdio-l1-1-0",
1050 "api-ms-win-crt-string-l1-1-0",
1051 "api-ms-win-crt-time-l1-1-0",
1052 "api-ms-win-crt-utility-l1-1-0",
1053 "advapi32",
1054 "kernel32",
1055 "ntdll",
1056 "shell32",
1057 "user32",
1058};