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

84 Коммитов

Автор SHA1 Сообщение Дата
brettw 0bc79121a0 Windows precompiled header support in GN.
Introduces aprecompiled_header_type flag on a tool to say whether it supports precompiled headers, and flags on configs/targets that allow one to specify which header is precompiled.

This does not implement GCC precompiled headers, but the type flag will allow future expansion (the implementation will be mostly separate).

Renames SOURCE_CC to SOURCE_CPP to avoid confusion with Toolchain::TYPE_CC (which is actually the C compiler).

BUG=297678

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

Cr-Original-Commit-Position: refs/heads/master@{#336674}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3dab5fe87ddb0efe646f6ab393ab07533d75237d
2015-06-29 23:01:02 +00:00
thakis f4fbaea28f clang/win: Start work on getting clang/win working in gn.
This is enough to get base building with clang on Windows.

On Windows, we use clang-cl.exe which is command-line compatible
with cl.exe.

BUG=491209,404525
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

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

Cr-Original-Commit-Position: refs/heads/master@{#332563}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 22c76db4a60e2e23c3f8f22f8e08b9b0cb49e002
2015-06-03 08:12:12 +00:00
brettw 6613565585 Fix GN midl template for input/output checking
An upcoming version of GN will check that inputs to scripts are generated by public dependencies of the script. The MIDL rule is the only failing part of the Windows build.

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

Cr-Original-Commit-Position: refs/heads/master@{#332450}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bf622f689a0f60eb57f0d634afbb3dce8b523c80
2015-06-02 19:51:52 +00:00
cstout 5e499f0d07 Enable cross compile to android from mac.
Useful for mojo developers.

BUG=486809

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

Cr-Original-Commit-Position: refs/heads/master@{#329939}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9629015f518ea1e27a0ea1e7f1eb7ec40e3fc3cf
2015-05-14 21:38:56 +00:00
brettw e8f2ecff5a GN Windows build fixes
Most importantly, this passes cflags_cc to the C++ compiler.

This fixes some flag differences with the GYP build, especially when running on 64 bit.

It disables a TLS test on static debug x64 builds which also fails in GYP. This configuration is not run on the bots but is the standard GN Windows build.

BUG=251251
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

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

Cr-Original-Commit-Position: refs/heads/master@{#326856}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9a19ddbe04e2be759a15c6a70f6585152611af23
2015-04-24 19:30:46 +00:00
tfarina fdf53635e4 Fix GN mac toolchain error.
When you run `gn gen out-gn/Debug` on Mac you get the following:

ERROR at //build/toolchain/mac/BUILD.gn:200:12: Build argument has no effect.
      os = current_os
           ^---------
The variable "os" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

BUG=None
TEST=`gn gen out-gn/Debug` passes without the above error
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#324109}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 53ec706bbc5debe052dd51e4d93e2de4c2802ab2
2015-04-07 20:38:47 +00:00
dpranke bf4f5570f4 Remove old references to cpu_arch, os from GN files.
Now that os and cpu_arch are no longer needed or used anywhere.

R=brettw@chromium.org, rockot@chromium.org
BUG=344767
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

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

Cr-Original-Commit-Position: refs/heads/master@{#322499}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c329085593402937717484c073086cb1c904f37b
2015-03-26 23:36:31 +00:00
brettw 9ccd37a6cf Add remoting and PPAPI tests to GN build
Reland of https://codereview.chromium.org/961323004
TBR=dpranke

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

Cr-Original-Commit-Position: refs/heads/master@{#319080}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 31f4de692fea12661a046a0fc8d091ff6f04654d
2015-03-04 17:25:38 +00:00
dpranke 6b94cd7a12 Update Chomium's build files to work w/ latest GN binaries.
The latest GN binaries rename cpu_arch to current_cpu and/or target_cpu
as appropriate, build_cpu_arch to host_cpu, and os to current_os and target_os as appropriate.

R=brettw@chromium.org
TBR=ddorwin@chromium.org
EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
BUG=344767

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

Cr-Original-Commit-Position: refs/heads/master@{#317223}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4327621a322c964a8bc6d1ef5a4534f0f877d63e
2015-02-20 02:56:07 +00:00
dpranke ef1bc954a4 Roll GN binaries to #317120 for the cpu_arch changes
The newest version of GN replaces the 'cpu_arch' and 'os' variables with 'current_cpu', 'target_cpu', 'current_os', and 'target_os', and also replaces 'build_cpu' with 'host_cpu', and 'build_os' with 'host_os'.

The roll also picks up the change to add a new 'gn clean'
command, some absolute path handling fixes, a check_includes fix for action_foreach(), and some minor
internal fixes.

This patch also updates the build config files to accommodate the GN changes in a backwards-compatible manner, i.e., the configs now will set cpu_arch and os correctly in the right contexts. They will also allow the users to continue to set os= and cpu_arch= in an args file, so no user builds (or bots) will break.

Once all of the bots and all of the build files have been updated to refer to the new variables instead of the old ones, we can drop the backwards-compatible versions.

TBR=brettw@chromium.org
BUG=344767
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

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

Cr-Original-Commit-Position: refs/heads/master@{#317186}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7ee02bed35766535521c8e1f072b98cbf9eef53d
2015-02-20 00:16:56 +00:00
yyanagisawa 3eaaaae1a8 Make use_goma=true also work for Mac GN.
Since toolchain/mac/BUILD.gn did not have anything to support
use_goma, even if use_goma=true set, the flags was just ignored.

BUG=459435

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

Cr-Original-Commit-Position: refs/heads/master@{#316758}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 874b8fe5991b4f57088f3ff4218cc8e8acd2b18d
2015-02-18 03:19:41 +00:00
yyanagisawa 4f7f53cbd0 Move description of win/setup_toolchain.py before import.
Moved description just before import, and it should make the file description more looks like so.

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

Cr-Original-Commit-Position: refs/heads/master@{#316597}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a5679784256b268d2fd46ae7d501b02a265c36d
2015-02-17 17:36:02 +00:00
yyanagisawa fc4db16112 Fixed several pylint warnings on Windows.
Review URL: https://codereview.chromium.org/929183002

Cr-Original-Commit-Position: refs/heads/master@{#316527}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a0f67e034ea83f64ba12240176cd6fdd0ac8b878
2015-02-17 04:02:45 +00:00
halton.huo 5b99dcae1f Fix wrong lib directory for x64 and mips64el target.
Linker report incompatible target errors on crtbegin_so.o and
crtend_so.o because /usr/lib is set incorrectly on x64 target.

mips64el is also changed and arm64 keep use /usr/lib after checking
each platform ndk toolchains but not verified because no environment.

BUG=none

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

Cr-Original-Commit-Position: refs/heads/master@{#316128}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 964602788cc2d0a2b0cb89fcbe1691852d25f251
2015-02-13 02:02:37 +00:00
halton.huo ecccd44736 Add GN build support for Android 64-bit platforms.
gn now run with arg target_arch = "x64", arm64 and mips64el
releated changes are added as well but not verified.

BUG=none

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

Cr-Original-Commit-Position: refs/heads/master@{#315680}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 98de73d11797b1b0ac7ac0b2f4234cb8f57bd2fc
2015-02-11 00:09:18 +00:00
yyanagisawa e942ff5052 Should use sofile instead of soname.
If soname is used here, nm cannot find the file if non-default
toolchain is used.

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

Cr-Original-Commit-Position: refs/heads/master@{#313639}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a2ed43445333a1f317e54c16ffda5b69e0786e39
2015-01-29 00:35:30 +00:00
vchigrin 0e38bd9ec3 Fix ui/gl and gpu target building with GN on Windows.
Review URL: https://codereview.chromium.org/809783002

Cr-Original-Commit-Position: refs/heads/master@{#309754}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e43326b6726b227c739383bae5f51368833a12d3
2014-12-30 09:42:14 +00:00
dpranke cd80131348 Add dpranke, scottmg as owners for GN-related files in src/build.
Also, remove the 'set noparent'; that was probably useful when
build/OWNERS had a wildcard, but it doesn't any more.

R=brettw@chromium.org
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#308133}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3bce201c67c641d29f78960ebcf84b5c24467e16
2014-12-12 18:56:50 +00:00
scottmg 3d7a455c47 win gn: Semi-support for non-depot_tools toolchain
I had to set:

DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_MSVS_OVERRIDE_PATH=C:/Program Files (x86)/Microsoft Visual Studio 12.0
GYP_MSVS_VERSION=2013
WindowsSdkDir=C:/Program Files (x86)/Windows Kits/8.1

then

gn gen out\gn --args="is_debug=true cpu_arch=\"x86\""
ninja -C out/gn base

worked OK.

Further patches welcome to make this less ugly.

R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#307791}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fa5da3e4e515967d593c3822b1d82f5e844080c5
2014-12-10 23:34:32 +00:00
scottmg 317bbea2be gn format // (the rest, except mojo)
Excluded mojo because I think that needs to happen on the other side.

At gn --version = 306668 for which roll is in CQ.

R=brettw@chromium.org
TBR=scherkus@chromium.org
BUG=348474

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

Cr-Original-Commit-Position: refs/heads/master@{#306708}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34fb7e5919ed42dc800acf3961fe6a2bf9e7d6eb
2014-12-03 23:27:41 +00:00
dpranke 678cc5b51e Make goma work on win GN builds.
R=scottmg@chromium.org, brettw@chromium.org
BUG=354261

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

Cr-Original-Commit-Position: refs/heads/master@{#306469}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c9960f39142de51b59f38d1ddc1f6fe7aad92cb0
2014-12-02 22:07:14 +00:00
scottmg fd96972e70 gn format //build
A starting point for doing all of src, and adding a PRESUBMIT.

Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.

Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat

The only things that I don't love in the current output are:

1. Turning

    args = [
      "--depfile", rebase_path(depfile, root_build_dir),
      "--android-sdk-tools", rebased_android_sdk_build_tools,
      "--dex-path", rebased_output,
    ]

into:

    args = [
      "--depfile",
      rebase_path(depfile, root_build_dir),
      "--android-sdk-tools",
      rebased_android_sdk_build_tools,
      "--dex-path",
      rebased_output,
    ]

The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.

2. Turning single line

    if (defined(invoker.inputs)) { inputs = invoker.inputs }

into

    if (defined(invoker.inputs)) {
      inputs = invoker.inputs
    }

This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.

In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.

R=brettw@chromium.org
BUG=348474

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

Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
2014-12-02 00:25:35 +00:00
mostynb ac484dd023 add ccache support to gn builds
This can be used to inject icecc also, via the CCACHE_PREFIX environment
variable.

BUG=394501

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

Cr-Original-Commit-Position: refs/heads/master@{#305912}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 50ff7a9494412cdab84c472db73d1e148fcec761
2014-11-26 23:24:32 +00:00
scottmg 3945ce8135 gn win: Various toolchain fixes to get compile working
This fixes
"fatal error C1902: Program database manager mismatch; please check your installation"
and
"cannot find msvcr120.dll"
during gn compilation.

There were many things wrong. The primary ones were that:
1) the compiler's setup script wasn't called so we didn't get
   PATH/LIB/INCLUDE for the correct cl.
2) the VS runtime dirs were not getting added to environment block.

I also removed the Express handling, as that's been removed from the
gyp path now.

This does not yet support a system-installed Visual Studio. Code
needs to be added to query the registry to find the install location.
(see _SetupScript).

R=dpranke@chromium.org
TBR=brettw@chromium.org
BUG=432375

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

Cr-Original-Commit-Position: refs/heads/master@{#304864}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9bf8fb3b74de68a85122cb45bb477d604b8c3898
2014-11-19 19:33:52 +00:00
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
cmasone fbf385d4ba GN: Fix compile errors with os==chromeos mojo/public build
The big changes here are:
1) Allow injecting of a target toolchain via args for os==chromeos.
2) For ARM builds, allow injecting -mtune and -mfloat-abi settings.
3) Allow injecting a pkg-config wrapper that correctly handles the
   CrOS build environment. This is how pkg-config is handled for
   all other packages in the build.
4) Create libmojo_sdk target, a static library of public Mojo code
   suitable for distribution.
5) Added testonly = true to a few targets under mojo/ that are not
   meant to be used in production.

BUG=388412
TEST=Create a target that builds //mojo/public, build with os==chromeos

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

Cr-Original-Commit-Position: refs/heads/master@{#296849}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2c8e745d9c4de27b44f4d866a2bf0f0a880d9b8c
2014-09-26 01:28:15 +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
cjhopman dd11b15b83 Make base_unittests_apk actually work
This changes the "test" template to create a shared_library (instead of
an executable) on Android. After this, we can actually run
base_unittests with
`build/android/test_runner.py gtest -s base_unnittests`
as normal (though may need to CHROMIUM_OUT_DIR and BUILDTYPE as
appropriate).

This requires adding the following targets:

//testing/android:native_test_native_code
//testing/android:native_test_util
//testing/android:native_test_jni_headers
//tools/android/md5sum:md5sum
//tools/android/md5sum:md5sum_bin
//tools/android/md5sum:md5sum_prepare_dist
//tools/android/md5sum:md5sum_copy_host

Also, makes it so that native executables are stripped (just like shared
libraries). Adds a simple create_native_execuatable_dist template that
sets up a dist directory for the executable (see
build/android/gyp/native_app_dependencies.gyp).

BUG=359249
TBR=rlarocque

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

Cr-Original-Commit-Position: refs/heads/master@{#294032}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e65ead8fb1a1976682356cf824445476584e70f0
2014-09-09 23:27:27 +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
cjhopman 0f1865d588 Add content_shell_test_apk and several dependencies
This adds support for android_apk targets without any java included
directly in the target (only included through deps).

This adds the following targets:

//base:base_javatests
//content/public/android:content_javatests
//content/shell/android:content_shell_test_apk
//media/android:media_android_imageformat_list (moved)
//media/android:media_java (moved+fixed)

BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#293897}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 394dfd1052e53e64083daef7cc66055557256dcb
2014-09-09 08:58:14 +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
thakis@chromium.org b37fe3f31e Remove unused gn tool script.
No intended behavior change.

BUG=
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@288728 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-11 16:44:40 +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
jamesr@chromium.org 9408b7c44f GN: Use rsp file, not rsp file contents, in solink line
Passing $rspfile_content passes the content of the rsp file verbatim
to the command line, which kind of defeats the purpose of using rsp files.
@\$rspfile tells the linker to open up the file itself.

BUG=398255

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286675 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-31 01:33:30 +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
cjhopman@chromium.org 2c8b4178b7 Fix solink and add a postsolink hook (use the hook for android strip)
The solink command included the "real" link command twice and only used
the libs_section_prefix/postfix in one of the two. This splits the
construction of the link command up a bit to make it clearer.

This adds a simple post_solink arg to gcc_toolchain that allows the
caller to add more stuff to the solink command. This is used to
automatically strip all shared libraries in Android builds (in gyp, we
do this for a library once for each apk that it is in :/ ).

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286282 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-29 20:15:29 +00:00
jamesr@chromium.org 5d74c40924 GN: Specify correct prefix/postfix libs for solink on android
On android we have to specify crtbegin_dynamic.o / crtend_android.o when
linking executables and crtbegin_so.o / crtend_so.o when linking shared
libraries. This splits the variables up in gcc_toolchain so the android
template can differentiate between the two.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@285991 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-28 22:03:06 +00:00
dpranke@chromium.org 755e622e71 Make the GN Android builds goma-aware.
R=brettw@chromium.org
BUG=394501

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284756 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-22 19:35:01 +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
dpranke@chromium.org b1fcc693ac Make goma work for the GN build on linux.
This drops the old gyp-compatible settings and wires up the
Linux and Android toolchains to be goma-aware. Mac and Win can
follow in subsequent CLs.

R=brettw@chromium.org, thakis@chromium.org
BUG=394501

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@283971 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-18 01:51:08 +00:00
brettw@chromium.org 94a0d8dd86 Make it possible for Android GN host builds to use Clang.
The problem was that the toolchain definitions had an is_clang block in them, but this is only evaluated in the context of the default toolchain (so false for and Android build). But then when we were re-evaluating the build config for the host compile, it was forcing clang to true which was causing the clang flags to be set.

This changes the way we default the is_clang value. Forcing it to true prevents it from being overridden manually. In some cases, like mac, this is pointless. In other cases like Linux, we may want to turn it on and off. Changing this definition allows us to toggle it on and off for different toolchains as we desire.

Ideally I think the way of defining toolchains would be different to make this a bit more flexible, I'll think about this. But this will work for now.

R=thakis@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282685 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-11 20:27:10 +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 cf4ade91bb Allow dependencies of toolchains in GN.
A toolchain definition can now specify "deps" which will be resolved before any target in that toolchain is compiled. This is useful for toolchain setup operations.

R=noelallen@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@280052 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-26 18:12:30 +00:00
jamesr@chromium.org aa7ec418a3 GN: Use -Wl,-filelist for rsp files on mac instead of @
The mac GN build exceeds the command line limit when linking large
targets like webkit_unit_tests. The fix is to pass a response file to
the linker instead of passing a list of object files. Passing this by
@rspfile ends up expanding the list before calling clang, so this instead
passes it via the filelist parameter.

BUG=386046

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@278424 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-19 18:16:41 +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