1
0
Fork 0

Fix compilation-database command under MSYS (#15652)

* Fix compilation-database command under MSYS

* Add comment
This commit is contained in:
Joel Challis 2021-12-29 21:35:35 +00:00 committed by GitHub
parent 906108fb48
commit 1a8a842cfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,8 @@ def system_libs(binary: str) -> List[Path]:
# Actually query xxxxxx-gcc to find its include paths. # Actually query xxxxxx-gcc to find its include paths.
if binary.endswith("gcc") or binary.endswith("g++"): if binary.endswith("gcc") or binary.endswith("g++"):
result = cli.run([binary, '-E', '-Wp,-v', '-'], capture_output=True, check=True, input='\n') # (TODO): Remove 'stdin' once 'input' no longer causes issues under MSYS
result = cli.run([binary, '-E', '-Wp,-v', '-'], capture_output=True, check=True, stdin=None, input='\n')
paths = [] paths = []
for line in result.stderr.splitlines(): for line in result.stderr.splitlines():
if line.startswith(" "): if line.startswith(" "):