You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Respect CXX when parsing linker parameters for UNIX c++ targets
Previously, when parsing linker parameters for C++ targets, the CC
variable was used to determine what the "prefix" of the command was in
order to determine what the linker arguments were.
If the value of LDCXXSHARED did not match CC, the first argument would
be dropped as it was assumed to be the linker command.
However, if the command was a wrapper, such as ccache, it could lead to
compile problems as the generated command would be incorrect.
In the following scenario:
LDCXXSHARED="ccache g++ -shared -Wl,--enable-new-dtags"
CC="ccache gcc"
CXX="ccache g++"
The command would be incorrectly parsed to:
ccache g++ g++ -shared -Wl,--enable-new-dtags
Now, the CXX value is used to improve the chances of parsing the linker
arguments correctly to generate:
ccache g++ -shared -Wl,--enable-new-dtags
LDCXXSHARED and CXX still need to be in sync either in the environment
or within the sysconfig variables in the CPython build for parsing to
work correctly.
The CXX value is now also respected when linking executable binaries.
Signed-off-by: Vincent Fazio <[email protected]>
0 commit comments