Skip to content

Commit e2c0150

Browse files
committed
🔨 Use env[PLATFORM]
Followup to f2d585a
1 parent 4ef5372 commit e2c0150

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

buildroot/share/PlatformIO/scripts/preprocessor.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# preprocessor.py
33
#
4-
import subprocess, os
4+
import subprocess
55

66
nocache = 1
77
verbose = 0
@@ -75,9 +75,7 @@ def search_compiler(env):
7575

7676
path_separator = ':'
7777
gcc_exe = '*g++'
78-
79-
sysname = os.uname().sysname
80-
if sysname == 'Windows':
78+
if env['PLATFORM'] == 'win32':
8179
path_separator = ';'
8280
gcc_exe += ".exe"
8381

@@ -97,7 +95,7 @@ def search_compiler(env):
9795
for ppath in envpath:
9896
for gpath in ppath.glob(gcc_exe):
9997
# Skip macOS Clang
100-
if gpath != 'usr/bin/g++' or sysname != 'Darwin':
98+
if gpath != 'usr/bin/g++' or env['PLATFORM'] != 'darwin':
10199
gccpath = str(gpath.resolve())
102100
break
103101

0 commit comments

Comments
 (0)