Descriptionninja/posix: Don't link c-file-only targets to libstdc++.
The most important part of this change is that LINK will now default to what
is set for CXX (in make) or what is set for CC (in ninja). In ninja, there's
now an additional LINKXX that's set to what CXX is set to, and in ninja
LINKXX is only used to link targets that contain at least one C++ source
file.
Also change several make_global_settings behaviors:
1. The ninja generator was using LD and LD.host for make_global_settings, while
the make generator uses LINK and LINK.host. Chromium's common.gypi only
sets the latter, so it looks like this code isn't needed. Removed support
for setting LD and LD.host via make_global_settings in ninja. (In practice,
this was alway set to the same thing as CC / CXX anyhow.)
2. The same is done for the environment variables in ninja. Again, as the
linker now just uses what's set via CC / CXX, this shouldn't be an issue
in practice.
3. Change the make generator to look at the LINK envvar instead of LD,
for consistency with its make_global_settings key and with what
`make -p` prints.
(If setting a linker that's different from CC / CXX is needed later on, this
is easy to add back.)
(Make doesn't have explicit support for setting LINK, make_global_settings
allows changing arbitrary make variables there. But due to the defaults change,
setting LINK is no longer required in make either.)
BUG=chromium:280718
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #Patch Set 7 : #Patch Set 8 : #Patch Set 9 : #Patch Set 10 : #Patch Set 11 : #Patch Set 12 : #Patch Set 13 : #Patch Set 14 : #
Total comments: 6
Patch Set 15 : #Patch Set 16 : #
Total comments: 1
Messages
Total messages: 7 (0 generated)
|