chromium-src-build/config
dpranke 7265358749 Rework win_toolchains a bit and copy the vs runtime DLLs as needed.
In order to run both the visual studio tools and the binaries built
by them (and ninja), we need to ensure that the VS runtime DLLs
are available in the path.

In the GYP build, we accomplish this by copying them into the
Debug and Debug_x64 dirs as appropriate inside the gyp_chromium
script.

In the pure-GN build, then, things would be broken, so we need to
modify the GN build to do the copy as well, or we need to inject
a step somewhere that happens after GN runs but before Ninja tries
to run (since none of the toolchain binaries will work).

This patch accomplishes this by calling out to vs_toolchain.py to
copy the DLLs as neede when the toolchain is defined. This is somewhat
less than ideal (makes 'gn gen' slower) but seems better than forcing
devs to have to run an additional command.

In addition, the GYP build writes targets into Debug and Debug_x64
concurrently. This doesn't really carry over into GN correctly, and
we probably only ever want to write targets into Debug and Debug/64
(or some such).

However, the way the toolchains are currently implemented, it's not
clear if this really works and the interplay between 32-bit and 64-bit
is weird (we apparently normally "force" 32-bit even if we set cpu_arch
to 64-bit, and require you to specify force_win64). To work around this
and make sure that we copy the right DLLs for the right arch into the
outer Debug/ directory, this patch temporarily disables the cross-arch
part of the build, forcing the host_toolchain to match the target_toolchain.

This likely means that 'cpu_arch="x86"' works (the default), but the 'host'
binaries like image_diff and mksnapshot will be compiled in 32-bit mode,
not 64-bit mode. 'cpu_arch="x64" force_win64=true' should also work, and
produce all-64-bit binaries. 'cpu_arch="x64"' does not work at all and
won't until we can clean up the above stuff.

R=scottmg@chromium.org, brettw@chromium.org
BUG=430661

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

Cr-Original-Commit-Position: refs/heads/master@{#304310}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0b95195e49489b7a4d87048d2ce4b747173a5b8a
2014-11-15 00:10:27 +00:00
..
android Add support for shared library resources to java_apk build rules for real. 2014-11-13 22:38:15 +00:00
clang Redo GN "args" command 2014-05-03 04:32:19 +00:00
compiler Enable -Wunused-local-typedef 2014-11-12 20:54:04 +00:00
gcc Fix gcc_version.gni to determine target GCC toolchain version for Chrome OS. 2014-10-29 18:29:54 +00:00
ios Work on Mac GN build. 2014-04-17 20:33:19 +00:00
linux Add chrome perf tests to GN build, fix harfbuzz 2014-11-10 17:46:17 +00:00
mac Remove cursor_mac.mm, fix GN build. 2014-05-10 06:21:10 +00:00
sanitizers Adds ability to build for asan with gn 2014-10-29 00:53:18 +00:00
win Add some more libjingle targets to the GN build. 2014-09-02 22:02:22 +00:00
BUILD.gn x11: Always require XI2.2 for X11. 2014-11-12 23:22:39 +00:00
BUILDCONFIG.gn Rework win_toolchains a bit and copy the vs runtime DLLs as needed. 2014-11-15 00:10:27 +00:00
OWNERS Move files from the secondary GN directory to build. 2013-11-20 22:21:03 +00:00
allocator.gni Make *some* version of the Win GN build work. 2014-11-08 03:00:11 +00:00
arm.gni GN: Fix compile errors with os==chromeos mojo/public build 2014-09-26 01:28:15 +00:00
crypto.gni Reland dd7edfa67: Switch Mac over to BoringSSL from NSS. 2014-09-12 15:13:27 +00:00
features.gni Refactor language detection logic to allow non-static CLD data sources. 2014-11-11 17:47:36 +00:00
locales.gni Hook up resources to the chrome GN build. 2014-09-04 22:29:41 +00:00
sysroot.gni Allow sysroot to be overridden via GN arguments when using target toolchain. 2014-10-29 17:37:05 +00:00
ui.gni x11: Always require XI2.2 for X11. 2014-11-12 23:22:39 +00:00