ninja/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
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/23475025

git-svn-id: http://gyp.googlecode.com/svn/trunk@1721 78cadc50-ecff-11dd-a971-7dbc132099af
13 files changed