| ... | ... | @@ -81,7 +81,7 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 81 | 81 | .owner = undefined, |
| 82 | 82 | }); |
| 83 | 83 | } |
| 84 | | if (target.cpu.arch == .x86 or target.cpu.arch == .x86_64) { |
| 84 | if (target.cpu.arch.isX86()) { |
| 85 | 85 | for (mingw32_x86_src) |dep| { |
| 86 | 86 | try c_source_files.append(.{ |
| 87 | 87 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ |
| ... | ... | @@ -103,6 +103,15 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | } else if (target.cpu.arch.isThumb()) { |
| 106 | for (mingw32_arm_src) |dep| { |
| 107 | try c_source_files.append(.{ |
| 108 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ |
| 109 | "libc", "mingw", dep, |
| 110 | }), |
| 111 | .extra_flags = args.items, |
| 112 | .owner = undefined, |
| 113 | }); |
| 114 | } |
| 106 | 115 | for (mingw32_arm32_src) |dep| { |
| 107 | 116 | try c_source_files.append(.{ |
| 108 | 117 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ |
| ... | ... | @@ -113,6 +122,15 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre |
| 113 | 122 | }); |
| 114 | 123 | } |
| 115 | 124 | } else if (target.cpu.arch.isAARCH64()) { |
| 125 | for (mingw32_arm_src) |dep| { |
| 126 | try c_source_files.append(.{ |
| 127 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ |
| 128 | "libc", "mingw", dep, |
| 129 | }), |
| 130 | .extra_flags = args.items, |
| 131 | .owner = undefined, |
| 132 | }); |
| 133 | } |
| 116 | 134 | for (mingw32_arm64_src) |dep| { |
| 117 | 135 | try c_source_files.append(.{ |
| 118 | 136 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ |
| ... | ... | @@ -488,8 +506,6 @@ const mingw32_generic_src = [_][]const u8{ |
| 488 | 506 | "complex" ++ path.sep_str ++ "ctan.c", |
| 489 | 507 | "complex" ++ path.sep_str ++ "ctanf.c", |
| 490 | 508 | "complex" ++ path.sep_str ++ "ctanl.c", |
| 491 | | "crt" ++ path.sep_str ++ "dllentry.c", |
| 492 | | "crt" ++ path.sep_str ++ "dllmain.c", |
| 493 | 509 | "gdtoa" ++ path.sep_str ++ "arithchk.c", |
| 494 | 510 | "gdtoa" ++ path.sep_str ++ "dmisc.c", |
| 495 | 511 | "gdtoa" ++ path.sep_str ++ "dtoa.c", |
| ... | ... | @@ -531,8 +547,6 @@ const mingw32_generic_src = [_][]const u8{ |
| 531 | 547 | "math" ++ path.sep_str ++ "lgammaf.c", |
| 532 | 548 | "math" ++ path.sep_str ++ "lgammal.c", |
| 533 | 549 | "math" ++ path.sep_str ++ "modfl.c", |
| 534 | | "math" ++ path.sep_str ++ "nextafterl.c", |
| 535 | | "math" ++ path.sep_str ++ "nexttoward.c", |
| 536 | 550 | "math" ++ path.sep_str ++ "powi.c", |
| 537 | 551 | "math" ++ path.sep_str ++ "powif.c", |
| 538 | 552 | "math" ++ path.sep_str ++ "powil.c", |
| ... | ... | @@ -550,6 +564,8 @@ const mingw32_generic_src = [_][]const u8{ |
| 550 | 564 | "misc" ++ path.sep_str ++ "delayimp.c", |
| 551 | 565 | "misc" ++ path.sep_str ++ "dirent.c", |
| 552 | 566 | "misc" ++ path.sep_str ++ "dirname.c", |
| 567 | "misc" ++ path.sep_str ++ "dllentrypoint.c", |
| 568 | "misc" ++ path.sep_str ++ "dllmain.c", |
| 553 | 569 | "misc" ++ path.sep_str ++ "feclearexcept.c", |
| 554 | 570 | "misc" ++ path.sep_str ++ "fegetenv.c", |
| 555 | 571 | "misc" ++ path.sep_str ++ "fegetexceptflag.c", |
| ... | ... | @@ -611,9 +627,7 @@ const mingw32_generic_src = [_][]const u8{ |
| 611 | 627 | "stdio" ++ path.sep_str ++ "_Exit.c", |
| 612 | 628 | "stdio" ++ path.sep_str ++ "_findfirst64i32.c", |
| 613 | 629 | "stdio" ++ path.sep_str ++ "_findnext64i32.c", |
| 614 | | "stdio" ++ path.sep_str ++ "_fstat.c", |
| 615 | 630 | "stdio" ++ path.sep_str ++ "_fstat64i32.c", |
| 616 | | "stdio" ++ path.sep_str ++ "_ftime.c", |
| 617 | 631 | "stdio" ++ path.sep_str ++ "_stat.c", |
| 618 | 632 | "stdio" ++ path.sep_str ++ "_stat64i32.c", |
| 619 | 633 | "stdio" ++ path.sep_str ++ "_wfindfirst64i32.c", |
| ... | ... | @@ -621,11 +635,9 @@ const mingw32_generic_src = [_][]const u8{ |
| 621 | 635 | "stdio" ++ path.sep_str ++ "_wstat.c", |
| 622 | 636 | "stdio" ++ path.sep_str ++ "_wstat64i32.c", |
| 623 | 637 | "stdio" ++ path.sep_str ++ "asprintf.c", |
| 624 | | "stdio" ++ path.sep_str ++ "fgetpos64.c", |
| 625 | 638 | "stdio" ++ path.sep_str ++ "fopen64.c", |
| 626 | 639 | "stdio" ++ path.sep_str ++ "fseeko32.c", |
| 627 | 640 | "stdio" ++ path.sep_str ++ "fseeko64.c", |
| 628 | | "stdio" ++ path.sep_str ++ "fsetpos64.c", |
| 629 | 641 | "stdio" ++ path.sep_str ++ "ftello.c", |
| 630 | 642 | "stdio" ++ path.sep_str ++ "ftello64.c", |
| 631 | 643 | "stdio" ++ path.sep_str ++ "ftruncate64.c", |
| ... | ... | @@ -685,11 +697,24 @@ const mingw32_generic_src = [_][]const u8{ |
| 685 | 697 | "stdio" ++ path.sep_str ++ "vwscanf.c", |
| 686 | 698 | "stdio" ++ path.sep_str ++ "vwscanf2.S", |
| 687 | 699 | "stdio" ++ path.sep_str ++ "wtoll.c", |
| 700 | // mingwthrd |
| 701 | "libsrc" ++ path.sep_str ++ "mingwthrd_mt.c", |
| 688 | 702 | // ucrtbase |
| 689 | | "crt" ++ path.sep_str ++ "ucrtbase_compat.c", |
| 690 | 703 | "math" ++ path.sep_str ++ "_huge.c", |
| 691 | 704 | "misc" ++ path.sep_str ++ "__initenv.c", |
| 705 | "misc" ++ path.sep_str ++ "__winitenv.c", |
| 706 | "misc" ++ path.sep_str ++ "__p___initenv.c", |
| 707 | "misc" ++ path.sep_str ++ "__p___winitenv.c", |
| 708 | "misc" ++ path.sep_str ++ "_onexit.c", |
| 692 | 709 | "misc" ++ path.sep_str ++ "ucrt-access.c", |
| 710 | "misc" ++ path.sep_str ++ "ucrt__getmainargs.c", |
| 711 | "misc" ++ path.sep_str ++ "ucrt__wgetmainargs.c", |
| 712 | "misc" ++ path.sep_str ++ "ucrt_amsg_exit.c", |
| 713 | "misc" ++ path.sep_str ++ "ucrt_at_quick_exit.c", |
| 714 | "misc" ++ path.sep_str ++ "ucrt_tzset.c", |
| 715 | "stdio" ++ path.sep_str ++ "ucrt__scprintf.c", |
| 716 | "stdio" ++ path.sep_str ++ "ucrt__snprintf.c", |
| 717 | "stdio" ++ path.sep_str ++ "ucrt__snscanf.c", |
| 693 | 718 | "stdio" ++ path.sep_str ++ "ucrt__snwprintf.c", |
| 694 | 719 | "stdio" ++ path.sep_str ++ "ucrt__vscprintf.c", |
| 695 | 720 | "stdio" ++ path.sep_str ++ "ucrt__vsnprintf.c", |
| ... | ... | @@ -697,6 +722,7 @@ const mingw32_generic_src = [_][]const u8{ |
| 697 | 722 | "stdio" ++ path.sep_str ++ "ucrt_fprintf.c", |
| 698 | 723 | "stdio" ++ path.sep_str ++ "ucrt_fscanf.c", |
| 699 | 724 | "stdio" ++ path.sep_str ++ "ucrt_fwprintf.c", |
| 725 | "stdio" ++ path.sep_str ++ "ucrt_ms_fwprintf.c", |
| 700 | 726 | "stdio" ++ path.sep_str ++ "ucrt_printf.c", |
| 701 | 727 | "stdio" ++ path.sep_str ++ "ucrt_scanf.c", |
| 702 | 728 | "stdio" ++ path.sep_str ++ "ucrt_snprintf.c", |
| ... | ... | @@ -709,6 +735,20 @@ const mingw32_generic_src = [_][]const u8{ |
| 709 | 735 | "stdio" ++ path.sep_str ++ "ucrt_vsnprintf.c", |
| 710 | 736 | "stdio" ++ path.sep_str ++ "ucrt_vsprintf.c", |
| 711 | 737 | "stdio" ++ path.sep_str ++ "ucrt_vsscanf.c", |
| 738 | "string" ++ path.sep_str ++ "ucrt__wcstok.c", |
| 739 | // winpthreads |
| 740 | "winpthreads" ++ path.sep_str ++ "barrier.c", |
| 741 | "winpthreads" ++ path.sep_str ++ "clock.c", |
| 742 | "winpthreads" ++ path.sep_str ++ "cond.c", |
| 743 | "winpthreads" ++ path.sep_str ++ "misc.c", |
| 744 | "winpthreads" ++ path.sep_str ++ "mutex.c", |
| 745 | "winpthreads" ++ path.sep_str ++ "nanosleep.c", |
| 746 | "winpthreads" ++ path.sep_str ++ "ref.c", |
| 747 | "winpthreads" ++ path.sep_str ++ "rwlock.c", |
| 748 | "winpthreads" ++ path.sep_str ++ "sched.c", |
| 749 | "winpthreads" ++ path.sep_str ++ "sem.c", |
| 750 | "winpthreads" ++ path.sep_str ++ "spinlock.c", |
| 751 | "winpthreads" ++ path.sep_str ++ "thread.c", |
| 712 | 752 | // uuid |
| 713 | 753 | "libsrc" ++ path.sep_str ++ "ativscp-uuid.c", |
| 714 | 754 | "libsrc" ++ path.sep_str ++ "atsmedia-uuid.c", |
| ... | ... | @@ -819,11 +859,13 @@ const mingw32_generic_src = [_][]const u8{ |
| 819 | 859 | "libsrc" ++ path.sep_str ++ "windowscodecs.c", |
| 820 | 860 | "libsrc" ++ path.sep_str ++ "dxguid.c", |
| 821 | 861 | "libsrc" ++ path.sep_str ++ "ksuser.c", |
| 862 | "libsrc" ++ path.sep_str ++ "largeint.c", |
| 822 | 863 | "libsrc" ++ path.sep_str ++ "locationapi.c", |
| 823 | 864 | "libsrc" ++ path.sep_str ++ "sapi.c", |
| 824 | 865 | "libsrc" ++ path.sep_str ++ "sensorsapi.c", |
| 825 | 866 | "libsrc" ++ path.sep_str ++ "portabledeviceguids.c", |
| 826 | 867 | "libsrc" ++ path.sep_str ++ "taskschd.c", |
| 868 | "libsrc" ++ path.sep_str ++ "scrnsave.c", |
| 827 | 869 | "libsrc" ++ path.sep_str ++ "strmiids.c", |
| 828 | 870 | "libsrc" ++ path.sep_str ++ "gdiplus.c", |
| 829 | 871 | "libsrc" ++ path.sep_str ++ "activeds-uuid.c", |
| ... | ... | @@ -845,6 +887,7 @@ const mingw32_x86_src = [_][]const u8{ |
| 845 | 887 | "math" ++ path.sep_str ++ "roundl.c", |
| 846 | 888 | "math" ++ path.sep_str ++ "tgammal.c", |
| 847 | 889 | "math" ++ path.sep_str ++ "truncl.c", |
| 890 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "_chgsignl.S", |
| 848 | 891 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acoshl.c", |
| 849 | 892 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "acosl.c", |
| 850 | 893 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "asinhl.c", |
| ... | ... | @@ -853,7 +896,6 @@ const mingw32_x86_src = [_][]const u8{ |
| 853 | 896 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanhl.c", |
| 854 | 897 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanl.c", |
| 855 | 898 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "ceill.S", |
| 856 | | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "_chgsignl.S", |
| 857 | 899 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "copysignl.S", |
| 858 | 900 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl.c", |
| 859 | 901 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "cosl_internal.S", |
| ... | ... | @@ -877,18 +919,21 @@ const mingw32_x86_src = [_][]const u8{ |
| 877 | 919 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "powl.c", |
| 878 | 920 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "remainderl.S", |
| 879 | 921 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "remquol.S", |
| 922 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbn.S", |
| 880 | 923 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbnf.S", |
| 881 | 924 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbnl.S", |
| 882 | | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "scalbn.S", |
| 883 | 925 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "sinl.c", |
| 884 | 926 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "sinl_internal.S", |
| 885 | 927 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "tanl.S", |
| 886 | 928 | // ucrtbase |
| 887 | 929 | "math" ++ path.sep_str ++ "fabsf.c", |
| 930 | "math" ++ path.sep_str ++ "nextafterl.c", |
| 931 | "math" ++ path.sep_str ++ "nexttoward.c", |
| 888 | 932 | "math" ++ path.sep_str ++ "nexttowardf.c", |
| 889 | 933 | }; |
| 890 | 934 | |
| 891 | 935 | const mingw32_x86_32_src = [_][]const u8{ |
| 936 | // ucrtbase |
| 892 | 937 | "math" ++ path.sep_str ++ "coshf.c", |
| 893 | 938 | "math" ++ path.sep_str ++ "expf.c", |
| 894 | 939 | "math" ++ path.sep_str ++ "log10f.c", |
| ... | ... | @@ -910,8 +955,13 @@ const mingw32_x86_32_src = [_][]const u8{ |
| 910 | 955 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "tanf.c", |
| 911 | 956 | }; |
| 912 | 957 | |
| 913 | | const mingw32_arm32_src = [_][]const u8{ |
| 958 | const mingw32_arm_src = [_][]const u8{ |
| 959 | // mingwex |
| 914 | 960 | "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "ldexpl.c", |
| 961 | }; |
| 962 | |
| 963 | const mingw32_arm32_src = [_][]const u8{ |
| 964 | // mingwex |
| 915 | 965 | "math" ++ path.sep_str ++ "arm" ++ path.sep_str ++ "_chgsignl.S", |
| 916 | 966 | "math" ++ path.sep_str ++ "arm" ++ path.sep_str ++ "s_rint.c", |
| 917 | 967 | "math" ++ path.sep_str ++ "arm" ++ path.sep_str ++ "s_rintf.c", |
| ... | ... | @@ -920,7 +970,7 @@ const mingw32_arm32_src = [_][]const u8{ |
| 920 | 970 | }; |
| 921 | 971 | |
| 922 | 972 | const mingw32_arm64_src = [_][]const u8{ |
| 923 | | "math" ++ path.sep_str ++ "arm-common" ++ path.sep_str ++ "ldexpl.c", |
| 973 | // mingwex |
| 924 | 974 | "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "_chgsignl.S", |
| 925 | 975 | "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "rint.c", |
| 926 | 976 | "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "rintf.c", |