Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
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
ckocagil 647f7a9ef1 gn: Fix more build issues on Win
BUG=354261
R=brettw
TBR=piman,wtc
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#297481}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fc8d7f23b2f20a93c5d987d0c073e892d09f0ade
2014-09-30 19:32:02 +00:00
ckocagil 0fdceebcd7 gn: Make WDK_DIR environment variable optional for VS professional users
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#294967}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7427e6aa9f2f77edf07bf506561047a355155b98
2014-09-16 01:39:16 +00:00
scottmg@chromium.org f55feb4fa0 Make landmines work on local builds too
Moves (some of) gyp environment setup out of gyp_chromium into separate
module, and shares that between gyp_chromium and landmines.py.

landmines.py is added as the first entry in DEPS hooks so that it can
clobber the entire build directory before running other hooks that
extract/generate into the build dir.

Reland with fix for ios, and for clean pull.

R=iannucci@chromium.org
BUG=400011

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289099

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@289546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-14 14:03:30 +00:00
scottmg@chromium.org 1d9d8fd468 Use toolchain hash that's in buildtools
Hash copied at https://codereview.chromium.org/449673003/.

R=iannucci@chromium.org
BUG=400830

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@288477 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-09 00:27:26 +00:00
sebmarchand@chromium.org 21b38ef160 Copy the PGO runtime library to the release directory (take 2)
This is a reland of https://codereview.chromium.org/402993002/ with an additional check to make sure that the DLLs exist before trying to copy them.

BUG=395183

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284550 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-22 00:18:32 +00:00
sebmarchand@chromium.org 7a2805f249 Revert of Copy the PGO runtime library to the release directory (https://codereview.chromium.org/402993002/)
Reason for revert:
pgort120.dll isn't present in the express version of VC.

Original issue's description:
> Copy the PGO runtime library to the release directory
> 
> BUG=395183
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284261

TBR=scottmg@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=395183

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284369 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-20 13:53:15 +00:00
sebmarchand@chromium.org 028b5f7f6c Copy the PGO runtime library to the release directory
BUG=395183

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284261 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-19 00:25:18 +00:00
brettw@chromium.org da6b387202 Add support for VS express to the GN build.
BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@273345 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-28 20:32:01 +00:00
scottmg@chromium.org 323af8f195 Split toolchain update and install lookup to make generation faster
runhooks does toolchain update, saving relevant information to
build/win_toolchain.json, and during generation this is loaded
and used. This worked almost the same previously, however update
was called at generation time and the .json was deleted after
it was used. This speeds up generation time by a few seconds.

(In preference to https://codereview.chromium.org/228093002/)

R=dpranke@chromium.org
BUG=360878

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@262590 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-09 01:56:20 +00:00
scottmg@chromium.org 9d740d955f Use depot_tools toolchain, remove now unneeded code, fix not including path to win sdk tools
This is enough for this to work OK:

[gn-2013]d:\src\cr\src>gn gen out_gn
[gn-2013]d:\src\cr\src>ninja -C out_gn gn
[gn-2013]d:\src\cr\src>out_gn\gn gen out_gn2
[gn-2013]d:\src\cr\src>ninja -C out_gn2 gn
...
[297/297] LINK gn.exe

I'm not sure if we need all the deleted stuff for something
else, but I guess we can revive it when we need it.

(There's some dependency problem with linking atm, as
"ninja -C out_gn gn" always relinks, but I think it's unrelated.)

R=brettw@chromium.org
BUG=297677

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@258327 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-20 17:42:25 +00:00
scottmg@chromium.org d70a05ad13 Refactor VS toolchain code in gyp_chromium
Pull out some code from gyp_chromium for less clutter, and easier to
share with GN build files this way.

R=brettw@chromium.org
BUG=297677

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@258119 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-19 22:01:39 +00:00