Open apinski-cavium opened 1 year ago
This is a Python bug. Anyone wants to tackle it?
No this is not a bug in the python code but rather it is a bug in common/parser_options.cpp dealing with spaces. The way cpp/cc is invoked is using popen and you just pass the string directly without re-encoding the spaces and such. The same will happen if you have an include directory with a space in it. Or with use -MF with a file with a space. Most likely you should use posix_spawnp (https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_spawn.html) instead of popen. And have an array of arguments instead of popen doing the tokenizing.
Looks like quoting is missed ...