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

229 Коммитов

Автор SHA1 Сообщение Дата
dpranke 5cb2ea1147 Rework the way ChromiumOS toolchains will work in GN.
This CL reworks the way ChromiumOS toolchains work in GN, in such a way
that they might actually have all the flags they need for the
ChromiumOS ebuild files to be able to set all of the flags it needs
(though there are still some missing GN build_args).

Specifically, the ebuild will now need to set the following in args.gn:

  host_toolchain = "//build/toolchain/cros:host"
  v8_snapshot_toolchain = "//build/toolchain/cros:v8_snapshot"

in order to support boards other than the amd64-generic build. The
ebuild should actually set these variables all the time; it just
happens that the amd64-generic build will work at the moment without
the variables, but that will not be guaranteed to remain true in the future.

This CL also adds the following optional build args that do pretty
much what you'd expect them to do:

  cros_target_ld, cros_target_extra_cflags, cros_target_extra_cppflags,
  cros_target_extra_cxx_flags, cros_target_extra_ldflags,
  cros_host_ar, cros_host_cc, cros_host_cxx, cros_host_ld,
  cros_host_is_clang, cros_host_extra_cflags, cros_host_extra_cppflags,
  cros_host_extra_cxx_flags, cros_host_extra_ldflags,
  cros_v8_snapshot_ar, cros_v8_snapshot_cc, cros_v8_snapshot_cxx,
  cros_v8_snapshot_ld, cros_v8_snapshot_extra_cflags,
  cros_v8_snapshot_extra_cppflags, cros_v8_snapshot_extra_cxx_flags,
  cros_v8_snapshot_extra_ldflags

This CL should be backwards-compatible with the existing linux desktop
ChromiumOS builds and the amd64-generic simplechrome/ebuild (i.e., it
can be landed and reverted w/o requiring any other changes to be made).
It is a big hammer intended to un-block the ChromiumOS GN migration
while we continue thinking about how to best support ChromiumOS.

R=stevenjb@chromium.org, brettw@chromium.org
BUG=608596, 595653

Review-Url: https://codereview.chromium.org/1983613002
Cr-Original-Commit-Position: refs/heads/master@{#394534}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8ad2f49335feaddddbd3f318fc6f4d13eb52760b
2016-05-18 20:34:27 +00:00
krasin 3a019f01a4 Reserve more RAM per Gold process.
The current settings are too agressive even given the fact that
all the bots have 200+ GB RAM, and there's not so many large targets.
OOMs were observed:
https://build.chromium.org/p/chromium.fyi/builders/LTO%20Linux/builds/500

BUG=453195

Review-Url: https://codereview.chromium.org/1989083003
Cr-Original-Commit-Position: refs/heads/master@{#394423}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b1e7d762e134b94196f551667ed31535b701e76e
2016-05-18 15:19:04 +00:00
Gordana.Cmiljanovic df4a2c58e4 MIPS64: Fix MIPS64 related issues in GN files
Sets sysroot and few missing files for MIPS64 Android.

BUG=sysroot is an empty string
TEST=gn gen out-gn/mips64-android --args="is_debug=false target_os=\"android\" target_cpu=\"mips64el\" chrome_public_apk_use_chromium_linker=false"
     ninja -C out-gn/mips64-android system_webview_apk chrome_public_apk

Review-Url: https://codereview.chromium.org/1984303002
Cr-Original-Commit-Position: refs/heads/master@{#394379}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be0e03709bbdb62d6c8585c2a191502a41ea756f
2016-05-18 10:49:24 +00:00
rsesek 1b63b7ad54 [Mac/GN] Set up the component build.
This adds the required framework to libs[] wherever they are required (most
of the changes in this CL). It also enables the component build optimization
of creating a non-bundled dylib to roll up all the sources and dependencies.
The framework then links that, which allows the build to not copy the bundled
library if any sources change. This is based on the technique implemented
https://codereview.chromium.org/11420019/.

BUG=431177
R=thakis@chromium.org,brettw@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/1961473003
Cr-Original-Commit-Position: refs/heads/master@{#392823}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 02aa51cf444626f4781824c17178376c0459ad83
2016-05-11 02:14:57 +00:00
thakis 7a5f493ee4 win toolchain: Always use ; for all env vars except PATH, even on non-Windows.
lld-link expects LIB to be ;-separated even on non-Windows.  Hopefully
it'll eventually use a flag for system lib dirs instead of looking at env vars,
but for now it looks at env vars.

(clang-cl also expects INCLUDE to be ;-separated, but it already uses
-imsvc instead of the INCLUDE env var to find system include dirs.)

BUG=495204

Review-Url: https://codereview.chromium.org/1970443002
Cr-Original-Commit-Position: refs/heads/master@{#392676}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b61345c8939bfc9e23f9a2442e681b54566120ca
2016-05-10 19:17:57 +00:00
thakis e1c31ce436 clang/gn/win: Stop running the compiler through `ninja -t msvc -e environment.foo`
The compiler only needs the INCLUDE environment var, and those contents
can just be passed via flags. clang-cl's -imsvc flag adds include directories
as-if they're from INCLUDE (i.e. they're in the right place in the directory
search order, and they're treated as system headers that don't emit warnings).

In 64-bit builds, this would also work for MSVC, but MSVC happily warns about
questionable code in system headers if enough warnings are turned on, so we would
just use /I there (and make sure the flags are early on the compile command so
that these directories are searched at the same time as they would be with INCLUDE).

However, in 32-bit builds, MSVC needs PATH to contain both the 32-bit and the 64-bit
bin directories to load dlls.  Since invoking the compiler so differently for 32-bit
and 64-bit is strange, only do this simplification for clang-cl for now.

goma doesn't yet know the -imsvc flag flag, so this is blocked on goma learning
about this clang-cl flag (https://b//28179421).

Build time impact:
64-bit debug builds symbol_level=1, building some binary ("gn")

before:
clang-cl: 34.9s, 35.1s, 35.1s
cl: 26.3s, 26.1s, 27.6s

after:
clang-cl: 33.8s, 33.7s, 34s
cl: 27s, 34.5s, 26.7s

So no discernible build perf difference, but fewer processes
and less reliance on these environment files seems like a good
change anyhow.

It also helps with a potential cross-compile of chrome/win, since
ninja's -t msvc only exists in ninja/win.

BUG=588831

Review-Url: https://codereview.chromium.org/1724533002
Cr-Original-Commit-Position: refs/heads/master@{#392624}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8435ab74b05929d290a11808a0a94ea7536531d7
2016-05-10 16:37:20 +00:00
sdefresne abe88c75c9 [GN/iOS/Mac] Decouple copy_bundle_data from gyp mac_tool.py.
Add a new script to copy data into an iOS/Mac bundle based on the gyp
script (but removing extra work that is not required as it is done in
previous steps).

BUG=297668

Review-Url: https://codereview.chromium.org/1946203002
Cr-Original-Commit-Position: refs/heads/master@{#392332}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 62321627a76f6990ce912fc24fd5d1c6d0ab7c74
2016-05-09 16:32:56 +00:00
phajdan.jr 1a5adc2a6a build/toolchain/gcc_toolchain.gni: further fixes for var forwarding
BUG=551343

Review-Url: https://codereview.chromium.org/1961433003
Cr-Original-Commit-Position: refs/heads/master@{#392040}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 669d177408a77804273688ad465367d879b6b2af
2016-05-06 12:02:03 +00:00
thakis f42fc0ee36 Tell clang-cl to use POSIX quoting for response files on non-Windows hosts.
gn always quotes arguments using the host rules.

No behavior change except when targeting Windows from non-Windows
hosts, which isn't allowed yet in build/config/BUILDCONFIG.gn

BUG=600223

Review-Url: https://codereview.chromium.org/1947223003
Cr-Original-Commit-Position: refs/heads/master@{#391892}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6bcb18bfa6f9a7bbc3f9fa4cc3953d0a215eaac5
2016-05-05 20:25:37 +00:00
sdefresne 982ece9617 Release clobber error fixes
The change http://crrev.com/1943583002/ introduced a new check for clobbering on forward_variables_from. This patch fixes the associated errors for the Release build.

BUG=None

Review-Url: https://codereview.chromium.org/1950643003
Cr-Original-Commit-Position: refs/heads/master@{#391786}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 792a2d197553e0ec41a54c5b6a19064cdf080b41
2016-05-05 11:10:35 +00:00
brettw 7c3db4975a Windows GN clobber error fixes
The change http://crrev.com/1943583002/ introduced a new check for clobbering on forward_variables_from. This patch fixes the associated errors for the Windows build.

Review-Url: https://codereview.chromium.org/1946433002
Cr-Original-Commit-Position: refs/heads/master@{#391393}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3003018ab361c53988d66b80dbed84c76def5c3d
2016-05-03 23:29:05 +00:00
aizatsky d958687091 Replacing hard-coded clang version by a common variable.
This variable will be used in the next CL to add ASAN support on mac.

BUG=

Review-Url: https://codereview.chromium.org/1921853002
Cr-Original-Commit-Position: refs/heads/master@{#391345}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a913c3da4c4c6e00cb26775908b51fd0f79b77f8
2016-05-03 20:36:57 +00:00
brettw 41661dd32f GN: forward_variables_from shouldn't clobber vars.
The documentation for forward_variables_from specifies that it will give an error if the variable already exists in the target scope. But this was not implemented. Instead, the value would be silently overwritten.

This change implements the error, and fixes the times this happens in the Linux and Android builds.

Review-Url: https://codereview.chromium.org/1943583002
Cr-Original-Commit-Position: refs/heads/master@{#391136}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0785c950dce7221b10c21e911795e181076b90db
2016-05-03 01:09:10 +00:00
brucedawson 3822150ec2 Only write gyp-mac-tool when needed
The gyp-mac-tool is written every time .ninja files are regenerated.
This can cause significant overbuild. This change simply avoids writing
it (and touching its time-stamp) if nothing has changed.

The equivalent fix was done for Windows in crrev.com/1932133002

BUG=607776

Review-Url: https://codereview.chromium.org/1928303003
Cr-Original-Commit-Position: refs/heads/master@{#390983}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0305180fdbb1b8413f1d67b2f8d4af1cb70259d7
2016-05-02 17:36:41 +00:00
brettw 938ae65395 Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Clarifies usage of concurrent_links variable in gcc_toolchain which was confusing.

TBR=brucedawson@chromium.org
BUG=598599
Reland of http://crrev.com/1909163002 with fixes which was a reland of http://crrev.com/1896163003 with fix.

Review-Url: https://codereview.chromium.org/1924203004
Cr-Original-Commit-Position: refs/heads/master@{#390797}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5404cdff57233dbad6e0b20afd547e445c57cd23
2016-04-29 23:12:20 +00:00
pcc cc6bca418e Make the GN build flag 'use_lld' usable on Linux.
We are testing a new linker, LLD, for use within Chromium. This CL adds the
necessary machinery to allow us to use LLD on Linux by enabling the existing
GN build flag 'use_lld'.

This CL teaches the LLVM package build script to build LLD on non-Windows
platforms (for top-of-tree builds only), moves the 'use_lld' build flag from
the Windows toolchain configuration to the generic GN compiler configuration,
and gates the required linker flags for LLD on Linux on that flag.

BUG=607968
R=thakis@chromium.org,brettw@chromium.org,krasin@chromium.org

Review-Url: https://codereview.chromium.org/1925843002
Cr-Original-Commit-Position: refs/heads/master@{#390733}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 22afe741dcbb7bca0b792349f07fcac175716692
2016-04-29 20:17:16 +00:00
brucedawson 625b54a9e5 Only write gyp-win-tool when needed
The gyp-win-tool is written every time .ninja files are regenerated.
This can cause significant overbuild. This change simply avoids writing
it (and touching its time-stamp) if nothing has changed.

A similar fix will be needed for Mac.

BUG=607776

Review-Url: https://codereview.chromium.org/1932133002
Cr-Original-Commit-Position: refs/heads/master@{#390707}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e8cfc6cac3577dc1bd061a59afedb05a5199df3e
2016-04-29 18:46:38 +00:00
bpastene e2c903e77f Revert of Implement arflags in the GN build. (patchset #4 id:60001 of https://codereview.chromium.org/1907403002/ )
Reason for revert:
As with the previous attempts to land this cl, android and GPU builders are failing compile with OOM errors:
https://bugs.chromium.org/p/chromium/issues/detail?id=607673

Original issue's description:
> Implement arflags in the GN build.
>
> This flag was recently added in GN. This patch hooks it up to the toolchains
> and moves some flags to use it that previously had to be hardcoded on the
> tool command itself.
>
> Remove concurrent_links variable from gcc_toolchain which was unused.
>
> BUG=598599
> Reland of http://crrev.com/1909163002 with no changes (now that a GN binary push to fix the bug has gone in) which was a reland of http://crrev.com/1896163003 with fix.

TBR=brucedawson@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=598599

Review-Url: https://codereview.chromium.org/1930293002
Cr-Original-Commit-Position: refs/heads/master@{#390545}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 500a5624ab6d616b503bf75449cfc772b9c3d2c2
2016-04-29 00:41:16 +00:00
brettw 10ea720915 Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Remove concurrent_links variable from gcc_toolchain which was unused.

BUG=598599
Reland of http://crrev.com/1909163002 with no changes (now that a GN binary push to fix the bug has gone in) which was a reland of http://crrev.com/1896163003 with fix.

Review-Url: https://codereview.chromium.org/1907403002
Cr-Original-Commit-Position: refs/heads/master@{#390424}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 897cde76d084732227ea88af76163e33eda18778
2016-04-28 18:23:37 +00:00
rsesek 7dea2a6019 [Mac/GN] Allow the info_plist template caller to specify the plist format.
Mac expects plists to be in xml1 format, whereas iOS uses binary1.

BUG=297668
R=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/1916713005
Cr-Original-Commit-Position: refs/heads/master@{#390270}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 548bde205f95f0dd96d7c74db09839e3311ddfd9
2016-04-28 01:27:15 +00:00
jbudorick 1152b29903 Revert of Implement arflags in the GN build. (patchset #2 id:20001 of https://codereview.chromium.org/1909163002/ )
Reason for revert:
speculatively reverting: issues with linking on the gpu bots again: https://build.chromium.org/p/chromium.gpu/builders/Android%20Debug%20%28Nexus%206%29/builds/8079

Original issue's description:
> Implement arflags in the GN build.
>
> This flag was recently added in GN. This patch hooks it up to the toolchains
> and moves some flags to use it that previously had to be hardcoded on the
> tool command itself.
>
> Remove concurrent_links variable from gcc_toolchain which was unused.
>
> BUG=598599
> Reland of http://crrev.com/1896163003 with fix.

TBR=brucedawson@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=598599

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

Cr-Original-Commit-Position: refs/heads/master@{#389000}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2ce39e29422675764e94de94458ce3bb22fe53d3
2016-04-22 02:18:50 +00:00
brettw 89ef3456cd Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Remove concurrent_links variable from gcc_toolchain which was unused.

BUG=598599
Reland of http://crrev.com/1896163003 with fix.

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

Cr-Original-Commit-Position: refs/heads/master@{#388971}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 920a09e4e58f92bf1ece1fcf1f31ec44185a4959
2016-04-22 00:24:54 +00:00
jbudorick f03f2e0cf9 Revert of Implement arflags in the GN build. (patchset #2 id:20001 of https://codereview.chromium.org/1896163003/ )
Reason for revert:
variety of compile failures on Android bots that have been switched to GN, see https://codereview.chromium.org/1896163003/#msg18

Original issue's description:
> Implement arflags in the GN build.
>
> This flag was recently added in GN. This patch hooks it up to the toolchains
> and moves some flags to use it that previously had to be hardcoded on the
> tool command itself.
>
> Remove concurrent_links variable from gcc_toolchain which was unused.
>
> BUG=598599

TBR=brucedawson@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=598599

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

Cr-Original-Commit-Position: refs/heads/master@{#388646}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0d539e12630324a0ab446b19cacf765761cf9684
2016-04-21 01:06:15 +00:00
brettw f2cc0b265f Implement arflags in the GN build.
This flag was recently added in GN. This patch hooks it up to the toolchains
and moves some flags to use it that previously had to be hardcoded on the
tool command itself.

Remove concurrent_links variable from gcc_toolchain which was unused.

BUG=598599

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

Cr-Original-Commit-Position: refs/heads/master@{#388554}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c33bfab4e4dc2702bc6ccc36038defd850837bd2
2016-04-20 19:41:16 +00:00
mostynb bec576b484 allow clang toolchains to strip libs as they are built
BUG=509771

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

Cr-Original-Commit-Position: refs/heads/master@{#388016}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7897b6369cea9f28850130385bf85592edc87bb3
2016-04-18 21:02:28 +00:00
brettw 38cb36afa4 Support output_dir on GN Windows.
This hooks up the new output directory support to the Windows toolchain in GN.

Also removes some obsolete TODOs about manifest support (this ended up working differently).

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

Cr-Original-Commit-Position: refs/heads/master@{#387654}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c990f15ee1d7024af4653801414d77b84f12294d
2016-04-15 18:32:39 +00:00
rsesek 5a8b2c233b [Mac/iOS/GN] Allow targets to override the output directory.
This uses the new output_dir override of GN (see
https://codereview.chromium.org/1887533003) in the tool definitions to allow
targets to override this location.

Updates the framework_bundle() template to specify an output_dir as well.

R=brettw@chromium.org
BUG=297668

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

Cr-Original-Commit-Position: refs/heads/master@{#387464}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3c470b6d0ef8276f0aea16385ae68bfa6bca969c
2016-04-14 22:42:46 +00:00
brettw 3b0423cac1 Allow targets to override the output directory.
This uses the new output_dir override of GN (see https://codereview.chromium.org/1887533003) in the tool definitions to allow targets to override this location.

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

Cr-Original-Commit-Position: refs/heads/master@{#387432}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c2c1dcfdf6d7cd90d7626ad9a5bdf5fb4ba8dda3
2016-04-14 21:38:36 +00:00
thakis 59ba47df12 Port use_lld flag from gyp to gn.
BUG=498033

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

Cr-Original-Commit-Position: refs/heads/master@{#386876}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 52d5c52fa34e5d312e2622b7799111bb63781403
2016-04-13 00:31:31 +00:00
pcc 545f95b0b0 Enable whole-program virtual function optimization in LTO mode.
Also move LTO config out of sanitizer config, and enable function
sections on all architectures (not just ARM) as it improves
the linker's ability to do ICF.

BUG=580389

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

Cr-Original-Commit-Position: refs/heads/master@{#385630}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5f4ec37b6548c11b0b470ce824a3d28f7f54fcd1
2016-04-07 02:33:57 +00:00
brettw 7d59cb240c Allow spaces in GN target names on Windows.
This allows executables with spaces in their names to work on Windows. Posix probably needs a separate patch.

BUG=599326

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

Cr-Original-Commit-Position: refs/heads/master@{#384445}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7508242a626ddf83422d3224f6bc14f553b88a3f
2016-04-01 00:26:10 +00:00
mcgrathr ca85df911b GN: Force use_allocator="none" in NaCl toolchains
Heretofore, the use_allocator build argument has been effectively
ignored within NaCl toolchains by dint of the 'if (!is_nacl)'
around the contents of //base/allocator:allocator.  However,
configs that test the use_allocator value have not had equivalent
is_nacl exceptions.  The result is that tcmalloc is never built
in NaCl toolchains but other parts of the code think it has been.
Notably, //build/config:feature_flags fails to #define
NO_TCMALLOC.  Hence, code testing NO_TCMALLOC wrongly concludes
it can call entry points supplied by tcmalloc.  This broke the
enable_profiling=true build of some targets in the
newlib_pnacl_nonsfi toolchain, because //base/debug/profiler.cc
tries to use profiling-related tcmalloc entry points.

So this change removes that is_nacl kludge from //base/allocator
and instead wires up NaCl toolchains to force a setting of
use_allocator="none" via toolchain_args().

BUG= 596918
R=dpranke@chromium.org, phosek@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#383471}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ee80d85ca30c60a5167ef6849157918bc01d757c
2016-03-27 20:20:07 +00:00
sdefresne 64d204581a [iOS/GN] Fix compilation of ios_chrome_unittests with gn.
Get GN in sync with gyp by adding missing dependencies, removing
the obsoletes dependencies and adding missing files and targets.

Change the toolchain when targetting iOS devices to not build fat
binaries as this break the "gn gen"-time selection of the level of
optimisation to use from skia and libwebp. Instead, building for
devices on iOS is now similar to other platforms (i.e. the arch is
selected via "target_cpu" with "arm" an alias for "armv7").

Fixes the following errors:
  Undefined symbols for architecture arm64:
    "_VP8DspInitNEON", referenced from:
        _VP8DspInit in dec.o
  ...

BUG=459705,596237

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

Cr-Original-Commit-Position: refs/heads/master@{#383416}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3bdd5635f4dba38c3035fe992039a833988e147b
2016-03-26 00:07:47 +00:00
brucedawson 231b295356 Detect and warn on missing vcvarsall.bat
VC++ 2015 defaults to *not* installing the C++ toolchain. Several
developers have failed to notice this and then hit cryptic errors when
building Chrome. This detects the problem and gives a more informative
error message for gn builds.

crrev.com/1832593002 does this for gyp builds.

BUG=440500

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

Cr-Original-Commit-Position: refs/heads/master@{#382915}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 13856ebb7cb3b75dd9d40bb394ffa567ab4a524a
2016-03-23 20:32:43 +00:00
thakis 7b4c8c9bef Make setup_toolchain.py run on non-Windows.
Also delete an unused, commented-out block of code.

BUG=495204

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

Cr-Original-Commit-Position: refs/heads/master@{#382330}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0917363388c80cb57ee5ceba36dcd047b4bf1d19
2016-03-21 18:21:51 +00:00
sdefresne 79e244d40d Use bundle_data and create_bundle to add support for iOS app bundle.
Add a new script //build/config/ios/ios_gen_plist.py to generate the
Info.plist by merging multiple source files, performing substitutions
of variables and converting to binary1 format.

Expand //build/config/ios/ios_sdk.gni to output variables required
for the substitution of variables in Info.plist.

Refactor ios_app template to use bundle_data and create_bundle to
create the application bundle.

BUG=297668

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

Cr-Original-Commit-Position: refs/heads/master@{#381429}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 01285787153c6abbaaa7f86ace3023dd89159476
2016-03-16 10:56:36 +00:00
thakis 6b9c462ca5 win toolchain: Load env from json file, not .cmd file.
No behavior change.  The motivation is that loading the json file works
on non-Windows too.

Requires a toolchain that was built with
https://codereview.chromium.org/1706423002 and
https://codereview.chromium.org/1776283002/ applied
(such as the current 2015 package).

BUG=495204

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

Cr-Original-Commit-Position: refs/heads/master@{#381398}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d510820d669ae1c9f1fc1c15a76ccc6dfb1fa83c
2016-03-16 05:28:38 +00:00
brucedawson 68daea643a Reland of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1778343002/ )
Reason for revert:
Preparing a revert in order to reland VS 2015. The CL is not reading for committing yet.

Original issue's description:
> Revert of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1740583002/ )
>
> Reason for revert:
> Broke isolate tests on Win8 GN (dbg) and Win x64 GN (dbg).
>
> Original issue's description:
> > Reland of Change default Windows compiler to VS 2015
> >
> > The change to get_landmines.py is there because modifying this file
> > affects analyze behavior so that all tests run. Changing the printed
> > message is purely a side effect.
> >
> > This change also removes some redundant INCLUDE paths. These are
> > unnecessary when building with VS 2015 (because it defaults to the
> > Windows 10 SDK) and actively harmful (they make the INCLUDE path
> > problematically long).
> >
> > This change was redone in order to fix merge conflicts and because after
> > a few weeks a fresh set of approvals seems reasonable.
> >
> > The original change was landed as crrev.com/1598493004
> >
> > BUG=440500, 584782
> >
> > Committed: https://crrev.com/d4dcbd342dd54f55383daf8bc44b2c9d97fe0d0b
> > Cr-Commit-Position: refs/heads/master@{#380382}
>
> TBR=scottmg@chromium.org,dpranke@chromium.org,brucedawson@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=440500, 584782
>
> Committed: https://crrev.com/cb3f85f80a2c146e0e4bf064f02bf68acb274ce5
> Cr-Commit-Position: refs/heads/master@{#380395}

TBR=scottmg@chromium.org,dpranke@chromium.org,vasilii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=440500, 584782

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

Cr-Original-Commit-Position: refs/heads/master@{#380711}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b33e7eee5db5f956426dbf664f68bff3fe7daee
2016-03-11 19:56:33 +00:00
vasilii 2d00025c23 Revert of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1740583002/ )
Reason for revert:
Broke isolate tests on Win8 GN (dbg) and Win x64 GN (dbg).
https://build.chromium.org/p/chromium.win/builders/Win8%20GN%20%28dbg%29/builds/22695/steps/isolate%20tests/logs/stdio

[found] [hashed/size/to hash] [looked up/to lookup] [uploaded/size/to upload/size]
04:10:31.512494 Root: E:\b\build\slave\Win8_GN__dbg_\build\src
04:10:31.513479 Root: E:\b\build\slave\Win8_GN__dbg_\build\src

events_unittests  GetFileAttributesEx E:\b\build\slave\Win8_GN__dbg_\build\src\out\Debug\msvcp120d.dll: The system cannot find the file specified.
04:10:31.988532 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\content\test\data\) = 1574 files
04:10:32.060523 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\media\test\data\) = 233 files
04:10:32.435549 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\net\data\) = 974 files
04:10:32.464549 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\net\tools\testserver\) = 11 files
[2843] [6/29.0Mib/39] [0/6] [0/0b/0/0b] 1s
04:10:32.505555 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\third_party\pyftpdlib\) = 37 files
04:10:32.539557 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\third_party\pywebsocket\) = 99 files
04:10:32.578571 PushDirectory(E:\b\build\slave\Win8_GN__dbg_\build\src\third_party\tlslite\) = 105 files

content_browsertests  GetFileAttributesEx E:\b\build\slave\Win8_GN__dbg_\build\src\out\Debug\msvcp120d.dll: The system cannot find the file specified.
Hits    :     0 (0b)
Misses  :     0 (0b)
Duration: 1.301s
isolate: GetFileAttributesEx E:\b\build\slave\Win8_GN__dbg_\build\src\out\Debug\msvcp120d.dll: The system cannot find the file specified.
step returned non-zero exit code: 1

Original issue's description:
> Reland of Change default Windows compiler to VS 2015
>
> The change to get_landmines.py is there because modifying this file
> affects analyze behavior so that all tests run. Changing the printed
> message is purely a side effect.
>
> This change also removes some redundant INCLUDE paths. These are
> unnecessary when building with VS 2015 (because it defaults to the
> Windows 10 SDK) and actively harmful (they make the INCLUDE path
> problematically long).
>
> This change was redone in order to fix merge conflicts and because after
> a few weeks a fresh set of approvals seems reasonable.
>
> The original change was landed as crrev.com/1598493004
>
> BUG=440500, 584782
>
> Committed: https://crrev.com/d4dcbd342dd54f55383daf8bc44b2c9d97fe0d0b
> Cr-Commit-Position: refs/heads/master@{#380382}

TBR=scottmg@chromium.org,dpranke@chromium.org,brucedawson@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=440500, 584782

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

Cr-Original-Commit-Position: refs/heads/master@{#380395}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cb3f85f80a2c146e0e4bf064f02bf68acb274ce5
2016-03-10 12:41:45 +00:00
brucedawson 30fe0e8246 Reland of Change default Windows compiler to VS 2015
The change to get_landmines.py is there because modifying this file
affects analyze behavior so that all tests run. Changing the printed
message is purely a side effect.

This change also removes some redundant INCLUDE paths. These are
unnecessary when building with VS 2015 (because it defaults to the
Windows 10 SDK) and actively harmful (they make the INCLUDE path
problematically long).

This change was redone in order to fix merge conflicts and because after
a few weeks a fresh set of approvals seems reasonable.

The original change was landed as crrev.com/1598493004

BUG=440500, 584782

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

Cr-Original-Commit-Position: refs/heads/master@{#380382}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d4dcbd342dd54f55383daf8bc44b2c9d97fe0d0b
2016-03-10 09:22:49 +00:00
yyanagisawa 52598d7da8 Use c:\goma\goma-win64 as default gomadir on Windows.
32bit goma client has already been deprecated.
Let me make c:\goma\goma-win64 as the default gomadir on Windows.

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

Cr-Original-Commit-Position: refs/heads/master@{#379517}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 32f0fcc3c09e6531ae83d3ce1fc8dd66fd6db82f
2016-03-07 06:39:39 +00:00
dongseong.hwang 657b4cd6f2 Gn: remove redundant prefix setting code.
Reuse |android_tool_prefix| in //build/toolchain/gcc_toolchain.gni

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

Cr-Original-Commit-Position: refs/heads/master@{#377965}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c672f32e43d852e054f9823e78b410d7638b906e
2016-02-26 20:48:44 +00:00
krasin 304177bc3c Add gn option 'is_lto' to enable Link Time Optimization builds.
We'll launch LTO builds on Linux first, and then add CFI
(control flow integrity) on top of that.

BUG=589915

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

Cr-Original-Commit-Position: refs/heads/master@{#377695}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2de2f30ff962315aef7d81159918548db9a00566
2016-02-25 22:58:39 +00:00
dongseong.hwang f057bd6335 Add option cc_wrapper to GN
For example:
cc_wrapper="ccache"
cc_wrapper="icecc"
cc_wrapper="distcc"
cc_wrapper="ccache distcc"

In addition, it deprecates use_ccache and clang_dir.
A user who uses use_ccache must switch to cc_wrapper="ccache"
clang_dir supported icecc in the masquerade way. There is
2 ways to use external compiler wrapper. For example using icecc,
1) CC='icecc gcc'
2) masquerade icecc
 mkdir /opt/icecc/bin
 ln -s /usr/bin/icecc /opt/icecc/bin/gcc
 ln -s /usr/bin/icecc /opt/icecc/bin/g++
 export PATH=/opt/icecc/bin:$PATH
 clang_dir="/opt/icecc/bin/"

This CL uses the #1 way because goma uses the #1 way, and removes
the #2 hack, which is clang_dir.

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

Cr-Original-Commit-Position: refs/heads/master@{#377251}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e279af1c9c511972000049b2c4d261161b48075d
2016-02-24 09:29:19 +00:00
thakis a2b84a87e2 Fix copy-paste-o in comment.
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#376810}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e5a97475019f4ff7f08da311b8e8989cc9b4e02e
2016-02-22 21:47:05 +00:00
sbc fef57d9ac0 GN: Remove redundant -m32 flag from nacl glibc x86 compiler
This a followup to https://codereview.chromium.org/1693913002
which added the -m32 unnecessarily (since :compiler_cpu_abi
already adds it).

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

Cr-Original-Commit-Position: refs/heads/master@{#376061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ead906447157a8640d449e7d85275f161191dff
2016-02-18 02:00:50 +00:00
sbc c00890aac9 GN: Use x86_64-nacl-gcc with -m32 rather then i686-nacl-gcc
i686-nacl-gcc is not in goma (its a simple shell script
wrapper arond x86_64-nacl-gcc and this is not supported
currently in goma)

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

Cr-Original-Commit-Position: refs/heads/master@{#375810}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 93bf7095de46409cb10665ebe27ec9521a465946
2016-02-17 06:24:51 +00:00
thakis 1d76ed0ebf vs toolchain: Move toolchain env computation into its own function.
Also replace a few ';'s with os.path.pathsep and a few \s with os.path.sep.
No behavior change on Windows; the motivation is that this might make it
possible to do this environment computation on non-Windows hosts too some day.

BUG=495204

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

Cr-Original-Commit-Position: refs/heads/master@{#375476}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 44a40f8429c25eaf7bf8577cafbcf3a8df100840
2016-02-15 18:19:25 +00:00
thakis fc88d0f148 gn/win: Add a runtime_link_output to tool("solink")
See the CL description of https://codereview.chromium.org/1690843002/ for more.

BUG=354261, 498033
TBR=scottmg
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#374894}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4d1b63a0366d4590efd6c29d62d2308c4a2941c8
2016-02-11 14:18:16 +00:00
blundell c559ac63b0 Revert of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1676263003/ )
Reason for revert:
Speculative revert to see if it fixes the "Duplicate COMDAT" compile error; will reland if it doesn't. Googling indicates that we have fought with "Duplicate COMDAT" errors in the past as part of trying to bring in VS 2015.

This error occurred in #374346, which is a revert of #374322 due to that CL causing test failures on Linux. Note that the Windows compiler switch landed in #374324.

Here is the error in question (from https://build.chromium.org/p/chromium.win/buildstatus?builder=Win%20x64%20Builder%20%28dbg%29&number=18343):

FAILED: C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-with-manifests environment.x64 True mojo_system_impl.dll "C:\b\depot_tools\python276_bin\python.exe gyp-win-tool link-wrapper environment.x64 False link.exe /nologo /IMPLIB:mojo_system_impl.dll.lib /DLL /OUT:mojo_system_impl.dll @mojo_system_impl.dll.rsp" 2 mt.exe rc.exe "obj\third_party\mojo\mojo_system_impl.mojo_system_impl.dll.intermediate.manifest" obj\third_party\mojo\mojo_system_impl.mojo_system_impl.dll.generated.manifest
mojo_system_impl2.node_controller.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '??1?$Callback@$$A6AXAEBVPortRef@ports@edk@mojo@@@Z@base@@QEAA@XZ'

Original issue's description:
> Reland of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1680533004/ )
>
> Reason for revert:
> The GPU bot problem (a bug with swarming tests on component builds) is fixed with crrev.com/1676943002
>
> Original issue's description:
> > Revert of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1679693002/ )
> >
> > Reason for revert:
> > This breaks GPU win debug bots (https://build.chromium.org/p/chromium.gpu/builders/Win7%20Debug%20%28NVIDIA%29/builds/36633 for example, every GPU test is crashing)
> >
> > Original issue's description:
> > > Reland of Change default Windows compiler to VS 2015 (patchset #1 id:1 of https://codereview.chromium.org/1678663002/ )
> > >
> > > Reason for revert:
> > > Issues that forced revert of VS 2015 as default compiler are believed to be fixed.
> > >
> > > Original issue's description:
> > > > Revert of Change default Windows compiler to VS 2015 (patchset #10 id:180001 of https://codereview.chromium.org/1598493004/ )
> > > >
> > > > Reason for revert:
> > > > Speculative for https://code.google.com/p/chromium/issues/detail?id=498544#c20 . Will reland if this doesn't help.
> > > >
> > > > Original issue's description:
> > > > > Change default Windows compiler to VS 2015
> > > > >
> > > > > The change to get_landmines.py is there because modifying this file
> > > > > affects analyze behavior so that all tests run. Changing the printed
> > > > > message is purely a side effect.
> > > > >
> > > > > This change also removes some redundant INCLUDE paths. These are
> > > > > unnecessary when building with VS 2015 (because it defaults to the
> > > > > Windows 10 SDK) and actively harmful (they make the INCLUDE path
> > > > > problematically long).
> > > > >
> > > > > BUG=440500,584782
> > > > >
> > > > > Committed: https://crrev.com/4c17ac0db59d7dbe78734950f83912ab564bd6fe
> > > > > Cr-Commit-Position: refs/heads/master@{#373955}
> > > >
> > > > TBR=dpranke@chromium.org,scottmg@chromium.org,sebmarchand@chromium.org,brucedawson@chromium.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=440500,584782
> > > >
> > > > Committed: https://crrev.com/bbc766aef1bd8cb0d9546fec9abf264e7d8c1d96
> > > > Cr-Commit-Position: refs/heads/master@{#374013}
> > >
> > > TBR=dpranke@chromium.org,scottmg@chromium.org,sebmarchand@chromium.org,thakis@chromium.org
> > > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > > BUG=440500,584782
> > >
> > > Committed: https://crrev.com/20e99ecb08da22582d435c1a5bba0a5c96345da3
> > > Cr-Commit-Position: refs/heads/master@{#374058}
> >
> > TBR=dpranke@chromium.org,scottmg@chromium.org,sebmarchand@chromium.org,thakis@chromium.org,brucedawson@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=440500,584782
> >
> > Committed: https://crrev.com/03f6b0af0a3a0127f5e939095157079659ab7cc8
> > Cr-Commit-Position: refs/heads/master@{#374062}
>
> TBR=dpranke@chromium.org,scottmg@chromium.org,sebmarchand@chromium.org,thakis@chromium.org,zmo@chromium.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=440500,584782
>
> Committed: https://crrev.com/36f03f2ac1f92b6f41129f013f8a808f7b9127fc
> Cr-Commit-Position: refs/heads/master@{#374324}

TBR=dpranke@chromium.org,scottmg@chromium.org,sebmarchand@chromium.org,thakis@chromium.org,zmo@chromium.org,brucedawson@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=440500,584782

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

Cr-Original-Commit-Position: refs/heads/master@{#374349}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b9643d8169d78b6f3fdbc43895c5e830655291d9
2016-02-09 11:18:12 +00:00