summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-11-30 09:38:54 -0700
committerCharles Harris <charlesr.harris@gmail.com>2021-11-30 10:19:20 -0700
commit7cc278d32b0b6e1cb7f1eb391497701bbd4bec32 (patch)
treeb9741a4f73f57506a80373fb9c3cecb25dc6c091
parent2270b845cbf1d08fa89c22eca1fe4e2ccf7fc5eb (diff)
downloadnumpy-7cc278d32b0b6e1cb7f1eb391497701bbd4bec32.tar.gz
MAINT: Sanitize C++ flags.
-rw-r--r--numpy/distutils/ccompiler.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py
index d86bbe31e..ffdc4eb47 100644
--- a/numpy/distutils/ccompiler.py
+++ b/numpy/distutils/ccompiler.py
@@ -21,9 +21,10 @@ from numpy.distutils import log
from numpy.distutils.exec_command import (
filepath_from_subprocess_output, forward_bytes_to_stdout
)
-from numpy.distutils.misc_util import cyg2win32, is_sequence, mingw32, \
- get_num_build_jobs, \
- _commandline_dep_string
+from numpy.distutils.misc_util import (
+ cyg2win32, is_sequence, mingw32, get_num_build_jobs,
+ _commandline_dep_string, sanitize_cxx_flags
+)
# globals for parallel build management
import threading
@@ -682,7 +683,10 @@ def CCompiler_cxx_compiler(self):
return self
cxx = copy(self)
- cxx.compiler_so = [cxx.compiler_cxx[0]] + cxx.compiler_so[1:]
+ cxx.compiler_cxx = cxx.compiler_cxx
+ cxx.compiler_so = [cxx.compiler_cxx[0]] + \
+ sanitize_cxx_flags(cxx.compiler_so[1:])
+ #cxx.compiler_so = [cxx.compiler_cxx[0]] + cxx.compiler_so[1:]
if sys.platform.startswith('aix') and 'ld_so_aix' in cxx.linker_so[0]:
# AIX needs the ld_so_aix script included with Python
cxx.linker_so = [cxx.linker_so[0], cxx.compiler_cxx[0]] \