File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/python
2
2
import contextlib
3
3
import os
4
+ import shlex
4
5
import sys
5
6
import tempfile
6
7
@@ -29,7 +30,7 @@ def sanitize_flagfile(in_path, out_fd):
29
30
def main ():
30
31
# Append CXXFLAGS to correctly detect include paths for either libstdc++ or libc++.
31
32
if sys .argv [1 :5 ] == ["-E" , "-xc++" , "-" , "-v" ]:
32
- os .execv (envoy_real_cxx , [envoy_real_cxx ] + sys .argv [1 :] + envoy_cxxflags .split (" " ))
33
+ os .execv (envoy_real_cxx , [envoy_real_cxx ] + sys .argv [1 :] + shlex .split (envoy_cxxflags ))
33
34
34
35
# `g++` and `gcc -lstdc++` have similar behavior and Bazel treats them as
35
36
# interchangeable, but `gcc` will ignore the `-static-libstdc++` flag.
@@ -49,7 +50,7 @@ def main():
49
50
if "-static-libstdc++" in sys .argv [1 :] or "-stdlib=libc++" in envoy_cxxflags :
50
51
# Append CXXFLAGS to all C++ targets (this is mostly for dependencies).
51
52
if envoy_cxxflags and "-std=c++" in str (sys .argv [1 :]):
52
- argv = envoy_cxxflags .split (" " )
53
+ argv = shlex .split (envoy_cxxflags )
53
54
else :
54
55
argv = []
55
56
for arg in sys .argv [1 :]:
You can’t perform that action at this time.
0 commit comments