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

26 Коммитов

Автор 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
Cem Kocagil 9b0f035203 gn: Fix build issues blocking gfx from being built
BUG=354261
R=brettw@chromium.org, brettw

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

Cr-Original-Commit-Position: refs/heads/master@{#296027}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b83a0bd983bdcdcbc14559f263e7e7d8145c976c
2014-09-22 19:45:13 +00:00
ckocagil 34888f7132 Make gn generate on Win
BUG=
R=brettw

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

Cr-Original-Commit-Position: refs/heads/master@{#295283}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 39017e1de19051c3a3519c28ca980021ae098ee4
2014-09-17 16:04:03 +00:00
brettw d3f0610979 Hook up the link pool in the GN build.
This uses the code from GYP to compute the maximum number of concurrent links
to use in the link pool, and sets this value in the toolchains.

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

Cr-Original-Commit-Position: refs/heads/master@{#294007}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 937a6d51df85cd7e338b952aeacb03bf7e5726c2
2014-09-09 21:00:57 +00:00
brettw 36da715672 Convert GN visibility variables to lists.
Currently this is either a list or a string. However, this is causing some problems because templates can't add to the invoker's visibility list without knowing if the original is a string or a list.

In an effort to make this consistent, I'm converting all visibiltiy to be lists, and will remove support for strings in a future build.

This exempts cld from header checking since it was confusing GN's header checker. It adds a ppapi header target as well that will be used by libyuv (that requires a roll).

TBR=scottmg

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

Cr-Original-Commit-Position: refs/heads/master@{#293638}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9af4262ad8020658ee04c07d13a2617af64147b1
2014-09-06 21:23:45 +00:00
Brett Wilson a132523e5b Fix GN toolchains to use proper out dir.
Previously it put all toolchains' main link output into the root build directory, which doesn't work when there are multiple toolchains generating the same targets.

BUG=405686
R=jamesr@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#291927}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d40ebfebd18d8fc41a0f5af61d28b6c252b66bea
2014-08-26 17:40:51 +00:00
brettw@chromium.org 74d96b3268 Pull new GN, update toolchain definitions
This pulls buildtools to get GN 290714 and updates to the new style of toolchain definitions in that revision.

Unfortunately, this new version doesn't support getting the outputs of excutables, which made the android unit test template a bit less automatic. We can consider how to best fix this in the future.

R=jamesr@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@290894 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-20 19:39:43 +00:00
brettw@chromium.org 0fd7f035ec Use the new trim modes in the GN build.
This uses the new "trim" input conversion option and also the default arguments to exec script to clean up some calls.

R=bbudge@chromium.org, bbudge

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287873 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 22:11:59 +00:00
scottmg@chromium.org b5e29cbe27 gn win: Add system include directories to midl template
Otherwise, midl.exe will fail to find standard .idls, e.g.:

midl : command line error MIDL1001 : cannot open input file objidl.idl

R=brettw@chromium.org
BUG=354261

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286437 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-30 07:59:50 +00:00
brettw@chromium.org 6e7396da65 Hook up symbol files to the Windows GN build.
Previously the GN Windows build specified the symbol file $pdbfile but this variable was never defined, so the command like would just say "/Fd" and the default one would be used.

This patch defines some per-target variables in the ninja file for the toolchain to use. The Windows toolchain uses these to construct C- and C++-specific pdb files (the MS tools can't share between these two) for the current target.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284137 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-18 17:24:30 +00:00
brettw@chromium.org 427561eb3d Replace deps with depsformat in GN tool defs
This variable changed name to avoid ambiguity with dependencies.

R=noelallen@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282077 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-09 17:30:37 +00:00
brettw@chromium.org 07250b03e2 Add GN support for midl.
Implement iaccessible and isimpledom

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@277855 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-17 20:33:53 +00:00
brettw@chromium.org 4703e12536 Don't delete the manifest when linking on Windows in GN
This is causing errors for incremental rebuilds and we can't figure out why it is necessary.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@277066 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-13 19:07:58 +00:00
brettw@chromium.org 70ae79bcd5 Work on Mac GN build.
This fixes a lot of minor mistakes (mostly missing/extra files and flags) for the Mac GN build.

I separated out some clang flags into a config for extra clang warnings. Several of the third party libraries needed to remove this.

Removes the use_nss flag and uses !use_openssl. This is a result of discussion with rsleevi.

Removes extra duplicate net build file from secondary tree.

ui/gesture_events seems to be getting compiled in GN with more strict warnings than in GYP. Rather than fix this, I fixed the warning in the gesture recognizer unit test. It was returning a const copy (the const is pointless when you're copying).

This also removes a bunch of old GYP integration stuff that was left in the GN build.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@264626 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-17 20:33:19 +00:00
brettw@chromium.org 08fbbcc064 Pull GN @ r262225
Implement GN visibility in the build, which this new version implements

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@262438 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-08 16:50:01 +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
brettw@chromium.org d80b402bc9 Pull GN @ 252040, update calls
Updates all rebase_path calls to use the new parameter ordering.

Use the new getenv function and delete the Python script we had to get the home directory.

Takes advantage of the new ability to have the default value of declare_args blocks be dependent on other values. This simplifies some code.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@252065 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-19 20:31:52 +00:00
brettw@chromium.org 9fd24ddc2e Pull new GN binary @ r247206
Additionally, the Windows binary is a debug build to help find a rare assertion failure.

Updates build files to use a list which this new build requires.

Update win-tool link commands to match GYP

TBR=scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@247408 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-28 06:03:11 +00:00
brettw@chromium.org 12d2a09472 Fox goma on Windows for the GN build.
This properly defines the goma wrapper. Previously these were not wrapped with the make_global_settings dictionary.

TBR=scottmg
BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@245763 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-18 09:04:55 +00:00
brettw@chromium.org c30951c463 Fix Windows GN build.
This sets use_aura on Windows in all cases (fixes base build).

Passes new argument to gyp link wrapper (GYP revision 1835).

R=sky@chromium.org
TBR=sky

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@244840 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-15 06:10:58 +00:00
brettw@chromium.org d26952a6e6 GN: Autodetect Visual Studio versions
This searches the local system for Visual Studio versions like GYP. It enables specifically requesting one version, as well as overriding the directory like GYP.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@243612 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-08 18:46:44 +00:00
brettw@chromium.org ad0ae7286a GN Command line -D parsing, goma on Windows
This makes gyp_chromium pass defines defined via -D on the command line to GN.

Fixes double-escaping of strings from supplemental.gypi files.

Pass use_goma to the GN build.

Handle "use_goma" and "use_goma=1" (same for other boolean values). Previously values with no equals sign were getting converted to 'true', which doesn't match '1' which we look for.

Output goma wrappers in the GYP header for Windows toolchains.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@243446 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-08 00:32:04 +00:00
brettw@chromium.org f6f4122f10 Add support for 32-bit and 64-bit Windows compiles in GN.
Rename ia32 and ia64 to x86 and x64

BUG=297677, 322109
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@236851 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-22 22:38:39 +00:00
brettw@chromium.org 4ee158e4c3 Add "ninja show" and "ninja refresh" targets to GN build.
"ninja show" will print out the build arguments for when you can't remember the configuration of your output directory.

"ninja refresh" ignores dependencies and regenerates the ninja files.

R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@236840 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-22 22:13:47 +00:00
brettw@chromium.org c54085c7d3 Move files from the secondary GN directory to build.
Since this build is looking less experimental, I'm moving the files out of secondary into the corresponding location in src/build.

I added owners files that just include me. For now I'd like to review all changes here.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@236319 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-20 22:21:03 +00:00