From 11fca0213a2254f9eb9f696543b571bfa5639f81 Mon Sep 17 00:00:00 2001 From: zvoniimiir Date: Mon, 20 Jul 2020 17:35:00 +0200 Subject: [PATCH] Revert "Patch auto-deps for Windows CXX (#18721)" This reverts commit cea097df833767271950a210d265be1d7a534295. --- .../scripts/common-features-dependencies.py | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/common-features-dependencies.py b/buildroot/share/PlatformIO/scripts/common-features-dependencies.py index 778004744f21..e88afd748851 100644 --- a/buildroot/share/PlatformIO/scripts/common-features-dependencies.py +++ b/buildroot/share/PlatformIO/scripts/common-features-dependencies.py @@ -93,29 +93,6 @@ def install_features_dependencies(): proj.set("env:" + env["PIOENV"], "src_filter", src_filter) env.Replace(SRC_FILTER=src_filter) -# search the current compiler, considering the OS -def search_compiler(): - if env['PLATFORM'] == 'win32': - # the first path have the compiler - compiler_path = None - for path in env['ENV']['PATH'].split(';'): - if re.search(r'platformio\\packages.*\\bin', path): - compiler_path = path - break - if compiler_path == None: - print("Could not find the g++ path") - return None - - print(compiler_path) - for file in os.listdir(compiler_path): - if file.endswith("g++.exe"): - return file - print("Could not find the g++") - return None - else: - return env.get('CXX') - - # load marlin features def load_marlin_features(): if "MARLIN_FEATURES" in env: @@ -125,10 +102,7 @@ def load_marlin_features(): # print(env.Dump()) build_flags = env.get('BUILD_FLAGS') build_flags = env.ParseFlagsExtended(build_flags) - - cxx = search_compiler() - cmd = [cxx] - + cmd = [] # build flags from board.json # if 'BOARD' in env: # cmd += [env.BoardConfig().get("build.extra_flags")] @@ -139,6 +113,7 @@ def load_marlin_features(): cmd += ['-D' + s] # cmd += ['-w -dM -E -x c++ Marlin/src/inc/MarlinConfigPre.h'] cmd += ['-w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-features-dependencies.h'] + cmd = [env.get('CXX')] + cmd cmd = ' '.join(cmd) print(cmd) define_list = subprocess.check_output(cmd, shell=True).splitlines()