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
333
333
])
334
334
end
335
335
end
336
+ if Sys. iswindows (p)
337
+ windows_cflags! (p, flags)
338
+ end
336
339
return flags
337
340
end
338
341
@@ -458,6 +461,16 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
458
461
return flags
459
462
end
460
463
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
+
461
474
function gcc_flags! (p:: AbstractPlatform , flags:: Vector{String} = String[])
462
475
# Force proper cxx11 string ABI usage w00t w00t!
463
476
if cxxstring_abi (p) == " cxx11"
@@ -478,6 +491,11 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
478
491
if Sys. isapple (p)
479
492
macos_gcc_flags! (p, flags)
480
493
end
494
+
495
+ if Sys. iswindows (p)
496
+ windows_cflags! (p, flags)
497
+ end
498
+
481
499
return flags
482
500
end
483
501
You can’t perform that action at this time.
0 commit comments