0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-22 09:42:34 +00:00

🔨 Use env[PLATFORM]

Followup to f2d585ac7f
This commit is contained in:
Scott Lahteine 2024-09-24 18:56:11 -05:00
parent 4ef5372151
commit e2c0150fa8

View file

@ -1,7 +1,7 @@
#
# preprocessor.py
#
import subprocess, os
import subprocess
nocache = 1
verbose = 0
@ -75,9 +75,7 @@ def search_compiler(env):
path_separator = ':'
gcc_exe = '*g++'
sysname = os.uname().sysname
if sysname == 'Windows':
if env['PLATFORM'] == 'win32':
path_separator = ';'
gcc_exe += ".exe"
@ -97,7 +95,7 @@ def search_compiler(env):
for ppath in envpath:
for gpath in ppath.glob(gcc_exe):
# Skip macOS Clang
if gpath != 'usr/bin/g++' or sysname != 'Darwin':
if gpath != 'usr/bin/g++' or env['PLATFORM'] != 'darwin':
gccpath = str(gpath.resolve())
break