🔨 More specific preprocess exception (#28256)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
@@ -37,15 +37,20 @@ def run_preprocessor(env, fn=None):
|
||||
else:
|
||||
cmd += ['-D' + s]
|
||||
|
||||
cmd += ['-D__MARLIN_DEPS__ -w -dM -E -x c++']
|
||||
depcmd = cmd + [ filename ]
|
||||
cmd = ' '.join(depcmd)
|
||||
cmd += ['-D__MARLIN_DEPS__ -w -dM -E -x c++', filename]
|
||||
|
||||
cmd = ' '.join(cmd)
|
||||
blab(cmd)
|
||||
|
||||
try:
|
||||
define_list = subprocess.check_output(cmd, shell=True).splitlines()
|
||||
define_list_text = subprocess.check_output(cmd, shell=True)
|
||||
except:
|
||||
define_list = {}
|
||||
raise RuntimeError(f"Command `{cmd}` failed during build pre-processing.")
|
||||
|
||||
define_list = define_list_text.splitlines() if define_list_text else []
|
||||
|
||||
preprocessor_cache[filename] = define_list
|
||||
|
||||
return define_list
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user