瀏覽代碼

Fix compiler search in non-default PIO installs (#18960)

Victor Oliveira 3 年之前
父節點
當前提交
e3c0891d2b
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      buildroot/share/PlatformIO/scripts/common-dependencies.py

+ 3
- 3
buildroot/share/PlatformIO/scripts/common-dependencies.py 查看文件

@@ -156,16 +156,16 @@ def search_compiler():
156 156
 	# Find the current platform compiler by searching the $PATH
157 157
 	if env['PLATFORM'] == 'win32':
158 158
 		path_separator = ';'
159
-		path_regex = r'platformio\\packages.*\\bin'
159
+		path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) + r'.*\\bin'
160 160
 		gcc = "g++.exe"
161 161
 	else:
162 162
 		path_separator = ':'
163
-		path_regex = r'platformio/packages.*/bin'
163
+		path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) + r'.*/bin'
164 164
 		gcc = "g++"
165 165
 
166 166
 	# Search for the compiler
167 167
 	for path in env['ENV']['PATH'].split(path_separator):
168
-		if not re.search(path_regex, path):
168
+		if not re.search(path_regex, path, re.IGNORECASE):
169 169
 			continue
170 170
 		for file in os.listdir(path):
171 171
 			if not file.endswith(gcc):

Loading…
取消
儲存