| author | |
| committer | |
| log | b498d26376cc46481f06f09f5f8eaf32ce81801f |
| tree | 2fa5fe0a24e9f98c520aaea30864f85e9895f0cc |
| parent | d3f1a4edce3f67568ab1e4bf359069e3129e14fa |
This was brought to the horizon when using zig-bootstrap to cross compile
Zig for windows-gnu.2 files changed, 4 insertions(+), 13 deletions(-)
src/stage1/os.cpp-13| ... | @@ -682,19 +682,6 @@ static Error copy_open_files(FILE *src_f, FILE *dest_f) { | ... | @@ -682,19 +682,6 @@ static Error copy_open_files(FILE *src_f, FILE *dest_f) { |
| 682 | } | 682 | } |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | #if defined(ZIG_OS_WINDOWS) | ||
| 686 | static void windows_filetime_to_os_timestamp(FILETIME *ft, OsTimeStamp *mtime) { | ||
| 687 | mtime->sec = (((ULONGLONG) ft->dwHighDateTime) << 32) + ft->dwLowDateTime; | ||
| 688 | mtime->nsec = 0; | ||
| 689 | } | ||
| 690 | static FILETIME windows_os_timestamp_to_filetime(OsTimeStamp mtime) { | ||
| 691 | FILETIME result; | ||
| 692 | result.dwHighDateTime = mtime.sec >> 32; | ||
| 693 | result.dwLowDateTime = mtime.sec; | ||
| 694 | return result; | ||
| 695 | } | ||
| 696 | #endif | ||
| 697 | |||
| 698 | Error os_copy_file(Buf *src_path, Buf *dest_path) { | 685 | Error os_copy_file(Buf *src_path, Buf *dest_path) { |
| 699 | #if defined(ZIG_OS_WINDOWS) | 686 | #if defined(ZIG_OS_WINDOWS) |
| 700 | PathSpace src_path_space = slice_to_prefixed_file_w(buf_to_slice(src_path)); | 687 | PathSpace src_path_space = slice_to_prefixed_file_w(buf_to_slice(src_path)); |
src/zig_llvm.cpp+4| ... | @@ -1062,6 +1062,7 @@ bool ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_ | ... | @@ -1062,6 +1062,7 @@ bool ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_ |
| 1062 | case ZigLLVM_UnknownObjectFormat: | 1062 | case ZigLLVM_UnknownObjectFormat: |
| 1063 | case ZigLLVM_XCOFF: | 1063 | case ZigLLVM_XCOFF: |
| 1064 | assert(false); // unreachable | 1064 | assert(false); // unreachable |
| 1065 | break; | ||
| 1065 | 1066 | ||
| 1066 | case ZigLLVM_COFF: | 1067 | case ZigLLVM_COFF: |
| 1067 | return lld::coff::link(array_ref_args, false, diag_stdout, diag_stderr); | 1068 | return lld::coff::link(array_ref_args, false, diag_stdout, diag_stderr); |
| ... | @@ -1074,6 +1075,9 @@ bool ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_ | ... | @@ -1074,6 +1075,9 @@ bool ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_ |
| 1074 | 1075 | ||
| 1075 | case ZigLLVM_Wasm: | 1076 | case ZigLLVM_Wasm: |
| 1076 | return lld::wasm::link(array_ref_args, false, diag_stdout, diag_stderr); | 1077 | return lld::wasm::link(array_ref_args, false, diag_stdout, diag_stderr); |
| 1078 | |||
| 1079 | default: | ||
| 1080 | break; | ||
| 1077 | } | 1081 | } |
| 1078 | assert(false); // unreachable | 1082 | assert(false); // unreachable |
| 1079 | abort(); | 1083 | abort(); |