We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ef5372 commit e2c0150Copy full SHA for e2c0150
buildroot/share/PlatformIO/scripts/preprocessor.py
@@ -1,7 +1,7 @@
1
#
2
# preprocessor.py
3
4
-import subprocess, os
+import subprocess
5
6
nocache = 1
7
verbose = 0
@@ -75,9 +75,7 @@ def search_compiler(env):
75
76
path_separator = ':'
77
gcc_exe = '*g++'
78
-
79
- sysname = os.uname().sysname
80
- if sysname == 'Windows':
+ if env['PLATFORM'] == 'win32':
81
path_separator = ';'
82
gcc_exe += ".exe"
83
@@ -97,7 +95,7 @@ def search_compiler(env):
97
95
for ppath in envpath:
98
96
for gpath in ppath.glob(gcc_exe):
99
# Skip macOS Clang
100
- if gpath != 'usr/bin/g++' or sysname != 'Darwin':
+ if gpath != 'usr/bin/g++' or env['PLATFORM'] != 'darwin':
101
gccpath = str(gpath.resolve())
102
break
103
0 commit comments