Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Issue 722723004: Rework win_toolchains a bit and copy the vs runtime DLLs as needed. (Closed)

Created:
6 years, 1 month ago by Dirk Pranke
Modified:
6 years, 1 month ago
CC:
chromium-reviews, cpu_(ooo_6.6-7.5), jschuh
Base URL:
http://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/0b95195e49489b7a4d87048d2ce4b747173a5b8a Cr-Commit-Position: refs/heads/master@{#304310}

Patch Set 1 #

Total comments: 23

Patch Set 2 : update w/ review feedback, remove force_win64 #

Patch Set 3 : rebase onto #304284 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -76 lines) Patch
M build/config/BUILDCONFIG.gn View 1 3 chunks +5 lines, -29 lines 0 comments Download
M build/toolchain/win/BUILD.gn View 1 3 chunks +24 lines, -14 lines 0 comments Download
M build/vs_toolchain.py View 1 5 chunks +54 lines, -33 lines 4 comments Download

Messages

Total messages: 20 (4 generated)
Dirk Pranke
This patch should un-bork the Win GN bots and make things work. I had to ...
6 years, 1 month ago (2014-11-13 03:00:53 UTC) #1
scottmg
https://codereview.chromium.org/722723004/diff/1/build/config/BUILDCONFIG.gn File build/config/BUILDCONFIG.gn (right): https://codereview.chromium.org/722723004/diff/1/build/config/BUILDCONFIG.gn#newcode179 build/config/BUILDCONFIG.gn:179: # TODO(dpranke): Delete this? x64 should mean x64 and ...
6 years, 1 month ago (2014-11-13 03:49:59 UTC) #2
Dirk Pranke
https://codereview.chromium.org/722723004/diff/1/build/config/BUILDCONFIG.gn File build/config/BUILDCONFIG.gn (right): https://codereview.chromium.org/722723004/diff/1/build/config/BUILDCONFIG.gn#newcode179 build/config/BUILDCONFIG.gn:179: # TODO(dpranke): Delete this? x64 should mean x64 and ...
6 years, 1 month ago (2014-11-13 05:49:36 UTC) #3
Nick Bray (chromium)
https://codereview.chromium.org/722723004/diff/1/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/722723004/diff/1/build/vs_toolchain.py#newcode118 build/vs_toolchain.py:118: """ On 2014/11/13 05:49:36, Dirk Pranke wrote: > On ...
6 years, 1 month ago (2014-11-13 20:10:53 UTC) #5
brettw
https://codereview.chromium.org/722723004/diff/1/build/config/BUILDCONFIG.gn File build/config/BUILDCONFIG.gn (right): https://codereview.chromium.org/722723004/diff/1/build/config/BUILDCONFIG.gn#newcode179 build/config/BUILDCONFIG.gn:179: # TODO(dpranke): Delete this? x64 should mean x64 and ...
6 years, 1 month ago (2014-11-14 20:45:45 UTC) #6
Will Harris
On 2014/11/13 20:10:53, Nick Bray (chromium) wrote: > Reading between the lines: NaCl will need ...
6 years, 1 month ago (2014-11-14 21:25:02 UTC) #7
Nick Bray (chromium)
On 2014/11/14 21:25:02, Will Harris wrote: > On 2014/11/13 20:10:53, Nick Bray (chromium) wrote: > ...
6 years, 1 month ago (2014-11-14 21:31:32 UTC) #8
Dirk Pranke
Okay, everything is updated. Please take another look? With these changes, you'll get a win ...
6 years, 1 month ago (2014-11-14 23:03:22 UTC) #9
scottmg
lgtm https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py#newcode150 build/vs_toolchain.py:150: _CopyRuntime(target_dir, runtime_dir, 'msvc%s120d.dll') pgo won't work with gn ...
6 years, 1 month ago (2014-11-14 23:14:17 UTC) #10
Dirk Pranke
https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py#newcode150 build/vs_toolchain.py:150: _CopyRuntime(target_dir, runtime_dir, 'msvc%s120d.dll') On 2014/11/14 23:14:17, scottmg wrote: > ...
6 years, 1 month ago (2014-11-14 23:24:27 UTC) #11
brettw
lgtm
6 years, 1 month ago (2014-11-14 23:24:33 UTC) #12
scottmg
https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py#newcode150 build/vs_toolchain.py:150: _CopyRuntime(target_dir, runtime_dir, 'msvc%s120d.dll') On 2014/11/14 23:24:27, Dirk Pranke wrote: ...
6 years, 1 month ago (2014-11-14 23:26:49 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/722723004/40001
6 years, 1 month ago (2014-11-14 23:28:29 UTC) #17
Dirk Pranke
https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/722723004/diff/40001/build/vs_toolchain.py#newcode150 build/vs_toolchain.py:150: _CopyRuntime(target_dir, runtime_dir, 'msvc%s120d.dll') On 2014/11/14 23:26:49, scottmg wrote: > ...
6 years, 1 month ago (2014-11-14 23:30:30 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years, 1 month ago (2014-11-15 00:09:24 UTC) #19
commit-bot: I haz the power
6 years, 1 month ago (2014-11-15 00:10:55 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/0b95195e49489b7a4d87048d2ce4b747173a5b8a
Cr-Commit-Position: refs/heads/master@{#304310}

Powered by Google App Engine
This is Rietveld 408576698