File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ def default_build_triple():
184
184
ostype = require (["uname" , "-s" ], exit = required )
185
185
cputype = require (['uname' , '-m' ], exit = required )
186
186
187
+ # If we do not have `uname`, assume Windows.
187
188
if ostype is None or cputype is None :
188
189
return 'x86_64-pc-windows-msvc'
189
190
@@ -236,6 +237,11 @@ def default_build_triple():
236
237
if ostype .endswith ('WOW64' ):
237
238
cputype = 'x86_64'
238
239
ostype = 'pc-windows-gnu'
240
+ elif sys .platform == 'win32' :
241
+ # Some Windows platforms might have a `uname` command that returns a
242
+ # non-standard string (e.g. gnuwin32 tools returns `windows32`). In
243
+ # these cases, fall back to using sys.platform.
244
+ return 'x86_64-pc-windows-msvc'
239
245
else :
240
246
err = "unknown OS type: {}" .format (ostype )
241
247
sys .exit (err )
You can’t perform that action at this time.
0 commit comments