Victor Oliveira
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
buildroot/share/PlatformIO/scripts/common-dependencies.py
|
@ -156,16 +156,16 @@ def search_compiler(): |
|
|
# Find the current platform compiler by searching the $PATH |
|
|
# Find the current platform compiler by searching the $PATH |
|
|
if env['PLATFORM'] == 'win32': |
|
|
if env['PLATFORM'] == 'win32': |
|
|
path_separator = ';' |
|
|
path_separator = ';' |
|
|
path_regex = r'platformio\\packages.*\\bin' |
|
|
path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) + r'.*\\bin' |
|
|
gcc = "g++.exe" |
|
|
gcc = "g++.exe" |
|
|
else: |
|
|
else: |
|
|
path_separator = ':' |
|
|
path_separator = ':' |
|
|
path_regex = r'platformio/packages.*/bin' |
|
|
path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) + r'.*/bin' |
|
|
gcc = "g++" |
|
|
gcc = "g++" |
|
|
|
|
|
|
|
|
# Search for the compiler |
|
|
# Search for the compiler |
|
|
for path in env['ENV']['PATH'].split(path_separator): |
|
|
for path in env['ENV']['PATH'].split(path_separator): |
|
|
if not re.search(path_regex, path): |
|
|
if not re.search(path_regex, path, re.IGNORECASE): |
|
|
continue |
|
|
continue |
|
|
for file in os.listdir(path): |
|
|
for file in os.listdir(path): |
|
|
if not file.endswith(gcc): |
|
|
if not file.endswith(gcc): |
|
|