mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-24 03:59:53 +00:00
c_build_helper: Split cc command line
Optionally the CC/HOSTCC environment variable can hold the command to invoke the C compiler, however this command can also contain extra arguments, not only the binary name. In this particular case Python was treating the whole value as a single binary name, and was trying to execute as such (e.g. "cc -arg1 -arg2" instead of "cc" and the arguments separately), which results in failure. Split the compiler command into its components to invoke it correctly. Signed-off-by: Gyorgy Sarvari <[email protected]>
This commit is contained in:
@@ -98,7 +98,7 @@ def compile_c_file(c_filename, exe_filename, include_dirs):
|
||||
cc = os.getenv('HOSTCC', None)
|
||||
if cc is None:
|
||||
cc = os.getenv('CC', 'cc')
|
||||
cmd = [cc]
|
||||
cmd = cc.split()
|
||||
|
||||
proc = subprocess.Popen(cmd,
|
||||
stdout=subprocess.DEVNULL,
|
||||
|
||||
Reference in New Issue
Block a user