File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,9 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
333333 ])
334334 end
335335 end
336+ if Sys. iswindows (p)
337+ windows_cflags! (p, flags)
338+ end
336339 return flags
337340 end
338341
@@ -458,6 +461,16 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
458461 return flags
459462 end
460463
464+ function windows_cflags! (p:: AbstractPlatform , flags:: Vector{String} = String[])
465+ # Declare that we are Windows 10 (0x0A00)
466+ # https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
467+ append! (flags, [
468+ " -DWINVER=0x0A00" ,
469+ " -D_WIN32_WINNT=0x0A00" ,
470+ ])
471+ return flags
472+ end
473+
461474 function gcc_flags! (p:: AbstractPlatform , flags:: Vector{String} = String[])
462475 # Force proper cxx11 string ABI usage w00t w00t!
463476 if cxxstring_abi (p) == " cxx11"
@@ -478,6 +491,11 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
478491 if Sys. isapple (p)
479492 macos_gcc_flags! (p, flags)
480493 end
494+
495+ if Sys. iswindows (p)
496+ windows_cflags! (p, flags)
497+ end
498+
481499 return flags
482500 end
483501
You can’t perform that action at this time.
0 commit comments