diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-02-03 20:04:58 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-02-24 12:32:39 -0800 |
commit | 00ccdfc1c5a0602de60010ca61b7dc7f019f1e9a (patch) | |
tree | 9c503515b02e221e22ecd8b58b8e1a9c22993aba /site.cfg.example | |
parent | 77aee9c3069851e53a772d5b1f24392932d0801f (diff) | |
download | numpy-00ccdfc1c5a0602de60010ca61b7dc7f019f1e9a.tar.gz |
BUG: parse shell escaping in extra_compile_args and extra_link_args
Thanks to a change in exec_command, these strings are no longer passed onto the shell.
Since config files do not support list values, our best bet is to perform shell-splitting immediately.
This brings the behavior back in line a little to how it was before.
On windows systems, the behavior has changed. Previously it was treated as a single argument unless it contained quotes, resulting in the following weird behavior:
# passes as one argument, preserving spaces
extra_link_args=-Wl,rpath=A:/path/with spaces
# passes as two arguments, preserving spaces
extra_link_args="-Wl,rpath=A:\path\with spaces" -lgfortran
# passes as one long quoted argument (surprising and undesirable)
extra_link_args=-Wl,rpath=A:\path\without_spaces -lgfortran
Now it behaves as windows escaping via subprocess (but _not_ via cmd) normally would:
# Passed as two separate arguments (probably not as intended, but should be expected)
extra_link_args=-Wl,rpath=A:/path/with spaces
# passes as two arguments, preserving spaces
extra_link_args="-Wl,rpath=A:\path\with spaces" -lgfortran
# passes as two arguments
extra_link_args=-Wl,rpath=A:\path\without_spaces -lgfortran
Fixes gh-12659
Diffstat (limited to 'site.cfg.example')
-rw-r--r-- | site.cfg.example | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/site.cfg.example b/site.cfg.example index 48b17fbdf..f5c9ca227 100644 --- a/site.cfg.example +++ b/site.cfg.example @@ -64,14 +64,14 @@ # # extra_compile_args # Add additional arguments to the compilation of sources. -# Simple variable with no parsing done. +# Split into arguments in a platform-appropriate way. # Provide a single line with all complete flags. # extra_compile_args = -g -ftree-vectorize # # extra_link_args # Add additional arguments when libraries/executables # are linked. -# Simple variable with no parsing done. +# Split into arguments in a platform-appropriate way. # Provide a single line with all complete flags. # extra_link_args = -lgfortran # |