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

85 Коммитов

Автор SHA1 Сообщение Дата
dpranke a18e0f23af patch from chinmaygarde@ to make progress on mac, ios.
I've taken ad591c629a
and merged it onto Chromium ToT, with a few lint and other cleanups,
and one fix to make sure that Mac still compiled (which may have broken
iOS, haven't tested yet).

R=brettw@chromium.org, sdfresne@chromium.org
BUG=459705
CQ_EXTRA_TRYBOTS=tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

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

Cr-Original-Commit-Position: refs/heads/master@{#342297}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a29462a04dabad3fc20dc922227c46b36459912
2015-08-07 05:23:38 +00:00
agrieve e6ae034018 GN (Android): Make is_clang work for (at least for arm32)
There seem to be more compiler flags to tweak for other target
architectures, but with this I could at least build & run chrome_apk
with is_clang=true

BUG=402625

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

Cr-Original-Commit-Position: refs/heads/master@{#342227}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 91d9b7ee4e51168ef413265e33b8fe25253a1758
2015-08-06 23:19:30 +00:00
brettw e57109eb3e Pull ICU, rename component build GN variables.
This ICU roll only renames component_mode -> is_component_build

Update other users of the component_mode string to is_component_build.

Rename the declaration to be local to BUILDCONFIG.gn (prefixed with '_').

Removes a bitrotted GN unit test around component handing (it wasn't
testing anything useful any more since we removed the built-in
component function).

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

Cr-Original-Commit-Position: refs/heads/master@{#342204}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a08763777c45ca4e7a00a846266bbfed31ef673
2015-08-06 21:39:37 +00:00
brettw 299e90170d Use new GN features in the build.
Uses forward_variables_from for some obvious cases not including the Android build, and use the template() function in the component() definition.

Remove uses of component_mode since I want to delete that.

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

Cr-Original-Commit-Position: refs/heads/master@{#341767}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a09029884e02a3c027a485877886cf75969f6b3d
2015-08-04 19:52:35 +00:00
fredlebel b6d9f8cb3f Laying the groundwork for targeting WinRT for WebRTC.
Now supporting various flavors of WinRT in the target_os argument.
Setting compiler and linker flags so cc files are compiled
to support C++/CX syntax.

This is part of a larger effort to port WebRTC to WinRT.

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

Cr-Original-Commit-Position: refs/heads/master@{#340893}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 56f81e32556d513af513eac0710f2e85877ffa3b
2015-07-29 15:50:36 +00:00
tfarina 3573875d47 build/config: No need to handle direct_dependent_configs in GN build.
direct_dependent_configs is the deprecated name for public_configs,
and public_configs is already handled.

gn-dev thread:
https://groups.google.com/a/chromium.org/d/topic/gn-dev/h9N85MIx_Bk/discussion

BUG=None
TEST=gn gen out-gn/Release --args='is_debug=false is_component_build=false symbol_level=1'
R=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#340524}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 65c461c8e9c02230fda24736ef77eedf51fa675c
2015-07-27 19:10:41 +00:00
brettw a49104b8f7 Move build flags to .gni file.
Add comments to build config about target setup.

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

Cr-Original-Commit-Position: refs/heads/master@{#338865}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fd1c6721afa39afa7f9d8a36f3faa683061726e9
2015-07-15 16:12:20 +00:00
thakis 2e4c8015ad clang/win: Make everything work in a GN build.
Do this by removing the default_warnings config, moving the flags in there to a
variable, and use it in both the chromium_code and no_chromium_code configs.

If a target does

    configs -= [ "//build/config/compiler:chromium_code" ]
    configs += [ "//build/config/compiler:no_chromium_code" ]

this would add no_chromium_code to the end of configs previously, and the
-Wno-foo flags in default_warnings would be passed before the /W3 flag in
no_chromium_code (and /W3 would then override some of the -Wno-foo flags).
By moving the flags into no_chromium_code, they're guaranteed to appear
after /W3 (and after -Wall on POSIX).

See also thread "configs and warning cflag ordering" on gn-dev:
https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/qkqdlwtcQW4

In a similar vein, move a -Wno-foo flag in skia/BUILD.gn into a config, to make sure
it appears at the end of the compile command.

While here, also remove /wd4267 from skia's BUILD.gn, it's already passed globally
(this part doesn't change behavior).

(clang-cl working with gn also needs an ffmpeg roll to pick up
5eb7926d25
This is blocked on http://crbug.com/496975)

BUG=491209
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/1151303006

Cr-Original-Commit-Position: refs/heads/master@{#333380}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0bfa8a8a759697b140ef2a18f058513ec8485a57
2015-06-08 23:15:01 +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
tmoniuszko 28b3ad469a Add support for module-definition files to gn
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#332355}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b73b2de6a23e3220c79c6bb9e9f3a7b4dd20d2dd
2015-06-02 08:04:38 +00:00
brettw 5a39ef9995 Clarify and update GN build flags docs.
Some of the documentation was unclear and out-of-date, and also didn't really list what to do instead.

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

Cr-Original-Commit-Position: refs/heads/master@{#330761}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a05b7f011a620b2bb1046acacb4a5ac0f667603
2015-05-20 17:33:15 +00:00
sammc 2ab44496e3 GN: Implement is_lsan, is_tsan and is_msan.
Review URL: https://codereview.chromium.org/1134003008

Cr-Original-Commit-Position: refs/heads/master@{#330710}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f51e78122a0fa2c42a8dcfea688fb5ebde75e944
2015-05-20 07:33:48 +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 6a9e7271f7 Add a GN flag for the Windows multi-dll build.
The first pass of moving the other Chrome-specific build flags out of the root build config file and into the new one. This requires both ffmpeg and Blink changes to finish landing.

Originally landed as https://codereview.chromium.org/1120803003/
TBR=scottmg@chromium.org
TBR=ddorwin@chromium.org (widevine)
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/1123433002

Cr-Original-Commit-Position: refs/heads/master@{#327998}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b2364bb2c6fbb88e6a4550abeb9141bc7cb949c
2015-05-01 22:36:58 +00:00
rickyz c06bc70a26 Revert of Add a GN flag for the Windows multi-dll build. (patchset #3 id:40001 of https://codereview.chromium.org/1120803003/)
Reason for revert:
May have caused some link errors on windows: https://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN/builds/814

Original issue's description:
> Add a GN flag for the Windows multi-dll build.
>
> The first pass of moving the other Chrome-specific build flags out of the root build config file and into the new one. This requires both ffmpeg and Blink changes to finish landing.
>
> R=scottmg@chromium.org
> TBR=ddorwin@chromium.org (widevine)
>
> Committed: https://crrev.com/edff53a35780ba2f515c7e8d4f7131c91151e1a3
> Cr-Commit-Position: refs/heads/master@{#327854}

TBR=scottmg@chromium.org,brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#327861}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e203954b33d80072a7c8d256ffdc69fa42262765
2015-05-01 01:45:41 +00:00
brettw 8b84afe088 Add a GN flag for the Windows multi-dll build.
The first pass of moving the other Chrome-specific build flags out of the root build config file and into the new one. This requires both ffmpeg and Blink changes to finish landing.

R=scottmg@chromium.org
TBR=ddorwin@chromium.org (widevine)

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

Cr-Original-Commit-Position: refs/heads/master@{#327854}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: edff53a35780ba2f515c7e8d4f7131c91151e1a3
2015-05-01 01:10:14 +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 dbeed0e1a4 Incremental linking setup for GN Windows build.
Makes chrome.dll on Windows not use incremental linking since the ilk files get too large.

This refactors the incremental linking configuration to make it easier to change the default.

BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#321585}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8900cf9444fc3e0adf6728926c96337ccadc9674
2015-03-20 17:08:57 +00:00
brettw 3212dac9c5 Remove link_chrome_on_windows GN flag.
This flag was used to disable linking when the bots were too behind. It's not needed any more.

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

Cr-Original-Commit-Position: refs/heads/master@{#318795}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4897a61fd022efb0b43033846fe878a351c55b35
2015-03-02 23:13:43 +00:00
dpranke 986b05cb9e Land prep work to enable NaCl in the Linux x64 GN builds.
This should get most of NaCl and the PPAPI stuff needed
for NaCl building and linking. There is more work to be
done to get some of the test binaries working (and
probably fill out parts of the NaCl SDK) and possibly
some pnacl support work remaining as well.

NaCl is still disabled by default (set enable_nacl=true
to change). Enabling nacl is still mostly untested and
likely doesn't work at all :).

R=ncbray@chromium.org, brettw@chromium.org
BUG=432959
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/877553008

Cr-Original-Commit-Position: refs/heads/master@{#318180}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6065cf751340a8a99b670357b2053ed6df12a7af
2015-02-26 03:31:51 +00:00
dpranke 5bfd4d4a54 Fix GN os, cpu defaults for Android builds.
We would like to be able to default to the ARM CPU for
Android builds, not the host cpu (so that you can get the
default Android build by just specifying os="android");
prior to my cpu_arch -> target_cpu changes, this was the
case, but I accidentally broke this.

However, the target_cpu changes at least allow us to remove
the target_arch hack which was how they were accomplishing
this before :).

TBR=brettw@chromium.org
R=cjhopman@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/946683002

Cr-Original-Commit-Position: refs/heads/master@{#317419}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 55187fbe2d3264d4c31432e2f8a77f094d7c986b
2015-02-20 22:10:45 +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
torne 84b157fe6d android: Hide JNI exports by default.
Hide JNI exported functions in Android binaries by default, unless the
target in question has explicitly set "use_native_jni_exports" to
indicate that it relies on the JVM's automatic symbol lookup mechanism.

The functions are simply demoted to hidden visibility; the code will
remain unless the linker determines that it is unreferenced and strips
it via --gc-sections.

This ensures that binaries by default actually test the explicit JNI
registration codepaths, which are required for compatibility with the
crazy linker, while still allowing binaries that do not require crazy
linker compatibility to choose to use the automatic mechanism in future.

BUG=442327

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

Cr-Original-Commit-Position: refs/heads/master@{#316896}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9d90d85f73ca46847047ccbda270f25b637ccc86
2015-02-18 21:37:59 +00:00
dpranke 01aa1aeef9 Enable linking full chrome on windows GN builds again.
Now that we have fastbuild and Goma working, it should be safe to
link the full binary again in a GN build on the bots.

TBR=brettw@chromium.org, jam@chromium.org
BUG=354261

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

Cr-Original-Commit-Position: refs/heads/master@{#315140}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3f7de242521430670f79ab9bca1a6f3f0e53d6c2
2015-02-06 23:55:15 +00:00
brettw 3cf759cbfd Disable chrome target and tests on Windows.
The bots don't have the capacity to link these targets.

TBR=dpranke

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

Cr-Original-Commit-Position: refs/heads/master@{#314065}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6bb47923233d145ffd17a9d4aa72dfee059e468f
2015-01-31 20:19:37 +00:00
qsr 4bd61eb9cd Move the test template to //testing/test.gni (part 2)
This CL move the test target from build/config/BUILDCONFIG.gn to testing/test.gni

It also update the test template to automatically build an apk on Android.

R=cjhopman@chromium.org,brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#312396}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fb5251d1ff4f36ea296da4be72ddf26a9e3e5643
2015-01-21 15:58:20 +00:00
mostynb be79cc6d3c gn: declare is_desktop_linux as a build argument
BUG=448159

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

Cr-Original-Commit-Position: refs/heads/master@{#311236}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e925a3b964d080423a2aef982c193139c4c4cca3
2015-01-13 08:06:06 +00:00
brettw 3e5c6bffda Add browser_tests to the GN build.
Other misc fixes including:

Add "data_deps" to the templates in BUILDCONFIG. This was renamed from "datadeps" a while ago but both are still supported.

extension_management_test_util.cc includes a generated file policy_constants. GYP generates this with an extra "policy" directory but GN doesn't. The way GYP has the dirs set up, though, using only one "policy" works (and this is what other files do) so I just changed the include.

TBR=dpranke

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

Cr-Original-Commit-Position: refs/heads/master@{#310276}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7d6ec24650eb3f6c7ab8dcfcf0c2829095951962
2015-01-07 13:01:40 +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
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
dpranke 9ab5c27e4e Do not try to link chrome or app_shell in chromeos gn build.
On ChromeOS, Chrome links in the remoting host, which isn't gn-ified yet.
I'm not quite sure why app_shell doesn't work, but it might be the same
issue.

TBR=cmasone@chromium.org
BUG=424337

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

Cr-Original-Commit-Position: refs/heads/master@{#302524}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6fc75b3f8718593090cca2b4a6cba0e84122d201
2014-11-04 00:04:21 +00:00
qsr a3df1ca722 [Android] Fix gn build for instrumentation tests.
This fixes the following issue:
- allow forwarder2 to compile with clang
- Makes android executables position independant so that they can be run
  on android devices
- Add missing BUILD.gn

TBR=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#302429}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cad816ee8f32cdec09c26bdc8fbbe881ceeb053d
2014-11-03 15:37:41 +00:00
sky 59039fcb01 Adds ability to build for asan with gn
BUG=none
TEST=none
R=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#301751}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fec68221196ae74b73f6c7a4c574bd33666bb7ed
2014-10-29 00:53:18 +00:00
cjhopman 9268b1bab5 GN: add target_arch build arg for android
This changes android to use the target_arch build arg for setting the
target architecture instead of cpu_arch.

Some benefits of this:
non-target toolchains have knowledge of the target architecture
(required for the relocation packer host executable)
allows us to have a default target_arch different from build_cpu_arch

BUG=359249,344767

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

Cr-Original-Commit-Position: refs/heads/master@{#300136}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a7697bcfeed1dbbdafb419bc133e7d09774be485
2014-10-17 18:47:25 +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
Brett Wilson b2d817f645 Improve GN header checker, make "check" on //ui/* pass.
I went through and made "gn check //ui/*" pass, and did a lot of enhancements for the bugs I found.

Fixes a big bug in the header checker where it did not consider direct private dependencies to be OK from a header include perspective. However, private deps only change things when there are intermediate targets. This patch marks direct deps OK, and changes the variable names from is_public to is_permitted (since it may not actually be public).

Allow includes to be permitted if any target allows the include, rather than all of them. This happens if multiple targets have the same file as sources.

Strip the generated file directory from the beginning of sources. Previously, this was only for outputs (since typically they're included assuming the root gen dir is on the path). This comes up when an action generates a file, and then it's put into a source set (which we do a lot). This change allows a public dependency on the source set to count for header include purposes.

Track public/private deps in the dependency path finder so the error message can show which deps are private that break the chain. This was really helpful when tracking down errors.

Add deps and public deps to the build to make check pass.

R=scottmg@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#295783}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0380637c0085884d209fbbcaf0f0b0871fac162a
2014-09-19 21:26:05 +00:00
Scott Graham ee804cd3fa gn: various gyp flag matching for 'base'
- Don't remove -fno-ident from gyp build (was added about 3y ago, seemingly unnecessary for current clang)
- Add -fno-slp-vectorize to GN to make builds match (both to be removed after next clang roll)
- Make usage of -Wno-reserved-user-defined-literal match (required for dbus pre-trusty)
- Add -march=x86-64 to gn cflags
- Default symbol_level based on is_debug, and turn it off by default in Release (same as gyp)

Also, fiddle with output of gyp_flag_compare.py.

R=brettw@chromium.org
BUG=335824

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

Cr-Original-Commit-Position: refs/heads/master@{#294489}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 29682b848742042388ebd29c9df775f074c1414c
2014-09-11 23:30:49 +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 4ee608a4a5 Make ui gn check pass. Misc GN build improvements.
Content/public/app was messed up and didn't link everything properly, so this separates it out into browser and child like content/app is.

R=jamesr@chromium.org
Reland of https://codereview.chromium.org/545313002/ but with public/utility dependency added

TBR=jamesr@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#293646}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a78fdeda3324eab3427e2c8009c80fcaa906b675
2014-09-07 00:36:35 +00:00
thakis 5a7e9a90d2 Revert of Make ui gn check pass. Misc GN build improvements. (patchset #3 id:40001 of https://codereview.chromium.org/545313002/)
Reason for revert:
Broke http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/11835

[783/786 | 258.324] LINK ./chrome
FAILED: /mnt/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,--fatal-warnings -m64 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -pthread -B../../third_party/binutils/Linux_x64/Release/bin -fuse-ld=gold -Wl,--icf=none -Wl,-rpath=\$ORIGIN/ -Wl,-rpath-link= -Wl,--disable-new-dtags -o ./keyboard_unittests -Wl,--start-group @./keyboard_unittests.rsp  -Wl,--end-group  -ldl -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -ludev -lfontconfig -lX11 -lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender -lXss -lXtst -lpangocairo-1.0 -lpango-1.0 -lcairo -lnss3 -lnssutil3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lgconf-2 -lresolv -lfreetype -lasound -lXrandr -lcups -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgcrypt -lz -lpthread -lcrypt -lm -lcap -ldbus-1 -lcrypto -lexpat
../../content/utility/utility_thread_impl.cc:38: error: undefined reference to 'content::UtilityThread::UtilityThread()'
../../content/utility/utility_thread_impl.cc:44: error: undefined reference to 'content::UtilityThread::UtilityThread()'
../../content/utility/utility_thread_impl.cc:49: error: undefined reference to 'content::UtilityThread::~UtilityThread()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Original issue's description:
> Make ui gn check pass. Misc GN build improvements.
>
> Content/public/app was messed up and didn't link everything properly, so this separates it out into browser and child like content/app is.
>
> R=jamesr@chromium.org
>
> Committed: b41a8d6e78

TBR=jamesr@chromium.org,brettw@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#293595}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3f1281e5b0f2d2f8a8d8bd17a108f6ed0c9c7d7f
2014-09-06 00:23:15 +00:00
Brett Wilson 96d312afd8 Make ui gn check pass. Misc GN build improvements.
Content/public/app was messed up and didn't link everything properly, so this separates it out into browser and child like content/app is.

R=jamesr@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#293592}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b41a8d6e789ac5df9a6d314cd0ad59f584f53dea
2014-09-05 23:32:30 +00:00
Brett Wilson d000bd880a Add the "testonly" flag to the GN test target.
Now that the new GN has landed with support for this, we can start using this flag.

R=viettrungluu@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#293579}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6643d00237eff7a9d1de2ac771f861f61785f6fb
2014-09-05 21:12:15 +00:00
brettw de542c8753 Pull buildtools to get GN r293190
TBR=jamesr

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

Cr-Original-Commit-Position: refs/heads/master@{#293269}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: babd228391d379b59d5f60befb76ce0640aad90e
2014-09-04 06:03:34 +00:00
Brett Wilson 392cc7e5a7 Add some more libjingle targets to the GN build.
Add usrsctp. Make Windows version configurable for this in the build.

direct_dependent_configs for libsrtp.

R=hclam@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#293004}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c63f22b374dd953b8003800babbe833688e4b93d
2014-09-02 22:02:22 +00:00
Brett Wilson d91f1add98 Remove built-in component and test targets from GN.
Previously "component" was a built-in function that forwarded to source_set, static_library, or shared_library depending on the value of component_mode. And test was a built-in function that forwarded to executable.

These can be expressed as templates instead. This patch removes the built-in versions and implements the templates in the master build config file.

Forwarding all of the variables for these is somewhat tedious, but I still prefer not to add a new concept for this, since it will be rarely used and less clear what is happening.

With the updated BUILDCONFIG.gn file, the build will work with both the old and new GN version (the built-in version of component and test take precedence). When the new GN binary is pushed, we can remove the references to component_mode.

BUG=
R=hclam@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#292500}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 60a5bf4a8a5d1a2dad8e7a67f81e72756e886266
2014-08-28 23:36:31 +00:00
Brett Wilson eddfca026d Generate symbols in debug GN builds.
The previous code removed symbols from clang builds based on what GYP used to
do. But GYP changed this logic when clang was set to the default. GN was then
left with clang on by default, but no symbols.

This adds some additional GYP flag parity work.

R=scottmg@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#291803}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7927079955d2767e1fa812fe58432fcb9d6250aa
2014-08-26 00:30:25 +00:00
thakis@chromium.org 6a4a3e6a0e Use clang as host compiler on android with gn too.
This ports https://codereview.chromium.org/430383002/ to gn.
Patch from brettw in https://codereview.chromium.org/385823002/ , this just
activates it.

BUG=360311
R=brettw@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287416 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-05 00:13:11 +00:00
cjhopman@chromium.org e113a571c9 Fix optional neon support
On Android, we detect neon support at runtime and switch implementations
based on that. This requires that some parts of skia are compiled with
-mfpu=neon.

To support this, the -mfpu flag is moved out of the 'compiler' config
and into its own config. A target can then remove this config and supply
its own -mfpu flag (without having to duplicate all the other stuff in
the 'compiler' config).

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286038 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-29 00:20:58 +00:00