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

64 Коммитов

Автор SHA1 Сообщение Дата
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
thakis@chromium.org 45acce3893 Port r282246 to gn.
Temporarily disable -Werror on linux, since the gn build isn't yet
warning-free with clang. Since gn doesn't use -Werror for all targets yet
anyways (http://crbug.com/393046) that seems acceptable.

BUG=360311,393046
R=brettw@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284372 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-20 19:08:58 +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 ce32780d1a Add components and CLD to GN build.
New components:
- rappor
- data_reduction_proxy
- captive_portal
- translate
- usb_service
- web_modal

Removes the _IMPLEMENTATION define for web_modal. It is unused (it is a static library, not a component).

Adds third_party/cld and third_party/cld_2 BUILD files.

Separates out the include dir setting of "//" and the root gen directory so. cld_2 needed to not have this due to base file name conflicts.

R=jamesr@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282438 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-10 22:00:37 +00:00
brettw@chromium.org 66841a46b7 Roll pdfium, add GN build for pdf and pdfium.
Pdfium changes:
d68f9a3  Add GN build file for pdfium, rename GYP target.
f0a5576  fix two uninitialized reads
https://code.google.com/p/pdfium/issues/detail?id=9
https://code.google.com/p/pdfium/issues/detail?id=10
bb2b1e7  Use unsigned type for iteration to avoid int overflow.
62a7fd6  Wrong variable assignment in Pdfium.

In the GN build this separates out the no-exceptions flag since pdfium must be compiled with exceptions enabled.

Updates pdfium naming in GYP from fpdfsdk.

Removes src/pdf from .gitignore now that it is checked in.

BUG=
R=jam@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@275269 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-05 23:19:28 +00:00
brettw@chromium.org 713f9bb98e Update skia and ui GN builds
Change some targets to source sets. These are small ones that are currently depended on by other source sets. This avoids some duplicate symbols.
duplicated.

Fix some conditions around the touch_device in ui/base.

Lots of Skia build fixes. It turns out our skia library does not use the "util" target, and some of the files in "util" reference functions that it seems are never defined in any file. This removes the ones in our list that weren't in skia_library.gypi to make accessibility_unittests link.

Update gesture recogniser file lists.

BUG=377890
TBR=scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@274022 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-31 04:40:23 +00:00
tfarina@chromium.org dd9ce89dc7 Introduce GN to desktop_linux arg and grit_defines list.
They are necessary otherwise grit won't define IDS_WEB_FONT_FAMILY and
IDS_WEB_FONT_SIZE from app_locale_settings.grd

Which is necessary, otherwise we get the following error when trying to
compile web_ui_util.cc:

../../ui/base/webui/web_ui_util.cc:130:28: error: 'IDS_WEB_FONT_FAMILY'
was not declared in this scope
../../ui/base/webui/web_ui_util.cc:131:26: error: 'IDS_WEB_FONT_SIZE'
was not declared in this scope

BUG=367591
TEST=gn gen out/Debug_gn && ninja -C out/Debug_gn ui_base
R=brettw@chromium.org
TBR=ben (for ui/base change)

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@274019 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-31 04:34:50 +00:00
brettw@chromium.org 76ee517b74 Add ppapi, improve Windows GN build.
This adds ppapi-related targets except the tests to the GN build.

Did some minor tweaks to the .gypi ppapi lists. Some files were duplicated between the trusted and common lists which causes errors in GN (it doesn't uniquify the lists like GYP). Common is used in every place trusted is, so I just removed the duplicates from the trusted list.

Fixed some warnings in skia and tcmalloc. Added the ability to undefine NOMINMAX on Windows.

Fixed some src/ui Windows compilation issues.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@273016 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-27 20:15:20 +00:00
brettw@chromium.org 6c4f020b94 Support private values in GN.
This adds special handling for variables that begin with underscores, which is inspired by Dart. Such variables are not imported when doing an import, which gives .gni files a way to have intermediate private variables that won't pollute the scopes of the files that include them.

This also applies to the root build config, which can have private values now.

Adds some missing unused variable checks. This was disabled because processing imports would mean all imported variables were unused, and files not using all of them would get unused variable errors. This adds the option to mark merged values on a scope as used, which is used for imported values.

BUG=341738
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@271078 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-16 19:31:36 +00:00
brettw@chromium.org f3470d3d53 Make GN Android build link executables.
Some minor tweaks in STL usage in GN itself to enable it to compile using the Android version of the STL. Enable this in the build (not so much because we need a GN binary on Android, but for build verification purposes).

Moved the executable_ldconfig config from the linux file to the gcc one since its shared between the Linux and Android builds. Added "-Bdynamic" and "-Wl,-z,nocopyreloc" to this on Android.

Moved some sysroot path components from sysroot.gni to android/config.gni (which sysroot uses) so it can be shared with the toolchain definitions.

Added the android_full_debug build flag. Made the "optimize off" mode of the build match the GYP build's "light optimization" on Android contingent on this flag.

Pulls out the optimize and optimize_max shared flags into one list to avoid duplication.

Adds a bunch of linker optimization flags that should be passed on non-Mac Posix platforms, and turns on dead code stripping for Mac builds.

Adds functionality to the gcc toolchain template to be able to insert strings before and after the libs. Adds a wrapper template for android toolchains that sets these accordingly to get the gross Android crtbegin/end files inserted in the right place on the linker line.

Made the android_ndk_root variable relative to the source root rather than the system root. Uses of this now rebase according to their own needs which makes some of the arguments a lot easier to follow.

Build file updates for base and libevent for Android. Implement ashmem library.

The only change on desktop linux is the addition of -Wl,--fatal-warnings to the linker line.

R=ajwong@chromium.org, cjhopman@chromium.org, scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@270138 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-13 17:41:06 +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 e4691a2c74 Make NSS work in GN build on Windows.
This also adds sqlite which is a dependency.

This required some build config changes since nss needs to opt-out of certain default settings.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@264255 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-16 18:29:50 +00:00
brettw@chromium.org bba65c5564 Implement net in GN build.
This does the net target. I started doing some more that are commented out at the bottom, and there are a few more after that do do. The deps of these targets started to build up to an unreasonable level and this should be a good checkpoint.

Fix grit rule.

Fix SSL dependent configs

Add TLD cleanup

Add gconf and gio targets for Linux.

Add sources filtering for ChromeOS, .rc, and .mm files. Remove built-in code that removes .rc and .mm files (this wasn't quite complete so causes problems).

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@263967 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-15 19:26:44 +00:00
dpranke@chromium.org b4ef9a7a08 Checkpoint work to get GN builds working on Android.
This fixes enough issues so that we can compile and link some libraries, but
it is not yet a working build.

Work remaining:
- base needs JNI support ('base_jni_headers', etc.)
- we need to figure out what should link and/or be APKs to run the tests
- we need to adjust GN to only build in the host config, not the target config.

R=brettw@chromium.org, cjhopman@chromium.org
TBR=jam
BUG=360936

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@263440 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-12 01:19:16 +00:00
brettw@chromium.org 6e3e0b1d12 GN Windows build fixes
This also removes some patterns from the sources assignment filter, and adds scary comments not to make it bigger. The GYP version of this is out of control so I want to set a clear policy of what is included and not.

I removed X-related stuff from the filter (there are only about 50 files around the tree) and added manual rules for the affected files.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@263394 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-11 23:06:17 +00:00
brettw@chromium.org 9f2d6d2450 GN: Work on Mac module search path.
This hooks up the rpath for Mac executables. This fixes a bug in iOS GYP generation where the architectures were specified as a string instead of a list.

Also fixes some base files that were out-of-sync from the GYP build.

BUG=345021
TBR=thakis

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@253952 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-27 22:46:42 +00:00
brettw@chromium.org d80637fd4a Hook up more GN toolkit and UI-based flags.
This renames the hack "my_msvs" project to "feature_flags" and creates an include file that gives the proper definitions of most of the UI-related feature and OS flags. Hook these flags up the build.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@250692 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-12 11:34:25 +00:00
brettw@chromium.org d2dedb2c78 Work on GN GYP host build.
This stops doing the host build as a completely separate build and
instead identifies the proper host toolchain inside of the "regular"
build that we should use for host targets (if any). This should help
unify GN's concept of host/target builds with GYPs a bit more.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@250689 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-12 11:27:00 +00:00
brettw@chromium.org cf1091c5ff Redefine is_linux to not include Android in the GN build.
This matches the GYP definition and seems to be what most build files expect.

This also removes some additions of lib "dl" which I'm making global.

R=scottmg@chromium.org
TBR=scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@250572 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-12 00:30:55 +00:00
brettw@chromium.org f887a7d363 Inject default libraries to all targets in GN.
In GYP Mac, most targets got a default set of mac libraries by virtue
of depending on base, which due to a GYP bug pushed the libraries to
all targets depending on base, even separate shared libraries.

In GYP Windows the set of default libraries on Windows is global and
this keeps the same list and behavior.

The lists of libraries could use some cleanup, btu this patch just
attempts to keep the status quo in a cleaner way rather than fixing the
unreasonable list of libraries (especially on Windows).

R=scottmg@chromium.org, scottmg

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@249600 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-07 03:59:56 +00:00
brettw@chromium.org 94c2bc8bc0 Add Linux SDK to GN build.
I forgot to actually reference this config when I created it.

R=thakis@chromium.org
TBR=thakis

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@249301 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-06 08:35:34 +00:00
brettw@chromium.org f902545676 Work on GN iOS build.
Separates out some "SDK" related setup on Mac land Linux like we do on Windows. I'm trying to make the "compiler" BUILD file just compiler warnings and CPU options, and have system library stuff on the platform directories.

This adds the capability for GN to produce GYP files on Mac that vary according
to the GYP generator as well as target-vs-host. I added a bunch of logic to the
GN iOS build to set up stuff accordingly based on my current knowledge of
what's required.

Sadly, this means we now have an 8-way GN build (all combinations of
debug/release, host/target, and xcode/ninja). I did some refactoring of the GYP
code in GN to make this less unreasonable.

I checked that the GYP files look the way I want, but I didn't actually test
the resulting builds yet. There is still likely to be some conditions wrong or
things not being set properly. I'm going to follow up with a second pass based on actual testing.

I believe, however, that with this new GYP generator code in GN, we can express
in the .gn files what we need to do the iOS build.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@248476 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-03 12:04:33 +00:00