From d5f472a6cf4456bf715ee3b3a85132f3fbe7e15f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 12 May 2022 00:07:22 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20g++=20locator=20for=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/share/PlatformIO/scripts/preprocessor.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/preprocessor.py b/buildroot/share/PlatformIO/scripts/preprocessor.py index 3d324bac4b..d9c472006c 100644 --- a/buildroot/share/PlatformIO/scripts/preprocessor.py +++ b/buildroot/share/PlatformIO/scripts/preprocessor.py @@ -67,11 +67,9 @@ def search_compiler(env): with open(GCC_PATH_CACHE, 'r') as f: return f.read() - # Find a platform compiler by searching $PATH items - # A native target will search all PATH bin folders. - # Others look only within $HOME/.platformio. - path_regex = "" if env.GetProjectOption('platform') == 'native' else re.escape(env['PROJECT_PACKAGES_DIR']) - + # Find the current platform compiler by searching the $PATH + # which will be in a platformio toolchain bin folder + path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) gcc = "g++" if env['PLATFORM'] == 'win32': path_separator = ';'