authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-08 00:02:33-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-08 11:52:38-07:00
logf5ed441ddbd9125f902d0b6c8551a16679ba1ebd
treec2eebde939c8e3964c336ba467938d195300ba69
parent9df0177f334ea02dc8c269b662edb3c013c7ffff

mingw: add the build logic for the previous commit

Separate commits for the zig logic and the copied files.

1 files changed, 34 insertions(+), 1 deletions(-)

src/mingw.zig+34-1
......@@ -33,6 +33,9 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile, prog_node: *std.Progr
3333 try args.appendSlice(&[_][]const u8{
3434 "-D_SYSCRT=1",
3535 "-DCRTDLL=1",
36 // Prevents warning: 'used' attribute ignored on a non-definition declaration
37 // pointing at extern _CRTALLOC
38 "-Wno-ignored-attributes",
3639 // Uncommenting this makes mingw-w64 look for wmain instead of main.
3740 //"-DUNICODE",
3841 //"-D_UNICODE",
......@@ -753,9 +756,9 @@ const mingwex_generic_src = [_][]const u8{
753756 "stdio" ++ path.sep_str ++ "atoll.c",
754757 "stdio" ++ path.sep_str ++ "fgetpos64.c",
755758 "stdio" ++ path.sep_str ++ "fopen64.c",
759 "stdio" ++ path.sep_str ++ "fseeki64.c",
756760 "stdio" ++ path.sep_str ++ "fseeko32.c",
757761 "stdio" ++ path.sep_str ++ "fseeko64.c",
758 "stdio" ++ path.sep_str ++ "fseeki64.c",
759762 "stdio" ++ path.sep_str ++ "fsetpos64.c",
760763 "stdio" ++ path.sep_str ++ "ftello.c",
761764 "stdio" ++ path.sep_str ++ "ftello64.c",
......@@ -763,6 +766,36 @@ const mingwex_generic_src = [_][]const u8{
763766 "stdio" ++ path.sep_str ++ "lltoa.c",
764767 "stdio" ++ path.sep_str ++ "lltow.c",
765768 "stdio" ++ path.sep_str ++ "lseek64.c",
769 "stdio" ++ path.sep_str ++ "mingw_asprintf.c",
770 "stdio" ++ path.sep_str ++ "mingw_dummy__lock.c",
771 "stdio" ++ path.sep_str ++ "mingw_fprintf.c",
772 "stdio" ++ path.sep_str ++ "mingw_fprintfw.c",
773 "stdio" ++ path.sep_str ++ "mingw_fscanf.c",
774 "stdio" ++ path.sep_str ++ "mingw_fwscanf.c",
775 "stdio" ++ path.sep_str ++ "mingw_lock.c",
776 "stdio" ++ path.sep_str ++ "mingw_pformat.c",
777 "stdio" ++ path.sep_str ++ "mingw_pformatw.c",
778 "stdio" ++ path.sep_str ++ "mingw_printf.c",
779 "stdio" ++ path.sep_str ++ "mingw_printfw.c",
780 "stdio" ++ path.sep_str ++ "mingw_scanf.c",
781 "stdio" ++ path.sep_str ++ "mingw_snprintf.c",
782 "stdio" ++ path.sep_str ++ "mingw_snprintfw.c",
783 "stdio" ++ path.sep_str ++ "mingw_sprintf.c",
784 "stdio" ++ path.sep_str ++ "mingw_sprintfw.c",
785 "stdio" ++ path.sep_str ++ "mingw_sscanf.c",
786 "stdio" ++ path.sep_str ++ "mingw_swscanf.c",
787 "stdio" ++ path.sep_str ++ "mingw_vasprintf.c",
788 "stdio" ++ path.sep_str ++ "mingw_vfprintf.c",
789 "stdio" ++ path.sep_str ++ "mingw_vfprintfw.c",
790 "stdio" ++ path.sep_str ++ "mingw_vfscanf.c",
791 "stdio" ++ path.sep_str ++ "mingw_vprintf.c",
792 "stdio" ++ path.sep_str ++ "mingw_vprintfw.c",
793 "stdio" ++ path.sep_str ++ "mingw_vsnprintf.c",
794 "stdio" ++ path.sep_str ++ "mingw_vsnprintfw.c",
795 "stdio" ++ path.sep_str ++ "mingw_vsprintf.c",
796 "stdio" ++ path.sep_str ++ "mingw_vsprintfw.c",
797 "stdio" ++ path.sep_str ++ "mingw_wscanf.c",
798 "stdio" ++ path.sep_str ++ "mingw_wvfscanf.c",
766799 "stdio" ++ path.sep_str ++ "scanf.S",
767800 "stdio" ++ path.sep_str ++ "snprintf.c",
768801 "stdio" ++ path.sep_str ++ "snwprintf.c",