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

490 Коммитов

Автор SHA1 Сообщение Дата
brettw 9971a128ab Fix CPU type for Android x64 build.
The string "x86_64" does not reference a CPU type in GN.

Review-Url: https://codereview.chromium.org/2231543002
Cr-Original-Commit-Position: refs/heads/master@{#410801}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7aabe8fe957b5628348db49e488a4cda1bdf7541
2016-08-09 20:38:43 +00:00
sdefresne 19b530769f [iOS] Always generate the final binaries using lipo.
To simplify the creation of binary bundles on iOS, always use lipo
to create the final binary, even when not generating fat binaries
(in that case the lipo invocation is just a simple copy unless dSYM
generation or code stripping are enabled).

BUG=635302

Review-Url: https://codereview.chromium.org/2222753003
Cr-Original-Commit-Position: refs/heads/master@{#410600}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c7091801f98c82e3a1a0aa5c89feed19738c713c
2016-08-09 07:08:06 +00:00
sdefresne f4466fe2eb Explicitly list content of generated .dSYM directory.
Chrome on iOS wants to use the content of .dSYM directory generated
when enable_dsyms is set to true, so explicitly list the files that
are found inside.

Change some deps to public deps so that the .dSYM files are visible
via a public dependency when depending on the create_bundle target.

BUG=634777

Review-Url: https://codereview.chromium.org/2224583004
Cr-Original-Commit-Position: refs/heads/master@{#410486}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8d79e46082552107fdcd2016fd08c0fd5795fd48
2016-08-08 23:05:44 +00:00
thakis 0aef44ff39 Roll clang 274369:277962.
Ran `tools/clang/scripts/upload_revision.py 277909`.

New:
* version number is now 4.0.0
* much better debug info on Windows
* asan/win runtime detects EXCEPTION_ILLEGAL_INSTRUCTION / EXCEPTION_BREAKPOINT
* improved integrated assembler on arm
* sanitizer coverage improvements
* lto devirtualization fixes
* …and over 3500 other changes

This is the first clang roll with gn as default meta-buildsystem. With gyp,
all .o files got automatically rebuilt after clang rolls. With gn, this doesn't
always work (https://crbug.com/612340). If you're getting errors about
having to rebuild pch files after this roll (on Mac and Windows), manually
run `gn gen out/gn` (or whatever your build dir is) and then build again.

BUG=629966
TBR=hans

Review-Url: https://codereview.chromium.org/2220793002
Cr-Original-Commit-Position: refs/heads/master@{#410289}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 78f40fbff7fe6ea54b0de1492268f4f5f76f6eb6
2016-08-08 02:22:42 +00:00
thakis 3d1c7d9857 Fix typo "contols"
BUG=
TBR=brettw

Review-Url: https://codereview.chromium.org/2216033003
Cr-Original-Commit-Position: refs/heads/master@{#410027}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 30ae54999d1c86d368c8a94acf383114160fd19c
2016-08-05 11:02:17 +00:00
Nico Weber ad70400d94 Only use sanitizers with default toolchain on Windows as well.
There's currently code to disable sanitizers for non-default toolchains
in gcc_toolchain.gni.  Move it to sanitizers.gni, then it's closer to
where all these args are declared and it works on Windows as well.

No intended behavior change on non-Windows.

BUG=598761
TBR=dpranke

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

Cr-Original-Commit-Position: refs/heads/master@{#409963}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 146d122ae8ed166f294231fbe6ca340ceffc356b
2016-08-05 01:48:15 +00:00
sdefresne d55ab848c9 Use explicit pool to define concurrent_links jobs.
Define an explicit pool //build/toolchain:link_pool with a depth
of concurrent_links and convert all the toolchain link targets to
use it instead of setting concurrent_links property of the tool.

BUG=612786

Review-Url: https://codereview.chromium.org/2201363004
Cr-Original-Commit-Position: refs/heads/master@{#409846}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 96e7407d139b8a8e43f6db7d4af3118078aba7de
2016-08-04 18:44:40 +00:00
dpranke 57bedb1af6 Clean up default toolchain logic for CrOS GN builds.
The initial versions of the CrOS GN builds were written when we
didn't really understand how the different CrOS builds would work,
and we weren't sure what the toolchains needed to look like.

We can now safely say that the //build/toolchain/cros:* toolchains
should only be used in the simplechrome and ebuild workflows, where
`custom_toolchain="//build/toolchain/cros:target"` in the GN args.
For "regular" desktop ChromeOS builds, we should just re-use the
linux toolchains.

R=brettw@chromium.org, llozano@chromium.org
BUG=632279

Review-Url: https://codereview.chromium.org/2198423002
Cr-Original-Commit-Position: refs/heads/master@{#409652}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d5b49c1cf6737a33c918e8433c12e19538223f6e
2016-08-03 23:10:31 +00:00
sdefresne e81f89f52e Fix compilation with Xcode version of clang.
Fix unused variable error in //build/toolchain/mac/BUILD.gn by
moving the _compiler_prefix variable inside the mac_toolchain
template.

Only check the use_clang_xcode variable for the default toolchain
as some file are build with "mac" current_os on iOS.

BUG=633978

Review-Url: https://codereview.chromium.org/2209713002
Cr-Original-Commit-Position: refs/heads/master@{#409570}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ecc33473f3dbebda070e0ceedb9316591414949f
2016-08-03 18:18:45 +00:00
estevenson eb0c5457c5 Revert of Enable whitelist generation for all builds. (patchset #5 id:80001 of https://codereview.chromium.org/2175413004/ )
Reason for revert:
Breaks internal Chrome OS builds.

Original issue's description:
> Enable whitelist generation for official builds.
>
> Currently, all resources are included in PAK files when Chrome is
> built locally. Only official_buildbot.sh uses a resource whitelist. This CL
> enables local builds to use resource whitelisting by setting the
> enable_resource_whitelist_generation gn flag to true, or by building an
> official build.
>
> This will allow developers to more easily monitor the changes in APK size
> for each commit they make.
>
> However, a large amount of output is generated (_pragma is used to
> create warnings to allow whitelisted resources to be listed), so for now
> the whitelist will only be generated for official builds.
>
> Comparison of ChromePublic.apk_InstallSize APK size using resource_sizes.py:
> * Local build with this patch: 73338275 bytes
> * Local build without this patch: 75248223 bytes
>
> BUG=632385
>
> Committed: https://crrev.com/3f3fa5fc415baab5a875839e6520c2cbb245ec38
> Cr-Commit-Position: refs/heads/master@{#409511}

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

Review-Url: https://codereview.chromium.org/2209763002
Cr-Original-Commit-Position: refs/heads/master@{#409547}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d44cdb8d3daf1c6e57fbdb8abfd3212154cbf6f4
2016-08-03 17:09:47 +00:00
estevenson 12b2e8e08d Enable whitelist generation for official builds.
Currently, all resources are included in PAK files when Chrome is
built locally. Only official_buildbot.sh uses a resource whitelist. This CL
enables local builds to use resource whitelisting by setting the
enable_resource_whitelist_generation gn flag to true, or by building an
official build.

This will allow developers to more easily monitor the changes in APK size
for each commit they make.

However, a large amount of output is generated (_pragma is used to
create warnings to allow whitelisted resources to be listed), so for now
the whitelist will only be generated for official builds.

Comparison of ChromePublic.apk_InstallSize APK size using resource_sizes.py:
* Local build with this patch: 73338275 bytes
* Local build without this patch: 75248223 bytes

BUG=632385

Review-Url: https://codereview.chromium.org/2175413004
Cr-Original-Commit-Position: refs/heads/master@{#409511}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3f3fa5fc415baab5a875839e6520c2cbb245ec38
2016-08-03 14:56:45 +00:00
rnk 41955af5d1 Move clang_version setting back into declare_args
This allows the user to indicate that their clang version is something
other than the default. Right now we guess 3.9.0 for the clang version,
but TOT LLVM is on version 4.0.0.

I use this to test changes to the ASan runtime in Chrome.

R=hans@chromium.org,etienneb@chromium.org,dpranke@chromium.org
BUG=598761

Review-Url: https://codereview.chromium.org/2206803002
Cr-Original-Commit-Position: refs/heads/master@{#409414}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4a42af48e74062a70c97ae54438218fbb23ecd53
2016-08-03 01:21:12 +00:00
hans 9e70cad7b2 gn: Update clang_version when using ToT Clang
Tip-of-tree Clang is now at 4.0.0.

BUG=none

Review-Url: https://codereview.chromium.org/2201983002
Cr-Original-Commit-Position: refs/heads/master@{#409080}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 30c4ca0b7409fe9dcd2d399fbb30a5e0c1fc76ee
2016-08-01 22:40:57 +00:00
agrieve 5240573aa6 Add LC_ALL=C to gcc linker wrappers to speed up links
This speeds up an Android component build of libchrome.cr.so from
35s -> 10s on my z620.

BUG=632230

Review-Url: https://codereview.chromium.org/2190813002
Cr-Original-Commit-Position: refs/heads/master@{#408549}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 52f2a85089d3e3a85cee112a6ee6c7423394644b
2016-07-29 01:33:49 +00:00
justincohen 189f099cad Add mac hermetic support to build/config/mac/sdk_info.py.
BUG=632229

Review-Url: https://codereview.chromium.org/2183053006
Cr-Original-Commit-Position: refs/heads/master@{#408487}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 254e30c78ff58abdfe16235f687cf43f6c072296
2016-07-28 21:37:14 +00:00
dpranke 0a8d771564 Make sure PDB files are in runtime_deps for GN builds.
Before r407890, we had no good way to make sure that
we were including the .pdb files for executables and
shared libraries in the runtime_deps for a target.
Now that GN has a `runtime_outputs` option, we can
use that and list the PDBs. This should fix issues
for debugging and also packaging the NaCl files as
part of an official build.

R=brettw@chromium.org, sebmarchand@chromium.org
BUG=624478, 629709

Review-Url: https://codereview.chromium.org/2192643002
Cr-Original-Commit-Position: refs/heads/master@{#408282}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f79ed9d194a29309f5e6e9a680295459114cbfe4
2016-07-28 00:01:27 +00:00
brettw 4cb1abfafd Roll buildtools 60f7f9a8b4..67bf0653b2
In order to roll GN 1f41736051..15e0e74f4d (r406705:r407852) and pick up
  the following changes:

  15e0e74 Allow GN toolchains to specify runtime deps outputs.

TBR=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2181073004
Cr-Original-Commit-Position: refs/heads/master@{#407890}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 48fc5f354377adc048e780a3a33232378750576b
2016-07-26 20:06:34 +00:00
brettw 49ff1d123e Allow GN toolchains to specify runtime deps outputs.
Previously the file considered for the runtime deps computation for linked
targets was just the first output, or, for shared libraries, the
runtime_link_output.

This patch changes that to a list of files for all linker tools. This will
allow us, for example, to be able to automatically bundle symbol files
generated by the build (but not .lib files in the case of shared libraries) to
the swarming bots for testing.

The tool class setters now take objects by copies and move them to avoid extra
copies in many cases. Add a defined_from member to the Tool class.

BUG=631242

Review-Url: https://codereview.chromium.org/2178173002
Cr-Original-Commit-Position: refs/heads/master@{#407852}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15e0e74f4dbd7616a722702eedd6620b70f50290
2016-07-26 18:06:09 +00:00
sdefresne 7e65bf798a [iOS] Fix build always considered dirty.
Fix build when dSYM generation is enabled and output is a thin binary
by correctly informing gn and ninja of the location where the .dSYM
file is generated.

When defining "dsym_switch" in the toolchain definition, the value of
root_out_dir is not yet known (it is only known later when we know if
the toolchain is the default toolchain or not), so use {{root_out_dir}}
to lazily perform the expansion when the information is known.

When determining whether dSYM generation is enabled in the toolchain
definition, look at "toochain_os" instead of "is_ios" as "is_ios" is
defined based on target_os (i.e. is incorrect in the toolchain).

Use output_dir/output_name instead of using rebase_path() to generate
an output name containing directory information because 1. this is a
hack that output_dir was introduced to fix, 2. link tool and ninja do
not agree about the location of the .dSYM file.

BUG=630901

Review-Url: https://codereview.chromium.org/2174373002
Cr-Original-Commit-Position: refs/heads/master@{#407737}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 92754a40e7bd74f5a4b3437d33fa4d90068c01d2
2016-07-26 08:49:21 +00:00
sammc 4b2ee7d182 Add GN rules for building instrumented libraries.
BUG=585127

Review-Url: https://codereview.chromium.org/2103683002
Cr-Original-Commit-Position: refs/heads/master@{#406452}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fba9bdbfc9ccc9c7909e1bd4784bcb05df9da649
2016-07-20 01:55:24 +00:00
sdefresne c4b9eac2b7 [iOS/GN] Fix generation of .dSYM for fat binary builds.
When creating fat binaries, the generation of the .dSYM file need to
use the fat binary and not the intermediate binaries. So for a fat
build, //build/config/mac:strip_all is an empty configuration and the
linker tools do not pass the flag requesting generation of the .dSYM
file to linker_driver.py, instead the flags are passed when "lipo" is
invoked.

Fix //build/toolchain/mac/linker_driver.py to look for both "-o" and
"-output" when looking for the linker output to allow wrapping "lipo"
in addition to the compiler linker (as "lipo" only accept "-output"
flag to specify the output file).

Always add //build/config/mac:strip_all to the dependencies of all
linkable targets on iOS (as is done on Mac) and fix cronet.

BUG=593582

Review-Url: https://codereview.chromium.org/2160653002
Cr-Original-Commit-Position: refs/heads/master@{#406253}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6e714433f6749c3664ca816d1c64a488828ef75d
2016-07-19 12:43:47 +00:00
dpranke 1303552bdb Fix the v8 snapshots in the GN mipsel, mips64el builds.
This also deletes references to gcc-based snapshot toolchains that
don't actually exist. Let's find out if they're actually needed anywhere ;).
The mips build was broken by the v8_target_cpu changes for 625353.

TBR=machenbach@chromium.org
BUG=625353, 629057

Review-Url: https://codereview.chromium.org/2159003002
Cr-Original-Commit-Position: refs/heads/master@{#406174}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fb1cadc07b5b8f97f1ef5ee9800a47ce6f6fe902
2016-07-19 01:58:02 +00:00
dpranke fd92eddb0a Re-land r405933 w/ fix for CrOS.
This CL re-lands r405933 and removes the hack that was needed while
rolling in the reworked v8_target_cpu code, but this adds the missing
line that was needed for CrOS to work correctly with their custom
toolchain.

TBR=machenbach@chromium.org, llozano@chromium.org
BUG=593461, 625353

Review-Url: https://codereview.chromium.org/2158143002
Cr-Original-Commit-Position: refs/heads/master@{#406115}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 702414254eea4221cc4d36eb1ca4c1f9636699c1
2016-07-18 22:05:40 +00:00
rsesek 3e42079f19 [Mac/GN] Add a new linker_driver.py option to save unstripped linker output.
This declares a new GN arg save_unstripped_output that can be enabled if
enable_stripping=true. If true, then an unstripped copy of the linker output
will be saved in the output directory with an ".unstripped" suffix.

BUG=628052
R=mark@chromium.org

Review-Url: https://codereview.chromium.org/2157573002
Cr-Original-Commit-Position: refs/heads/master@{#406110}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7fa0d497278e20eb8f38e02269f0e88d8cffa9c2
2016-07-18 21:59:08 +00:00
wuchengli 41a944897c Revert "Delete the v8_target_cpu/v8_current_cpu hack in the GN build."
This reverts commit d3e00ac37e3722cc93d102164b23629e8cc6af31.
ChromeOS would crash at boot and could not reach login screen with
commit d3e00a.

BUG=chromium:593461
TBR=dpranke@chromium.org
TBR=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2155183002
Cr-Original-Commit-Position: refs/heads/master@{#405989}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9557ecb972e31f33470584e31ffbd602c767913a
2016-07-18 14:54:26 +00:00
dpranke 9a2281bf99 Delete the v8_target_cpu/v8_current_cpu hack in the GN build.
This finishes the work in bug 625353 to make
v8_target_cpu/v8_current_cpu work correctly across multiple
toolchains, by deleting the workaround that was needed to
get the changes to land across repos.

TBR=machenbach@chromium.org
BUG=625353

Review-Url: https://codereview.chromium.org/2157733002
Cr-Original-Commit-Position: refs/heads/master@{#405933}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d3e00ac37e3722cc93d102164b23629e8cc6af31
2016-07-16 04:29:48 +00:00
thakis 4abd0f641e Use lld by default when targeting win on non-win hosts.
build/config/BUILDCONFIG.gn still asserts that target_os == host_os
for Windows build, so this currently can't be toggled without further
local changes.  No behavior change.

BUG=495204

Review-Url: https://codereview.chromium.org/2148373002
Cr-Original-Commit-Position: refs/heads/master@{#405564}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 570f33c4455186fa5810bc9ec15d7fb909e15ba3
2016-07-14 20:57:39 +00:00
dpranke 6b747bc853 Land chromium-side work to clean up handling of v8_target_cpu in the GN build.
Currently v8_target_cpu can only be set to one particular architecture,
and that won't work for monochrome/webview builds where we need
to be able to build two different snapshots for two different architectures.

The way things are set are also confusing for when you need to do builds
for a target_cpu that is different from the host_cpu and the value of the
v8_target_cpu might get out of sync between target and host.

This change changes all that by making the cpu that v8 targets
a function of the current toolchain (thus declaring a v8_current_cpu
and using that instead).

R=brettw@chromium.org, jochen@chromium.org, michaelbai@chromium.org

BUG=625353

Review-Url: https://codereview.chromium.org/2116183002
Cr-Original-Commit-Position: refs/heads/master@{#405551}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a2de90db035b90a891f0b980ab6162fd3995499
2016-07-14 20:11:38 +00:00
sdefresne f656385049 [iOS] Remove conversion of .strings to binary1 by copy_bundle_data tool.
All .strings files that need to be in binary1 format are now
converted by using the "bundle_data_strings" template so the
conversion can be remove from "copy_bundle_data" tool.

BUG=625578

Review-Url: https://codereview.chromium.org/2130813002
Cr-Original-Commit-Position: refs/heads/master@{#404621}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f52c49dc18851aaf7ca4f3a78b5312350193f5ba
2016-07-11 09:28:31 +00:00
thakis 93b4ff4e3f Make sure use_xcode_clang is only used in iOS builds.
BUG=none

Review-Url: https://codereview.chromium.org/2129603002
Cr-Original-Commit-Position: refs/heads/master@{#403935}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7b4b8e2a497c943c4e4e3daad85660849e942b30
2016-07-06 18:35:50 +00:00
sdefresne dbb7de042a Implement "copy_bundle_data" tool without using a python script.
When building Chrome on iOS there are 60000+ copy_bundle_data steps,
so using a python script is slow. Instead re-implement the logic in
pure shell and using hard-links when possible.

Improve the build time of a clobber build by 4.6x (measured on a
Mac Pro using goma with a reduction from 32m24.498s to 7m1.310s
according to "time").

Commands used to time the build:

  $ gn clean out/gn-Debug-iphoneos
  $ time ninja -j 1000 -C out/gn-Debug-iphoneos All_iOS

BUG=621030

Review-Url: https://codereview.chromium.org/2106353004
Cr-Original-Commit-Position: refs/heads/master@{#403696}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d5e358f61f3d6257062cdc6a6ec6a76104273ca7
2016-07-04 16:59:30 +00:00
sdefresne c1bfdd5444 [iOS/GN] Add a variable to configure the depth of "bundle_pool".
Chrome on iOS downstream developer wants to be able to control the
size of the "bundle_pool" independently of the number of concurrent
link targets.

BUG=612786

Review-Url: https://codereview.chromium.org/2085463002
Cr-Original-Commit-Position: refs/heads/master@{#402166}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f42145ad884229d1bd0f1b9012d5afeedb180f68
2016-06-27 14:07:25 +00:00
sigbjornf 454966248d gn: define and use clang_base_path
Replace uses of "//third_party/llvm-build/Release+Asserts"
with the configurable option clang_base_path.

TBR=thakis
BUG=

Review-Url: https://codereview.chromium.org/2088373002
Cr-Original-Commit-Position: refs/heads/master@{#401551}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c1369c7c73fc9bcf2d9edb29e9c5b5ed0c5f66d5
2016-06-23 06:33:45 +00:00
dpranke 50fcfddac0 Move the cros_* GN args to a .gni file and add a bootstrap cros toolchain.
This moves the cros_* GN args from //build/toolchain/cros/BUILD.gn
to //build/toolchain/cros_toolchain.gni so that files in other
places (specifically in native_client/src/trusted/service_runtime/linux)
can have access to them, and adds the nacl_bootstrap toolchain to
//build/toolchain/cros so that it is kept consistent with the target
toolchains.

R=mcgrathr@chromium.org, llozano@chromium.org, bradnelson@chromium.org
BUG=621686

Review-Url: https://codereview.chromium.org/2083063003
Cr-Original-Commit-Position: refs/heads/master@{#401532}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 44febce5c4911c03a7975273235fce6e9cacd16d
2016-06-23 03:38:43 +00:00
rsesek 212691ea33 [Mac/iOS/GN] Remove setup_toolchain.py since gyp-mac-tool is not needed anymore.
BUG=616813
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2081933004
Cr-Original-Commit-Position: refs/heads/master@{#401300}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d6ab13319cf869060624f7ade7f4f952e7f95ea7
2016-06-22 16:29:58 +00:00
sdefresne 2650cb7c86 Remove toolchain definition to build with gcc on Mac.
Those toolchain definition are not used (and not working as building
with gcc on Mac does not currently work).

BUG=None

Review-Url: https://codereview.chromium.org/2088823002
Cr-Original-Commit-Position: refs/heads/master@{#401232}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 944038877a37801b29a42ae5fbca04963df14ae1
2016-06-22 08:48:13 +00:00
sdefresne ca840d396d [iOS/GN] Allow compilation with system clang.
The official Chrome on iOS build are build using the version of clang
shipped with Xcode (a.k.a. the system version of clang). This CL adds
a flag to allow building with this version of clang instead of the
hermetic shipped with Chromium source (i.e. ToT clang).

When building with system version of clang, some compiler warning have
to be flipped as they are unsupported and the plugins are disabled (as
they only work for a single version of clang).

Refactor the definition of the toolchain for iOS and correctly set the
default_toolchain when targetting iOS based on target_cpu (used to be
incorrectly set to "//build/toolchain/mac:ios_clang_arm").

BUG=620376

Review-Url: https://codereview.chromium.org/2079283002
Cr-Original-Commit-Position: refs/heads/master@{#401119}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fe65591ff09b9180898e303ec4831d4e7dfb10e9
2016-06-21 22:00:38 +00:00
mtklein 54b609cc55 GN: support cc_wrapper on Mac
Seems maybe the original CL just overlooked build/toolchain/mac/BUILD.gn?
(https://codereview.chromium.org/1660053005)

BUG=

Review-Url: https://codereview.chromium.org/2087793002
Cr-Original-Commit-Position: refs/heads/master@{#401018}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c56a9a3bbf9e905cc17a8d2c6e890e7a0ceb7cbb
2016-06-21 17:00:02 +00:00
rsesek d45e523e24 [Mac/iOS/GN] Use rsync in copy_bundle_data instead of shutil.copytree.
As the TODO this fixes states, copytree preserves mtimes. This can cause
overbuild when building bundled products. Switch to using rsync to have more
control over copy parameters.

BUG=297668,620950
R=dpranke@chromium.org

Originally Committed: https://crrev.com/0cc137a639e9eb687b0fbde47983d672bcc8ef9f
Reverted: https://crrev.com/e127bb46966c5d7eec116a9612502e1cd0ea20cf

Review-Url: https://codereview.chromium.org/2072713005
Cr-Original-Commit-Position: refs/heads/master@{#400570}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e10a42e0d13e56e035a290b66a873442a7f71cf7
2016-06-18 01:59:52 +00:00
Robert Sesek 51e2996d06 [Mac/iOS/GN] Place a version in the command of toolchain tools implemented using scripts.
When a tool is implemented as a script, modification of the script does not
cause any dependent build steps to be dirtied and rebuilt, since the script
isn't listed as an input. To hack around this, use another script to get the
tool script's modification time and use that as the command line tool version.
This still won't cause rebuild if just the script changes, but when the build
files are regenerated (like after apply_patch and generate_build_files on the
bots), the dependent build steps will get rebuilt.

BUG=619083
R=brettw@chromium.org, sdefresne@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#400519}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f2eb108ab1e65962104bfde275743369b0e7665b
2016-06-17 22:05:12 +00:00
sdefresne 0236abf0e3 [iOS/GN] Convert .strings file to binary1 plist format.
The OS expects the localized .strings file to be in binary1 plist format
on iOS devices, so convert the files when copying the to the application
bundle (use CoreFoundation module to do the conversion instead of plutil
as the module is already loaded to validate the file format).

Rename functions in copy_bundle_data.py to follow the python style guide.

Fixes 3D touch shortcuts on Chrome on iOS when building with GN.

BUG=618398

Review-Url: https://codereview.chromium.org/2052333002
Cr-Original-Commit-Position: refs/heads/master@{#400221}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2063e083d9fed1165fe30a5e791de4fc7b960090
2016-06-16 18:58:35 +00:00
dmazzoni f71f7e3b27 Revert of [Mac/iOS/GN] Use rsync in copy_bundle_data instead of shutil.copytree. (patchset #2 id:20001 of https://codereview.chromium.org/2075463002/ )
Reason for revert:
Broke both Mac GN builders; tests are failing with errors such as:

AcceleratorsCocoaBrowserTest.MainMenuAcceleratorsInMapping (run #1):
[ RUN      ] AcceleratorsCocoaBrowserTest.MainMenuAcceleratorsInMapping
[1361:515:0615/193339:210535270587:FATAL:crashpad_client_mac.cc(411)] execvp /b/swarm_slave/work/isolated/isolated_runTnrdHD/out/Release/Chromium.app/Contents/Versions/53.0.2769.0/Chromium Framework.framework/Helpers/crashpad_handler: No such file or directory

Original issue's description:
> [Mac/iOS/GN] Use rsync in copy_bundle_data instead of shutil.copytree.
>
> As the TODO this fixes states, copytree preserves mtimes. This can cause
> overbuild when building bundled products. Switch to using rsync to have more
> control over copy parameters.
>
> BUG=297668
> R=dpranke@chromium.org
>
> Committed: https://crrev.com/0cc137a639e9eb687b0fbde47983d672bcc8ef9f
> Cr-Commit-Position: refs/heads/master@{#400047}

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

Review-Url: https://codereview.chromium.org/2074523003
Cr-Original-Commit-Position: refs/heads/master@{#400081}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e127bb46966c5d7eec116a9612502e1cd0ea20cf
2016-06-16 03:27:42 +00:00
rsesek e7ada3ed21 [Mac/iOS/GN] Use rsync in copy_bundle_data instead of shutil.copytree.
As the TODO this fixes states, copytree preserves mtimes. This can cause
overbuild when building bundled products. Switch to using rsync to have more
control over copy parameters.

BUG=297668
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2075463002
Cr-Original-Commit-Position: refs/heads/master@{#400047}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0cc137a639e9eb687b0fbde47983d672bcc8ef9f
2016-06-15 23:52:56 +00:00
apatole 696616b539 GYP changes for arm64 linux build
This change adds support for cross compiling chrome on ARM64 linux.
Temporarily disabled nacl and tcmalloc to fix compilation errors.

BUG=613452

Review-Url: https://codereview.chromium.org/2001523002
Cr-Original-Commit-Position: refs/heads/master@{#399766}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3026e6886f052160a3ff594801d5b4dbe8a20753
2016-06-14 19:43:43 +00:00
rsesek e8c5f64e1e [Mac/iOS/GN] copy_bundle_data.py should preserve symlinks.
Bundled directory structures use symlinks relative to other components in the
bundle, and those should be preserved as symlinks, rather than copying the
file contents.

BUG=297668,604809
R=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2050963002
Cr-Original-Commit-Position: refs/heads/master@{#398880}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c83d846a78e4d291bee8681bab917af7b9e12faf
2016-06-09 15:01:52 +00:00
rsesek 4842479bd8 [Mac/GN] dSYM output always goes in root_out_dir, so specify it in linker outputs.
This was causing overbuild for targets that override the output directory,
since the linker_driver.py is configured to place dSYMs in root_out_dir, but
the linker output was listed in the target_out_dir.

BUG=330301,431177
R=brettw@chromium.org

Review-Url: https://codereview.chromium.org/2049003004
Cr-Original-Commit-Position: refs/heads/master@{#398739}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0dda1538d9a8e10e8ad5288b3c2a71cd2437b643
2016-06-09 00:00:51 +00:00
sdefresne eb68188eb8 [GN] Configure a pool for copy_bundle_data and compile_xcassets tools.
Reduce the number of tasks using the copy_bundle_data and compile_xcassets
tools as they can cause lots of I/O contention when invoking ninja with a
large number of parallel jobs (e.g. when using distributed build like goma).

Use the same depth as the link_pool (but in a separate pool).

BUG=612786

Review-Url: https://codereview.chromium.org/2018553003
Cr-Original-Commit-Position: refs/heads/master@{#398585}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a78c5b20b9d0d8cb6e883e3efb83dafbc7849655
2016-06-08 16:12:39 +00:00
agrieve d3b5b6bf46 Make Android toolchains work when current_toolchain != target_toolchain
"android_tool_prefix" within the toolchain definitions was always being
keyed off of target_cpu rather than the toolchain cpu.

BUG=616819

Review-Url: https://codereview.chromium.org/2036263002
Cr-Original-Commit-Position: refs/heads/master@{#398463}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d13c10da70c170ddbdb044ef752f98a870915eee
2016-06-08 02:24:12 +00:00
hans 882d8f0ff6 setup_toolchain.py: Fix the path to win_sdk/bin/SetEnv*.json
The 'bin' part should be lowercase. This matters on case-sensitive
filesystems, such as those commonly used on Linux.

BUG=495204

Review-Url: https://codereview.chromium.org/2046633005
Cr-Original-Commit-Position: refs/heads/master@{#398340}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a5ad5a66ab0283e2c8093b2e3f04ad1a22e337e
2016-06-07 18:10:54 +00:00
dpranke aa9fdeb084 Rework how MB and GN handle concurrent links.
The Mac and iOS GN bots don't currently limit the number of concurrent
links. The official continuous win bots aren't on MB because they can't
limit the number of concurrent links through MB.

This CL adds a 'concurrent_links' arg to GN, which calls the
get_concurrent_links script to get the appropriate default value
(making this consistent across platforms), and also adds a hack
to MB to translate a gyp_link_concurrent "GYP_DEFINE" to the
GYP_LINK_CONCURRENCY env var.

The CL also adds a test for this MB hack and the similar, already existing
LLVM_FORCE_HEAD_REVISION hack.

R=scottmg@chromium.org, brettw@chromium.org
BUG=602480, 611491, 616390

Review-Url: https://codereview.chromium.org/2031233002
Cr-Original-Commit-Position: refs/heads/master@{#398200}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ec079268641d3d284884a5acf55d75af6065f549
2016-06-07 02:24:46 +00:00
dpranke 9f3f50f2d8 Update GN files w/ changes needed to make sanitizers work.
This is a set of build changes that are needed to make the
sanitizers (and sanitizer bots) work correctly. This change
should have no functional effect on the bots, since none of
the sanitizer bots are using GN yet; a follow-on CL will flip
the bots to GN.

R=brettw@chromium.org, inferno@chromium.org, thakis@chromium.org
BUG=605732, 573288

Review-Url: https://codereview.chromium.org/2031903002
Cr-Original-Commit-Position: refs/heads/master@{#397952}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9713aa43a050e81c74689be9ac11294632f44f8f
2016-06-05 22:29:54 +00:00
rsesek c1425f4066 [Mac/GN] Implement dSYM generation and stripping.
This creates a new script called the linker driver, which runs all three
steps of linking: the image link, debug info link, and stripping. In GYP,
the last two steps were handled as postbuilds, but GN lacks those. Instead,
the linker driver performs all three operations in one build step.

BUG=330301,431177
R=mark@chromium.org,dpranke@chromium.org

Review-Url: https://codereview.chromium.org/1999513002
Cr-Original-Commit-Position: refs/heads/master@{#397880}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b89811bd0b77ae38f45359c6d78a5e06b997e499
2016-06-04 01:26:19 +00:00
rsesek b27085d9b6 [Mac/iOS/GN] Add //build/toolchain/mac/filter_libtool.py.
This moves another step performed by gyp-mac-tool into a standalone script.

BUG=616813
R=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2033503003
Cr-Original-Commit-Position: refs/heads/master@{#397770}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 88e841406ed2bcd559882c79ef254dac12f9c2a3
2016-06-03 19:10:46 +00:00
krasin 581a4e6a55 Add GN configs for -fsanitizer=null.
This allows to sanitize null pointer accesses and
could increase readability of the messages from UBSan Vptr bot
(once enabled there).

BUG=616268,616870

Review-Url: https://codereview.chromium.org/2028383006
Cr-Original-Commit-Position: refs/heads/master@{#397538}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2ec1834c98f0fd1caf86983f31d0d1a122e0ad1e
2016-06-02 23:13:00 +00:00
sdefresne 03478ba7b0 [GN] Add script to compile assets catalog without using tools/gyp.
Implement the assets catalog compilation without using mac_tool.py
from tools/gyp in order to make //build independent from the rest
of Chromium checkout.

BUG=616813

Review-Url: https://codereview.chromium.org/2023223002
Cr-Original-Commit-Position: refs/heads/master@{#397469}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 17dd77eb2af78643ffeb32bbb2ee48c2d22106e7
2016-06-02 18:18:36 +00:00
agrieve 1203c552eb Reland of Enable LTO on Linux for the official builds.
Reason for reland:
Uses target_os rather than is_linux

This CL turns on Link-Time Optimization for official
builds, which makes the resulting binaries to run faster.

On the dark side, the change increases the link time by 3x-5x,
and is also very memory-hungry. All official bots were
upgraded to have 200+ GB RAM to handle LTO builds. Timeouts
were also accordingly increased.

This CL might cause timeouts / OOMs, if some slaves still
have not enough RAM. Please, revert the CL with pointing
out to the slaves / bots broken by this change.

NOTRY=true
TBR=thakis
BUG=453195,615039

Review-Url: https://codereview.chromium.org/2017633002
Cr-Original-Commit-Position: refs/heads/master@{#396186}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c8648b6aef59bf539251dc5242820a83b1a751f9
2016-05-26 15:46:44 +00:00
agrieve 9edc028614 Revert of Enable LTO on Linux for the official builds. (patchset #1 id:1 of https://codereview.chromium.org/2003733004/ )
Reason for revert:
Breaks android x64 builds.
https://bugs.chromium.org/p/chromium/issues/detail?id=615039

Original issue's description:
> Enable LTO on Linux for the official builds.
>
> This CL turns on Link-Time Optimization for official
> builds, which makes the resulting binaries to run faster.
>
> On the dark side, the change increases the link time by 3x-5x,
> and is also very memory-hungry. All official bots were
> upgraded to have 200+ GB RAM to handle LTO builds. Timeouts
> were also accordingly increased.
>
> This CL might cause timeouts / OOMs, if some slaves still
> have not enough RAM. Please, revert the CL with pointing
> out to the slaves / bots broken by this change.
>
> BUG=453195
>
> Committed: https://crrev.com/7c163521444b7277f2c33bc7bc05667673db7d48
> Cr-Commit-Position: refs/heads/master@{#395365}

TBR=dpranke@chromium.org,thestig@chromium.org,krasin@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=453195,615039

Review-Url: https://codereview.chromium.org/2015703004
Cr-Original-Commit-Position: refs/heads/master@{#396175}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3ec265f1c1a76a6f5dfee6d860cf1a4b6e9ba79a
2016-05-26 15:20:13 +00:00
dpranke ac72183950 Allow use_debug_fission to be passed to gcc_toolchain().
This is needed so that the nacl_bootstrap toolchains can force it
to be off regardless of the setting for the default toolchains.

TBR=mcgrathr@chromium.org
BUG=605896

Review-Url: https://codereview.chromium.org/2011693002
Cr-Original-Commit-Position: refs/heads/master@{#395770}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8aefecbfa0b40fb644ca63fd742bd04eb576ba7f
2016-05-25 01:48:58 +00:00
dpranke 400b785b94 Add cros_{target,host,v8_snapshot}_{nm,readelf} vars to GN build.
So that the CrOS ebuild builds can customize paths to nm and readelf
as needed.

R=stevenjb@chromium.org, llozano@chromium.org
BUG=608596

Review-Url: https://codereview.chromium.org/2003193002
Cr-Original-Commit-Position: refs/heads/master@{#395505}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5d3de89f668f8e8923a8baa70e1e2b31b5a72fd0
2016-05-24 01:34:47 +00:00
krasin 5fc69c43cd Enable LTO on Linux for the official builds.
This CL turns on Link-Time Optimization for official
builds, which makes the resulting binaries to run faster.

On the dark side, the change increases the link time by 3x-5x,
and is also very memory-hungry. All official bots were
upgraded to have 200+ GB RAM to handle LTO builds. Timeouts
were also accordingly increased.

This CL might cause timeouts / OOMs, if some slaves still
have not enough RAM. Please, revert the CL with pointing
out to the slaves / bots broken by this change.

BUG=453195

Review-Url: https://codereview.chromium.org/2003733004
Cr-Original-Commit-Position: refs/heads/master@{#395365}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7c163521444b7277f2c33bc7bc05667673db7d48
2016-05-23 18:21:04 +00:00
sammc c7a3455a09 Correctly set -stdlib=libc++ when building with a custom libc++.
The libcxx_proxy target used to set the link-time configuration to
correctly link libc++ sets it as a public_config. However, the sanitizer
deps targets have only private dependencies on libcxx_proxy so the
config does not apply to their dependents. This changes those
dependencies to be public.

This disables sanitizers for all non-default gcc_toolchain toolchains;
the android host toolchain build does not support building with libc++
and the GYP build does not use sanitizers for building host targets.

BUG=573288

Review-Url: https://codereview.chromium.org/1979973002
Cr-Original-Commit-Position: refs/heads/master@{#394910}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34099cc1fb570af8990d5fad1b1e11fe4290680b
2016-05-19 23:54:29 +00:00
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
brucedawson 2db0837c2c 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

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

Cr-Original-Commit-Position: refs/heads/master@{#374324}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 36f03f2ac1f92b6f41129f013f8a808f7b9127fc
2016-02-09 06:35:51 +00:00
zmo 961ac31b12 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

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

Cr-Original-Commit-Position: refs/heads/master@{#374062}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 03f6b0af0a3a0127f5e939095157079659ab7cc8
2016-02-07 19:44:32 +00:00
brucedawson 6eb1a486bd 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

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

Cr-Original-Commit-Position: refs/heads/master@{#374058}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 20e99ecb08da22582d435c1a5bba0a5c96345da3
2016-02-07 18:18:53 +00:00
thakis 1bf6bbe58a 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

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

Cr-Original-Commit-Position: refs/heads/master@{#374013}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bbc766aef1bd8cb0d9546fec9abf264e7d8c1d96
2016-02-06 06:29:46 +00:00
brucedawson 30c0fafe79 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

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

Cr-Original-Commit-Position: refs/heads/master@{#373955}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4c17ac0db59d7dbe78734950f83912ab564bd6fe
2016-02-05 23:55:12 +00:00
mcgrathr 2b53a9a686 GN: Use special toolchain for nacl64.exe, force is_component_build off
The nacl64.exe build within the Windows 32-bit x86 Chrome build is not
compatible with component-style builds.  Build nacl64.exe in a special
variant of the x64 toolchain, wherein is_component_build is always false.

BUG=512869
CQ_EXTRA_TRYBOTS=tryserver.chromium.win:win8_chromium_gn_dbg,win_chromium_gn_x64_rel,win_clang_dbg

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

Cr-Original-Commit-Position: refs/heads/master@{#372485}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b69e64de8c10dee033d42e8cd92dcca6f2f81411
2016-01-30 00:13:28 +00:00
martina.kollarova a350a2c166 Add option make_clang_dir to GN
Same as the GYP flag with the same name. Useful for e.g. compiling with
Icecc.

BUG=None

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

Cr-Original-Commit-Position: refs/heads/master@{#372309}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a4b54d2a95376c206ece54ad394c2aec6be3610d
2016-01-29 08:29:36 +00:00
joedow 2f2c4cee4e Revert of GN: Use special toolchain for nacl64.exe, force is_component_build off (patchset #2 id:20001 of https://codereview.chromium.org/1580723006/ )
Reason for revert:
We are seeing errors on Win x64 fre/chk GN build bots and this is the most likely cause.  Reverting.

Original issue's description:
> GN: Use special toolchain for nacl64.exe, force is_component_build off
>
> The nacl64.exe build within the Windows 32-bit x86 Chrome build is not
> compatible with component-style builds.  Build nacl64.exe in a special
> variant of the x64 toolchain, wherein is_component_build is always false.
>
> BUG=512869
> R=bradnelson@chromium.org, dpranke@chromium.org
>
> Committed: https://crrev.com/8fdf65ae2d38dc0c7bb9ff8f36b4c1f48055844a
> Cr-Commit-Position: refs/heads/master@{#372217}

TBR=bradnelson@chromium.org,dpranke@chromium.org,mcgrathr@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=512869

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

Cr-Original-Commit-Position: refs/heads/master@{#372229}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 238933500209bb447b1e35e7ba0d7cab61ac89c1
2016-01-29 00:53:21 +00:00
mcgrathr 4357d189c5 GN: Use special toolchain for nacl64.exe, force is_component_build off
The nacl64.exe build within the Windows 32-bit x86 Chrome build is not
compatible with component-style builds.  Build nacl64.exe in a special
variant of the x64 toolchain, wherein is_component_build is always false.

BUG=512869
R=bradnelson@chromium.org, dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#372217}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8fdf65ae2d38dc0c7bb9ff8f36b4c1f48055844a
2016-01-29 00:20:41 +00:00
brucedawson fcd6b99663 Fix gn builds with locally installed VS
gn builds that use a locally installed copy of Visual Studio (that is,
builds with DEPOT_TOOLS_WIN_TOOLCHAIN=0) fail to build because they
use the Windows 8.1 SDK, whereas Chrome now requires the Windows 10
SDK. This change updates the 8.1 references to point to 10.0.10586.0.

BUG=568201

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

Cr-Original-Commit-Position: refs/heads/master@{#370830}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 953e376855384defa8c9b127e010c88cb6c56957
2016-01-21 23:37:55 +00:00
zforman 848d96cd76 Makes the ar command used deterministic.
The D flag makes ar deterministic (i.e. for the same files as inputs,
it will always produce identical outputs.

Having deterministic .a files takes us much closer to
having a fully deterministic build.

171 previously time varying .a files are now deterministic.

BUG=454642

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

Cr-Original-Commit-Position: refs/heads/master@{#370283}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 52619d68cf150087682e2a70c4a221882aa59f47
2016-01-20 02:28:22 +00:00
thakis 3bab10a7f8 win: Call clang-cl instead of clang-cl.exe when targeting win on a non-win host.
No behavior change, since non-win hosts targeting windows currently don't
exist. But if they did, there are three choices for how to invoke the compiler:

1. Call the compiler on the host clang-cl.exe instead of clang-cl.  That's weird
   because clang-cl is a host-native binary.

2. Don't append ".exe" to any program in build/toolchain/win/BUILD.gn -- it's
   probably not needed on Windows.  But if we end up running real Windows
   binaries on non-Windows (e.g. midl.exe through wine), then those would
   have a .exe extension on the non-Windows host.

3. Do what this CL does. This seems nicest.

BUG=495204

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

Cr-Original-Commit-Position: refs/heads/master@{#369854}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8391051c80fa58d3b4a9021f4185cbc71e69f32e
2016-01-15 21:53:11 +00:00
bratell 9f750de1ab [gn] Detect location of Visual Studio in the registry.
Look in the registry to figure out where Visual Studio is located
on the disk.

BUG=460462

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

Cr-Original-Commit-Position: refs/heads/master@{#368089}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c7af879c6c72db32930e25f20f9a9f602f11840c
2016-01-07 16:32:08 +00:00
krasin d1b458451f Reduce memory requirement to linux LTO builds to speed up bots.
The new requirements won't be enough for the official bots,
but the old requirements made all the bots to be extremely
slow (5-7 hours), and we don't run official bots as of now,
because that was too slow for CFI launch.

Reverting to the settings good enough for development, and keep in mind,
that we need to do something about the memory consumption for LTO builds
before we could attempt to launch again.

BUG=570227,464797

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

Cr-Original-Commit-Position: refs/heads/master@{#367323}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 61e70ccb5957620f3329f07ef79a76b81c96044b
2016-01-04 17:49:33 +00:00
krasin 35f52cbbb8 Reduce concurrency for LTO builds. Reserve 32 GB per link job.
BUG=464797
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#365148}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 23d659b2daba01396042c29856dd768c5b0d45bb
2015-12-15 05:07:53 +00:00
agrieve 4571b5cd1b GN: Fix incorrect android toolchain value for arm64 and mips64el
BUG=568883

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

Cr-Original-Commit-Position: refs/heads/master@{#364718}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 57933b7928005cd5f29d42f419b7c14a322b5c4e
2015-12-11 16:49:54 +00:00
krasin 77f19e8480 Give more RAM per ld process.
It has been observed that occasionally official buildbots
would crash with OOM, when building Chrome with CFI
(and thus with LTO). This CL reduces the number of
concurrent link processes to avoid this problem.

BUG=464797

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

Cr-Original-Commit-Position: refs/heads/master@{#364173}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2d29f7386050b401838cfbb722a0f53fd1230fce
2015-12-09 22:16:41 +00:00
brucedawson 53a5ce2311 Error checking to clarify SYSTEMROOT errors
Occasionally developers hit this cryptic error:

Exception: Environment variable "SYSTEMROOT" required to be set to valid path

The error message is well intentioned but inevitably misleading. The problem is
rarely if ever caused by SYSTEMROOT not being set. In the most recent case it
was caused by the "SetEnv.cmd && set" command failing.

This change adds two bits of error checking - checking the error code of the
Popen command, and ensuring that the results coming in to
_ExtractImportantEnvironment are plausible. Both of these checks can detect this
particular error, and one or both of them should detect future problems.

This was initially done for gyp in crrev.com/1501673004, this makes the same fix
for gn builds.

R=jam@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#363930}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5e289be0b06d4781610d16daec9064f6f811ce18
2015-12-09 02:30:30 +00:00
rjkroege 379012815d build CrOS chrome with gn
Augment the CrOS gn build to successfully build CrOS Chrome with gn.

BUG=558623

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

Cr-Original-Commit-Position: refs/heads/master@{#363616}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 294d703324a8914ca636209b32fca94034ce9e16
2015-12-07 22:57:30 +00:00
mcgrathr e6e406eb63 GN: Fix use of current_cpu in //build/toolchain/win
Using current_cpu and current_os as names for template parameters is
confusing and is inconsistent with the other toolchain-defining
templates.  Name them toolchain_cpu and toolchain_os for consistency
with the other implementations.  This makes it more obvious that
testing invoker.toolchain_cpu inside a definition is the proper thing
to do.  The old code's test of current_cpu was wrong (see
crbug.com/566241) and could have been fixed with invoker.current_cpu,
but avoiding the current_cpu name makes things clearer.

BUG= 566241
BUG= 512869
R=dpranke@chromium.org, scottmg@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#363571}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 550ceee0b5f8b825ebf93a5f977c6d57b9a10be6
2015-12-07 20:51:40 +00:00
krasin 58917cb217 get_concurrent_links.py: give more RAM per job in LTO builds.
This is required for launching Control Flow Integrity on Linux x86-64,
as it uses LTO builds, which use significantly more memory during
link phase.

Failing to do that lead me to see this OOM error message on the bot:
https://chromegw.corp.google.com/i/official.desktop/builders/precise64/builds/253

BUG=565162,464797

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

Cr-Original-Commit-Position: refs/heads/master@{#363137}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b2f896b9b2083ced0a42879ef6ea427a3cd56d4
2015-12-04 04:45:51 +00:00
agrieve 8041ab4482 GN(Android): Add libosmesa.so to ContentShell.apk
BUG=559289

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

Cr-Original-Commit-Position: refs/heads/master@{#362866}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: da37b9ba5421dc03b28d507c2de7a422790a190a
2015-12-03 02:17:49 +00:00
mcgrathr 6b6e368a32 GN: Propagate top-level host_toolchain through to all toolchains
The logic to choose host_toolchain depends on variables like
is_clang that might be overridden in toolchain_args() as well as
set as a build argument by the user.  Only the top-level build
arguments should affect the host_toolchain value, not anything
set in some toolchain's toolchain_args() block.  To achieve this,
set host_toolchain once at top level and then make each toolchain
propagate that value down in its toolchain_args() block.

BUG= 512869
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#362758}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e393ea6912a747e8c340fc5a53f2be45028d70c1
2015-12-02 18:53:02 +00:00
mcgrathr 5a59a16258 GN: Make PNaCl toolchains work on Windows
The PNaCl toolchain tools are all wrapper scripts rather than
binary executable files.  On Windows, running these from GN/Ninja
or Python needs special attention.

BUG= 512869
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#362525}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d7d25ca8325c4ff489bd67ef69f3a66166f4079
2015-12-01 22:19:02 +00:00
Gordana.Cmiljanovic 01edeca201 gn: add support for clang for MIPS
This changes enables chrome for MIPS (Linux and Android)
to be compiled with clang when using gn build.

However, there are still few issues for build to complete successfully:

- "treat_warnings_as_errors=false" must be set for both Android and Linux.
- in case of Linux ldflags retreived by 'exec_script("sysroot_ld_path.py",..'
  are ignored by linker, which is causing link failure for 'chrome' target.

BUG=gn gen for MIPS
TEST=gn gen out-gn/mips --args="is_debug=false target_os=\"android\" target_cpu=\"mipsel\" is_clang=true treat_warnings_as_errors=false"
     ninja -C out-gn/mips chrome_public_apk

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

Cr-Original-Commit-Position: refs/heads/master@{#362002}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: af7fa747c3c2e433028103b45173c0275333abc7
2015-11-27 15:06:22 +00:00
mcgrathr 00110dcc9a Enable strip in newlib_pnacl_nonsfi toolchain
Now that the PNaCl toolchain has been updated so that pnacl-strip
accepts the --strip-unneeded switch, the nacl-nonsfi builds can use it.

BUG= none
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#361455}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 856e261366bc19b437fec95d478fbc3c679e07db
2015-11-24 21:49:09 +00:00
brucedawson f1b479b99f Tweaks to vs_toolchain to simplify it, and support gn VS 2015
This change updates and simplifies vs_toolchain.py so that it supports
VS 2015 in gn builds. The gn and gyp code now shares DLL copying code so
that they should more naturally stay in sync in the future. The
out_release_nacl64 directory now gets a PGO DLL that it didn't used to.

The six warnings globally disabled are globally disabled in gyp builds
as well. The equivalent warnings (narrowing conversions and variable
shadowing) are disabled in gcc/clang so there is no bug for enabling
them at this time.

BUG=440500

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

Cr-Original-Commit-Position: refs/heads/master@{#360988}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: aaff8dcb6ee993a18ab6e7236711839e72e81cc3
2015-11-21 02:22:49 +00:00
mcgrathr fe5cf23afa GN: Disable strip in newlib_pnacl_nonsfi toolchain
The pnacl-strip tool does not grok the --strip-unneeded flag that
gcc_toolchain.gni uses.  Disable stripping for this toolchain for now.
It can be reenabled soon after the tool has been updated.

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

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

Cr-Original-Commit-Position: refs/heads/master@{#359865}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c3dcc79c556f87330d18703b538962c0d4c0a7e4
2015-11-16 18:16:29 +00:00
mcgrathr f011fc4d0d GN: Make NaCl toolchains run on Windows host
The toolchain executables have the ".exe" suffix on Windows.  Plumb
through the readelf, nm, and strip tools for NaCl toolchains.  These
were accidentally using default host tools, which happen to work on
other host platforms, but don't exist on Windows.

BUG= 512869
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#359715}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34fa90d65772e8b432d5c37cd607ed6d6dcc5ca0
2015-11-14 01:17:54 +00:00
brettw 876fc11156 Use label name to generate PDB names in GN.
On Windows the GN toolchain setup used the output name to make unique PDB names. But the output name isn't necessarily that unique. The only requirement on that is that the outputs not collide, but multiple targets can otherwise have the same output name. Also, the output name can contain slashes that put it in different directories, or spaces which might confuse certain tools.

The label name is guaranteed to be unique in a given target_out_dir so this should give better names.

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

Cr-Original-Commit-Position: refs/heads/master@{#359677}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 62b96626799d935ec467c5104f2da5b8ce080592
2015-11-13 22:53:25 +00:00
mcgrathr 0f528d91b2 GN: Refactor PNaCl toolchain definitions to use a template
This reduces duplicated code by using a template.
Ironically, some extra duplication is necessitated by GN bug 555724.
The variable definition can be hoisted back up when that bug is fixed.

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

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

Cr-Original-Commit-Position: refs/heads/master@{#359643}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b3b31d64338c7eadb59b433da6a933f9ad1c0ca
2015-11-13 21:16:51 +00:00
dpranke 5fe0a6e50b Allow goma to work w/ NaCl toolchains in GN build.
This change allows the default logic for goma to work
for NaCl (which appears to work fine, at least in local
testing, and it looks like build_nexe.py supports goma
these days as well).

Let's enable this and see what happens; if this doesn't
work, then we need to figure out a way to set a
per-toolchain limit on concurrent compiles like there
is for concurrent_links , and figure out how to make
that get set appropriately for nacl differently from
cc.

R=mcgrathr@chromium.org
BUG=555123

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

Cr-Original-Commit-Position: refs/heads/master@{#359595}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d434bf3f1b28416a88604325372a01b908c099c0
2015-11-13 19:18:29 +00:00
agrieve ed6a3fb286 GN: Remove mentions of lib.stripped
It was changed to lib.unstripped a while ago.

BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#359103}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 96faf63bcc0f03cf9f7f9c2e56e7cb471a547b84
2015-11-11 17:09:54 +00:00
brettw 903f375c02 Put GN object files in subdir based on the label.
Previously the subdir was based on the output name. These are usually the same but might be different if output_name is overridden, and for libraries on Linux that have a "lib" prefix.

The label name is more unique better matches what one would expect (especiall for the "lib" prefix case). Most importantly, the output name might have spaces which confuses Mac.

BUG=546894

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

Cr-Original-Commit-Position: refs/heads/master@{#358925}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ea6d9154695bb4ce09ae88006d572e0c0e472b23
2015-11-10 22:11:51 +00:00
brettw 10ba3ea3db Clean up Windows GN toolchains.
Properly sets up 64-bit cross compiles when targeting 32-bit CPUs on Windows.

Enables the cloud print portmon library 64-bit cross-compile.

Removes vc_bin_dir build argument. This doesn't play nicely with multiple architectures in a build. If we need this, a more expressive build setting will need to be invented.

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

Cr-Original-Commit-Position: refs/heads/master@{#358910}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6bbfd4e271e88644369b01f8b43a88f09adda155
2015-11-10 21:43:09 +00:00
brettw f4e57e4e23 Support spaces in Mac GN build output names.
We can't use object paths with spaces in them due to a mismatch between Ninja and the Mac LD's filelist parameter (explained in more detail in a comment added in the mac toolchain GN file). In order to support output_names with spaces, the object file directory must be based on something else.

Adds a new substitution "{{target_label}}" to the tool that expands to the target name after the colon, not overridden by the output_name. This makes more sense from a directory structure perspective, and label names won't have spaces (they can but don't, and with this change won't work on Mac).

Also adds quoting for Mac tool commands so spaces will work in names.

I made the change in the Mac toolchain definition for testing, but it is currently commented out pending the binary roll. After the binary roll, we should uncomment this and update the other toolchains to match.

BUG=546894

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

Cr-Original-Commit-Position: refs/heads/master@{#358792}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 782b1bc8562e9adbb1ea7d98929d6709ff7290b9
2015-11-10 05:03:51 +00:00
brettw 4230d375f3 Support spaces in output names in GN Linux
This quotes BUILD-file-generated file names in command lines in the gcc_toolchain. I checked that executables and shared libraries with spaces can be built now. This doesn't affect Mac or Windows.

BUG=546894

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

Cr-Original-Commit-Position: refs/heads/master@{#358708}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: af7fb1f58f1d3348dab79312422f6c4bf5313101
2015-11-09 23:57:13 +00:00
mcgrathr e082ba4c39 GN: Avoid nontrivial shell commands in gcc_toolchain tool("link")
The gcc_toolchain template is used for NaCl toolchains on every host
OS, as well as for the native toolchains on a POSIXy OS.  When the
host is not POSIXy, the toolchain commands cannot use sh syntax (not
even '&&').  The "link" tool does more than a simple command when
'strip' or 'postlink' variables are set, and used POSIX sh syntax to
in these cases.  To make this tool portable, make it use a Python
script instead of those complex shell command lines.  The 'postlink'
variable was used only for the pnacl toolchain's "finalize" step and
it can just as well use the 'strip' variable for that purpose, so
simplify things by eliminating 'postlink' entirely.

BUG= 512869
R=dpranke@chromium.org, dschuff@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#358684}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 46f8e4a291285770abb2357402fe8e662e00df2e
2015-11-09 22:29:36 +00:00
mcgrathr a236b192db GN: Fix Windows tool("asm") for x86-64
The Windows assembler is called ml.exe when it targets x86-32.
But it's called ml64.exe when it targets x86-64.

BUG= 512869
R=scottmg@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#357977}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a6dec6d8e6d755db2c91ccd4add9ec08613a8fe
2015-11-05 01:57:51 +00:00
mcgrathr 53c73af0f9 GN: Avoid nontrivial shell commands in gcc_toolchain tools
The gcc_toolchain template is used for NaCl toolchains on every
host OS, as well as for the native toolchains on a POSIXy OS.
When the host is not POSIXy, the toolchain commands cannot use
nontrivial sh syntax or other POSIX utilities (such as 'cut').
The "ar" and "solink" tools do more than a simple command and
used POSIX sh syntax to do their work.  To make these tools
portable, make them use Python scripts instead of those complex
shell command lines.

BUG= 512869
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#356699}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0b367cc8cf4b27037e5c709adf37271c0d90d392
2015-10-29 00:25:08 +00:00
mcgrathr 63498687a1 GN: Factor "stamp" and "copy" details out of toolchains
The "stamp" and "copy" tools are unlike all other tools in a toolchain:
their definitions are entirely generic to a given host operating system,
rather than depending on the exact the target of the toolchain.  Use the
same definitions in all toolchains, depending only on $host_os.

BUG= 512869
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#356416}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4d550a5990654c3dcfa9bbc38da3bbfa4e5c4796
2015-10-27 22:38:10 +00:00
mcgrathr 186310f0f9 GN: Strip NaCl IRT and save its .debug file
With a simple tweak, the toolchain already knows how to strip the
nexe and leave the unstripped nexe where it can be found.  After
that, the unstripped nexe can just be copied as the .debug file and
a single objcopy command suffices to annotate the stripped file with
a pointer to the .debug file.

Also factor out computations about toolchain directory names into
//build/config/nacl/config.gni where they can be reused.

BUG= 546352
R=bbudge@chromium.org, dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#356340}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a379aa7f9ff6fe49bd441869887c7b517a1a0a0
2015-10-27 18:12:26 +00:00
phosek f27159c662 Build nacl_helper_nonsfi with GN
Support building nacl_helper_nonsfi under GN.

BUG=462791

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

Cr-Original-Commit-Position: refs/heads/master@{#356234}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 636bceb3f0fc3062735203ef149e91736ec89024
2015-10-27 03:37:52 +00:00
phosek 50c59a2fd2 GN: mark newlib_pnacl toolchain as clang
newlib_pnacl toolchain is based on clang so it should be marked as such
to use the correct cflags.

BUG= 462791

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

Cr-Original-Commit-Position: refs/heads/master@{#356098}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 33dd52f8995f6605cf7d1858f95b5e9cd98a5a09
2015-10-26 19:35:38 +00:00
brettw 7f5b184639 Make chrome and other targets compile on Mac GN
The other targets include browser_tests, interactive_ui_tests, sync_integration_tests, extensions_browsertests, content_shell, app_shell.

These targets don't actually run because bundles aren't supported yet.

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

Cr-Original-Commit-Position: refs/heads/master@{#355917}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e1d4065ee1d16e56d5b3267bfb643615454e9ba7
2015-10-23 23:07:31 +00:00
mcgrathr 688c5744d1 GN: Add nacl_arm_glibc toolchain
This adds a toolchain definition for NaCl's ARM glibc toolchain.
Nothing uses this yet.  Once this lands, changes in the native_client
repo will be required to start using it.

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

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

Cr-Original-Commit-Position: refs/heads/master@{#355398}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ab949d7831e67970d671352cf7815b4e52c93b9b
2015-10-21 21:07:24 +00:00
brettw 179c4d71d7 Add more test binaries to GN Mac build.
This adds components_unittests (passes) and components_browsertests (fails with some bundle-related errors).

osmesa should be a loadable_module on Mac. I removed the "lib" prefix from loadable modules on Mac as GYP calls is just "osmesa.so".

Removes a GYP warning exclusion for libaddressinput because Grit no longer generates a file ending with no newline.

Made device's weak_framework parameter two arguments rather than one with a space. GN will escape the space to keep everything together, and this confuses clang.

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

Cr-Original-Commit-Position: refs/heads/master@{#355228}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 011138d7e02ee1c345fa55805ca2c154ca68c1bf
2015-10-21 03:06:32 +00:00
andybons af3449846c [GN] Add solink_module tool on the Mac, Win, and GCC toolchains.
For use by the loadable_module target type.

BUG=369774
R=dpranke@chromium.org,brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#354195}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f37bc521ebc64896b346b054ebce36d0f830b68b
2015-10-15 01:41:16 +00:00
andybons 473bc27f5c [GN]: support for loadable modules
+ Adds a new target type loadable_module and tool type solink_module. loadable_module will trigger the solink_module tool type in the toolchain.
+ Updates reference.md and editor configs.

BUG=369774

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

Cr-Original-Commit-Position: refs/heads/master@{#354077}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 027840da082368b8d51f06b9c310807540e50eea
2015-10-14 18:50:21 +00:00
amistry 3ec425ad61 Add UBsan vtpr support to GN.
BUG=527515

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

Cr-Original-Commit-Position: refs/heads/master@{#353485}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7f05a012be0c8c3950971111e4f750e8b3827816
2015-10-12 04:59:18 +00:00
mcgrathr d0b35241c7 GN: Fix NaCl IRT build options
The NaCl IRT is a special case and needs to be built with specific
code-generation and optimization options (we also always want debug
symbols).  This plumbs through an is_nacl_irt variable that configs
can test, and uses that to make the standard configs do the right
thing.  The resulting compiler and linker flags are a close
approximation of what GYP uses.

BUG= 531702
R=dpranke@chromium.org, dschuff@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#353385}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0b9de3622acdbc1fba625094b369090f65145b78
2015-10-09 21:23:50 +00:00
mcgrathr aa15e8cd52 GN: Refactor Linux Clang toolchain definitions, plumb use_gold for toolchain_args()
This factors the commonalities of defining Clang toolchains into a
new "clang_toolchain" template.  As well as reducing boilerplate in
build/toolchain/linux/BUILD.gn, this makes it more straightforward
to define variant toolchains the diverge slightly from the standard
Clang toolchains.  One such divergence needed for the case of a
special toolchain to handle nacl_helper_bootstrap is the use_gold
setting; so that is plumbed through the gcc_toolchain template, and
the new clang_toolchain template, such that their invokers can get
their use_gold setting into the toolchain_args() block.

To make toolchain_args() overriding of use_gold affect the default
values of declare_args() variables that depend on use_gold, those
initializations are moved out of the declare_args() block.

BUG= none
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#353081}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: de55ff1d33fcf3b5312034542d642b54766a25be
2015-10-08 17:15:17 +00:00
brettw 48a7605e24 Add GCAPI to the GN build.
GCAPI is a Windows-specific API for distributors of Chrome.

This adds all chrome/installer targets to "gn check" and fixes many associated issues. The result codes targets are also added to "gn check" to make sure people don't accidentally add stuff to those headers.

Rather than add a disable for the size_t to int warning for this target, I just fixed the warning and removed the disable flag from GYP.

Merged //chrome/common:result_codes into //chrome/common:constants. This is basically a constant and everybody that needed the result codes already depended on the constants target.

Fix google_update build file. The midl template already did everything this file was trying to do. I clarified the template documentation a bit.

BUG=539428

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

Cr-Original-Commit-Position: refs/heads/master@{#352869}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f986f9572c792346194055784b9237820ffce52b
2015-10-07 17:22:58 +00:00
phosek 15ed185123 Build PPAPI PNaCl Newlib tests with GN
Support building PPAPI NaCl tests with PNaCl/Newlib-based toolchain.

BUG=462791

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

Cr-Original-Commit-Position: refs/heads/master@{#352678}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c635281a6809c3f1547d6819b8a87d94b5bdbefe
2015-10-06 20:35:55 +00:00
kcconley 3ab7689249 [GN]: mac toolchain BUILD file housecleaning
BUG=none
R=andybons@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#352671}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8fd6c67f04a47afdd66ad4a6ca5f23fa5a1f04a7
2015-10-06 19:57:17 +00:00
amistry 71f7a81480 Add Undefined Behaviour sanitizer support to GN.
BUG=527515

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

Cr-Original-Commit-Position: refs/heads/master@{#351447}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e4309543a4dcca98d54ae0ae44cb2eaa3f287c95
2015-09-30 00:31:38 +00:00
andybons 209832333a [GN]: BUILD file housecleaning
+ Turn on precompiled headers on Mac.
+ Change the toolchains to use asmflags instead of cflags and cflags_c.
+ Remove a TODO to hardcode the Mac SDK since the location of the SDK is not always guaranteed (on bots, for example).
+ GN: .S or .asm files no longer trigger cflags or cflags_c to be written to the ninja file.

BUG=none

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

Cr-Original-Commit-Position: refs/heads/master@{#351202}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a73be6eb4963662a1e9455dcdab0d5130324901
2015-09-28 23:36:03 +00:00
tsniatowski 3efd0b18a6 Move goma/ccache logic to //build/toolchain/gcc_toolchain.gni
Avoid logic duplication between linux/android/... toolchain definitions
that all did the same thing. This is helpful for further work with
compiler prefixes / wrappers, in particular for non-goma-users.

Some toolchains used the prefix on nm and objcopy calls, this was probably
wrong and no longer happens. The toolchains that used gcc_toolchain.gni
but did not manually setup goma/ccache opt out of the setting to avoid
large behavior changes.

BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#350767}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dfe796aa7deb3cb7c72dfdd294c73554b4e5c0c2
2015-09-25 04:44:28 +00:00
phosek 44c0ba1222 Use host instead of current OS for NaCl toolchain location
We should be using the host OS for determining the toolchain location
as this is the OS toolchain is going to be running on.

BUG=462791

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

Cr-Original-Commit-Position: refs/heads/master@{#350734}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f68cf5be7c8cd51e51a5c02777053518b2e529e9
2015-09-25 01:20:19 +00:00
andybons f7a4d17342 [GN]: Add asmflags
+ Also, don’t specify a PCH as a dependency for a build rule that doesn't support PCH.

BUG=418613

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

Cr-Original-Commit-Position: refs/heads/master@{#350654}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 40fc4844e1a0dd91378044911fd2df573447369d
2015-09-24 20:42:52 +00:00
phosek 5d6c4d3c61 Build PPAPI NaCl Glibc tests with GN
Support building PPAPI NaCl tests with GCC/Glibc-based toolchain.

BUG=462791

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

Cr-Original-Commit-Position: refs/heads/master@{#350467}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 70a330fb376e614a401e738f6e7442674b0052bd
2015-09-24 03:24:26 +00:00
mcgrathr 567e0c9218 GN: Define clang_newlib_arm toolchain for NaCl
Define the NaCl toolchain "clang_newlib_arm" with some refactoring.
This makes it possible to build ppapi_nacl_tests on ARM, so enable that.
Also let enable_nacl_browsertests=true function for machines other than
x86-64, since that build more or less works now for all NaCl machines.

R=dpranke@chromium.org
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#350280}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8eea7d4bd41472136bf73dccd0d462bd4b2e8124
2015-09-23 00:40:19 +00:00
mcgrathr 17a2e29f3f GN: Harmonize ARM compiler settings with GYP
This changes various defaults about the ARM compiler setup so
that GN matches what GYP does today:
* Prefix for cross tools is arm-linux-gnueabihf- not arm-linux-gnueabi-
* arm_float_abi defaults to hard for non-Android ARMv7
* Non-CrOS ARM builds use the ARM sysroot by default
  (the one installed by install-build-deps.sh --arm)
* Define a clang_arm toolchain, pass it the -no-integrated and
  -target arm-linux-gnueabihf and switches as GYP does

R=dpranke@chromium.org, sbc@chromium.org
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#350100}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc3a331e1bc91166a5d51fc1fa44fba49d1fb461
2015-09-22 03:26:20 +00:00
andybons ce5f797876 [GN]: Precompiled header support for GCC.
+ Adds `gcc` as an option for `precompiled_header_type`
+ Fixes a bug where build targets had superfluous pch deps.
+ GCH files are compiled using the `-x <header lang>` and used via the `-header` flag. Since the two are mutually exclusive and we didn’t want to add `-header` to every build target line, the global cflags_* vars contain `-include` and each pch build target includes its own copy of the cflags_* values while replacing `-include` with `-x <header lang>`

BUG=297681

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

Cr-Original-Commit-Position: refs/heads/master@{#349518}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ae777a027b5243924f2b3ba774067a7bf5926cf
2015-09-17 22:25:11 +00:00
mcgrathr 77498aea07 gn: Drop NaCl gcc-newlib toolchains
NaCl's gcc-newlib toolchains are no longer supported and should never
be used in bot builds at this point.  The newlib use cases are now
supported by the nacl-clang toolchain.  The gcc-glibc toolchains
remain as they were.

R=dpranke@chromium.org, dschuff@chromium.org
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#349478}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5927063a80783f2873f6be1e5948d9382028fff3
2015-09-17 20:14:30 +00:00
mcgrathr be2bfa1e2d Refactor NaCl IRT toolchains, use arm-nacl-clang
This factors the irt_* toolchain definitions using a template to reduce
copied boilerplate.  It also switches the ARM build to use arm-nacl-clang
rather than arm-nacl-gcc, which matches what the GYP build does now.  Many
of the compilation flags are still not at all right, but this is enough
for the build of the IRT to complete successfully.

BUG=531702
R=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#348781}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 916aafa6563eb600b60a683d52d0c121f2eaee92
2015-09-15 00:07:41 +00:00
brettw fa27f4cab0 Fix nested config in GN.
This also moves the config out of the template. Otherwise this will generate an
error if there is more than one MIDL target in the same directory.

Use forward_variables_from in the MIDL template.

TBR=dpranke@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#348664}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7c0c67ed3859656cb869fb517527938f70ed0cc6
2015-09-14 18:39:47 +00:00
brettw d0ebcc4bcf Clean up some GN toolchain args, especially NaCl.
Uses forward_variables_from for the gcc_toolchain and nacl_toolchain templates
when applicable.

Add the ability to clear the sanitizer flags and use this for nacl.

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

Cr-Original-Commit-Position: refs/heads/master@{#348522}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f5d97233985fac498ada3def2c2b3f4e8bbaafd9
2015-09-12 03:04:58 +00:00
thakis 345ac95902 Remove clang type profiler and deep memory profiler.
Looks like it's no longer functional and unused.

BUG=490464
TBR=jochen

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

Cr-Original-Commit-Position: refs/heads/master@{#348392}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5747a19cad8feb463125f3c80376d3c535f25523
2015-09-11 13:51:44 +00:00
pcc 1d304d9444 Port CFI build configuration to GN.
BUG=464797
R=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#348323}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34ab19d59ff4a5bc098d90eb7c4fc76afec568ef
2015-09-11 03:08:53 +00:00
dpranke eab10283ef Enable nacl on 32-bit x86 linux GN builds.
It looks like the only thing missing at this point was to correct
the path to the host build of tls_edit when linking the IRT.

R=brettw@chromium.org, phosek@chromium.org
BUG=512882

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

Cr-Original-Commit-Position: refs/heads/master@{#348302}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a512a524d8541b52c0a0a264215d3499ec1bbb1d
2015-09-11 00:46:48 +00:00
andybons e430bc5e04 [GN] Remove cflags_c from objc and cflags_cc from objcxx toolchains
//build/config/compiler/BUILD.gn has the following lines which make the declarations in the toolchains superfluous:

  # Pass the same C/C++ flags to the objective C/C++ compiler.
  cflags_objc += cflags_c
  cflags_objcc += cflags_cc

R=brettw@chromium.org
BUG=none

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

Cr-Original-Commit-Position: refs/heads/master@{#348197}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bd1aafe5d735405a27266a38a0af38be2d17d0bd
2015-09-10 18:34:45 +00:00
dpranke 5cf45f1207 Fix more aspects of the NaCl build configs.
As part of the un-forking of the NaCl GN build configs, we need
to be a little more careful about which NaCl toolchains are considered
to be "clang" or not and whether some of the clang-specific compiler
settings need to be applied in the NaCl contexts.

Also, remove more stray references to the old Nacl build configs.

R=brettw@chromium.org, mcgrathr@chromium.org, thakis@chromium.org
BUG=433528

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

Cr-Original-Commit-Position: refs/heads/master@{#347262}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b8c6bf7592cf6cb412f2d3f151bc29bd96ee7380
2015-09-03 22:18:39 +00:00
sergeyu 1d78252fe2 GN: Change extension of debug pexe builds from .pexe-debug to .pexe.debug
GYP build generate .pexe.debug. Also the pnacl toolchain in
native_client/toolchain uses .pexe.debug extension.

BUG=512899

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

Cr-Original-Commit-Position: refs/heads/master@{#347172}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f333696a0a014fae2a762cdac48776f3153d9284
2015-09-03 17:21:28 +00:00
dpranke 3d822fcafd Add nacl_toolchain to //build and flip to using it in the GN Build.
With this change, in the Chromium repo NaCl will now be built solely using Chromium's versions of the GN build files, rather than a mixture of chromium and NaCl files.

This will allow us to delete the NaCl versions in a subsequent NaCl-side CL and switch to pulling the chromium versions in via a DEPS entry, and thus "unfork" the build.

R=brettw@chromium.org, ncbray@chromium.org, mcgrathr@chromium.org
BUG=433528

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

Cr-Original-Commit-Position: refs/heads/master@{#346452}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fa6ffe2fb9f488ddb859555f5abc29de72407a62
2015-08-31 20:18:45 +00:00
dpranke dd67724fd2 Modify the gcc_toolchain definitions in GN for NaCl compatibility.
This CL adds a number of optional settings to GN's
gcc_toolchain() template so that NaCl can use it to
define toolchains, most importantly by adding the ability
to customize post-link steps and set the default
output extensions for executables.

R=brettw@chromium.org, ncbray@chromium.org, mcgrathr@chromium.org
BUG=433528

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

Cr-Original-Commit-Position: refs/heads/master@{#346262}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: caf3cee6fd23ffe493fe69ba08d3bd1f7d646334
2015-08-28 23:06:44 +00:00
tsniatowski efc507cafc Fix typo in gn ccache support for linux:x86
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#345355}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0127ddc1c60d51b1925eb8b2a3740147d5d34de5
2015-08-25 16:58:49 +00:00
andybons b2919ba215 Specify -install_name of target within solink.
R=dpranke@chromium.org,thakis@chromium.org,mark@chromium.org
BUG=345410,345021

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

Cr-Original-Commit-Position: refs/heads/master@{#344027}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f6982d816ef5a3bb63c1977bfe24663b07c03648
2015-08-18 21:05:28 +00:00
andybons 2ee65967ad Move rpath ldflags under is_component_build
The shared library flags currently being passed should only be passed in
component builds. The location of dylibs in a non-component build is already
known so it’s superfluous to specify additional search paths via rpath.

-search_paths_first is the default on ld starting with the Xcode4 toolchain.
-L. isn’t needed since the absolute path of the dylib is being specified at link time.

R=mark,dpranke,thakis
BUG=345021

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

Cr-Original-Commit-Position: refs/heads/master@{#343793}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 465929bd9eccfd0de10965867e0378eee4a24dd5
2015-08-18 02:16:07 +00:00
brucedawson 67fc61d948 Reduce DefaultConcurrentLinks from phys/4GB to phys/5GB.
This is copied from the gyp repo, ninja.py:
https://codereview.chromium.org/1255813005

VS 2015 uses about 20% more memory when linking. This caused a
severe page-fault storm on my development machine and subsequent tests
showed that linking could use ~63 GB of RAM (15 parallel links on a
64 GB machine). This suggests that VS 2013 would also be using a lot
of RAM (52.5 GB?) such that very little was left for other
applications or disk cache.

Linker working sets vary wildly but with VS 2013 there are six links
that use over 6 GB of working set and with VS 2015 there are seven.

This change reduces parallel links by 20% (increase RAM-per-linker by
25%). The value can be overridden by setting GYP_LINK_CONCURRENCY.

Tests with VS 2013 showed no statistically significant change in
build times when link concurrency was reduced from 15 to 10 or 12.
Further reductions may be prudent when we switch to VS 2015.

BUG=440500
R=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#342892}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ad86c6fcef0fbdf26da9165ae8bbbd3748201afc
2015-08-11 21:05:54 +00:00
agrieve e8e1d878ba GN: Use lib.unstripped rather than lib.stripped. Add a toolchain.gni
toolchain.gni introduces:
 root_shlib_dir, shlib_prefix, and shlib_extension

The original goal of this change was to put shlibs under lib/ for Linux / Android, since that's where GYP puts them. However, the lack of support for loadable_module (or more specifically - per target output directory) in GN makes this infeasible at the moment.

This change also mitigates a subtle bug where on Android the unstripped .so is used mistakenly instead of the lib.stripped/ version. It also fixes shlib's link_output being set to the unstripped .so rather than the stripped .so (on Android).

BUG=509771

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

Cr-Original-Commit-Position: refs/heads/master@{#342697}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c3cd5e6fe977af4a3c8b20ccb332896b2c888354
2015-08-10 21:18:34 +00:00
brettw 3622460404 Copy only the DLLs for the default toolchain on Windows.
Previuosly this would copy them 4 times, once for each Windows toolchain: 32-bit, 64-bit clang-32-bit and clang-64-bit. This should only actually be needed for the default toolchain.

This speeds up running GN on Windows by ~1/2 second on average.

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

Cr-Original-Commit-Position: refs/heads/master@{#342419}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 874ab4a07af724464c8e8d7375b807b03e6ef68c
2015-08-07 19:58:48 +00:00
petermayo f1cebba614 Add readelf and nm dummy values to cros.
gn gen now requires them, but they have no values immediately
available.

BUG=517493
TEST=None

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

Cr-Original-Commit-Position: refs/heads/master@{#342299}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d9c347b62ded29ffb33cc864dc44fc60a0708539
2015-08-07 05:25:09 +00:00
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 cc36a9de6e Restat shared library link ops in GN on Windows.
The lack of this is causing unnecessary rebuilds when changes in a source file affect the .dll but not the .lib. This restat flag addition matches GYP on Windows and how GN on Posix work.

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

Cr-Original-Commit-Position: refs/heads/master@{#342148}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ded08d3c535fa0c4b0951e99ef9d1ac656f55826
2015-08-06 18:26:55 +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
brettw cac3c5e5da Annotate large GN targets for precompiled headers
Adds the precompiled header config to most large-ish targets in the build, but keeps the config a no-op (so no precompiled headers will be used but this can bw switched with a one-line change).

Removes Windows files from the precompiled header. This does not seem to affect the build speed much because most Chrome files don't depend on Windows any more. And windows.h injects typedefs and defines that conflict with some third party libraries and prevent using precompiled headers for those targets or any target that includes them.

I counted ~50 files or bigger as large. The 50 file threshold is based on some previous approximate measurements (since the precompile step is an extra per-target compile, it can actually make small targets compile slower).

For borderline cases, I added the precompiled header flag if I thought it was likely to have more files added, and didn't add it if I thought the target was likely to be static.

This is a reland of https://codereview.chromium.org/1250273002/ with the config disabled for easier re-landing and iterating
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
TBR=dpranke

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

Cr-Original-Commit-Position: refs/heads/master@{#340728}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bc8b2a244ab981b264a86f5f2a64464089e05e32
2015-07-28 18:25:26 +00:00
dpranke 1de4e8edbc Revert "Add precompiled headers to GN build for large targets."
This reverts commit 8f3218985dde74063ccc362da47803be163f3165.

It looks like this may have broken incremental builds on Win.

TBR=brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Original-Commit-Position: refs/heads/master@{#340620}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7ba63a918a644773af77dc657792d6440e8afbc1
2015-07-28 00:56:41 +00:00
brettw b888f8feb6 Add precompiled headers to GN build for large targets.
Turns on precompiled header support in the GN build on Windows, and adds the precompiled header config to most large-ish targets in the build.

Removes Windows files from the precompiled header. This does not seem to affect the build speed much because most Chrome files don't depend on Windows any more. And windows.h injects typedefs and defines that conflict with some third party libraries and prevent using precompiled headers for those targets or any target that includes them.

I counted ~50 files or bigger as large. The 50 file threshold is based on some previous approximate measurements (since the precompile step is an extra per-target compile, it can actually make small targets compile slower).

For borderline cases, I added the precompiled header flag if I thought it was likely to have more files added, and didn't add it if I thought the target was likely to be static.

CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Original-Commit-Position: refs/heads/master@{#340535}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8f3218985dde74063ccc362da47803be163f3165
2015-07-27 19:46:54 +00:00
brettw d2a40f2c4e Pass corresponding C/C++ flags to ObjC/C++
A GN change for precompiled headers meant that cflags_c aren't passed automaticall to the Objective C compiler, and cflags_cc aren't passed to the Objective C++ compiler.

Copies the c/cc flags over to the objc/objcc variables in the compiler setup.

TBR=dpranke@chromium.org
BUG=511323

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

Cr-Original-Commit-Position: refs/heads/master@{#339348}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 839f4802a610edc83e5c6bd9c178208b3715324c
2015-07-17 22:51:51 +00:00
agrieve 4186705ae6 GN (android): Append ".cr" to component .so's to avoid zygote lib collisions
With this, ChromePublic now launches with is_component_build = true

BUG=500882

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

Cr-Original-Commit-Position: refs/heads/master@{#338612}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a2daf08ffddf4549160f3925383b457a2eb03c7f
2015-07-14 01:31:15 +00:00
Daniel Cheng 309352c95e Enable -Wextra-tokens on win clang.
This warns on code of the form:
#endif RANDOM_TEXT
MIDL generated code tends to emit code in this pattern, so suppress
this warning when compiling MIDL generated files.

BUG=504663
R=thakis@chromium.org
TBR=dtseng, robertshield, weitaosu

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

Cr-Original-Commit-Position: refs/heads/master@{#338435}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be8d6f52672bf61324b2ac988ef7776ade9d1628
2015-07-11 05:18:17 +00:00
agrieve 8e5bed2a3a Remove explicit "mkdir -p" from Android postlink command
Ninja takes care of creating output directories already

BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#338421}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6903b3b6502fa8d70d805fbb503ebc5dc182bbca
2015-07-11 01:37:44 +00:00
brettw dd1df9c7d8 Move GN obj files to target-specific dirs
Previously GN would put object files in a similar place to GYP. They would go in a corresponding directory as the source file and would be prefixed with the target name for uniqueness.

Since GN target names are not unique, this doesn't work as well. Instead use a simpler scheme and put all the object files in a directory for each target.

This causes a few object file name collisions which this patch fixes in various ways:

- Renamed chrome/browser/ui/views/find_bar_host_interactive_uitest.cc to have "views" in the name (collided with chrome/browser/ui/find_bar/find_bar_host_interactive_uitest.cc)

- Renamed chrome/browser/apps/speech_recognition_browsertest.cc to have "app" in the name (collided with chrome/browser/speech/speech_recognition_browsertest.cc).

- Renamed chrome/common/extensions/api/extension_api_unittest.cc to have "common" in the name (collided with chrome/browser/extensions/extension_api_unittest.cc which is actually a test harness with that name).

- Moved the extensions files that were in the chrome interactive UI tests and browser tests to source sets in the extensions directory. These are things that should be cleaned up and moved there anyway.

- Net has some messy duplication in quic files. I made a dummy target for them. Apparently each copy of this file (same code, different namespace) is supposed to match something different upstream and this should be fixed.

- Moved chrome/browser/chromeos unit tests to its own target.

- Renamed chrome/browser/favicon/favicon_helper to favicon_utils. It conflicted with chrome/browser/android/favicon_helper which has an actual class named "FaviconHelper.

- Renamed service.* and service_factory.* in chrome/browser/chromeos/launcher_search_provider to have a launcher_search_provider prefix to avoid collisions with the file_system_provider one.

- Added a "chromeos" prefix to chrome/browser/chromeos/first_run/first_run_browsertest.cc to avoid collisions with the one in browser/first_run.

- Added "chromeos" to chrome/browser/chromeos/preferences_browsertest.cc to avoid collision with browser/ui/webui/options.

- Rename "chrome/browser/chromeos/drive/test_util.*" to "drive_test_util.*". Update includes. Rename chrome/browser/chromeos/file_manager/drive_test_util* to mount_test_util to avoid colliding with above new file.

The deps->public_deps changes in components/policy and content/test is because those targets were used externally in a way that this patch uncovered.

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

Cr-Original-Commit-Position: refs/heads/master@{#338408}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 39355da5ab86e662d701fcba8fef4e20921b38f0
2015-07-11 00:21:39 +00:00
brettw 0bc79121a0 Windows precompiled header support in GN.
Introduces aprecompiled_header_type flag on a tool to say whether it supports precompiled headers, and flags on configs/targets that allow one to specify which header is precompiled.

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

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

BUG=297678

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

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

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

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

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

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

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

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

BUG=486809

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUG=459435

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

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

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

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

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

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

BUG=none

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

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

BUG=none

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

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

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

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

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

R=brettw@chromium.org
BUG=

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

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

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

then

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

worked OK.

Further patches welcome to make this less ugly.

R=dpranke@chromium.org

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

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

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

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

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

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

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

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

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

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

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

1. Turning

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

into:

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

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

2. Turning single line

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

into

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

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

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

R=brettw@chromium.org
BUG=348474

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

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

BUG=394501

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

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

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

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

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

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

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

Cr-Original-Commit-Position: refs/heads/master@{#304864}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9bf8fb3b74de68a85122cb45bb477d604b8c3898
2014-11-19 19:33:52 +00:00
dpranke 7265358749 Rework win_toolchains a bit and copy the vs runtime DLLs as needed.
In order to run both the visual studio tools and the binaries built
by them (and ninja), we need to ensure that the VS runtime DLLs
are available in the path.

In the GYP build, we accomplish this by copying them into the
Debug and Debug_x64 dirs as appropriate inside the gyp_chromium
script.

In the pure-GN build, then, things would be broken, so we need to
modify the GN build to do the copy as well, or we need to inject
a step somewhere that happens after GN runs but before Ninja tries
to run (since none of the toolchain binaries will work).

This patch accomplishes this by calling out to vs_toolchain.py to
copy the DLLs as neede when the toolchain is defined. This is somewhat
less than ideal (makes 'gn gen' slower) but seems better than forcing
devs to have to run an additional command.

In addition, the GYP build writes targets into Debug and Debug_x64
concurrently. This doesn't really carry over into GN correctly, and
we probably only ever want to write targets into Debug and Debug/64
(or some such).

However, the way the toolchains are currently implemented, it's not
clear if this really works and the interplay between 32-bit and 64-bit
is weird (we apparently normally "force" 32-bit even if we set cpu_arch
to 64-bit, and require you to specify force_win64). To work around this
and make sure that we copy the right DLLs for the right arch into the
outer Debug/ directory, this patch temporarily disables the cross-arch
part of the build, forcing the host_toolchain to match the target_toolchain.

This likely means that 'cpu_arch="x86"' works (the default), but the 'host'
binaries like image_diff and mksnapshot will be compiled in 32-bit mode,
not 64-bit mode. 'cpu_arch="x64" force_win64=true' should also work, and
produce all-64-bit binaries. 'cpu_arch="x64"' does not work at all and
won't until we can clean up the above stuff.

R=scottmg@chromium.org, brettw@chromium.org
BUG=430661

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

Cr-Original-Commit-Position: refs/heads/master@{#304310}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0b95195e49489b7a4d87048d2ce4b747173a5b8a
2014-11-15 00:10:27 +00:00
ckocagil 647f7a9ef1 gn: Fix more build issues on Win
BUG=354261
R=brettw
TBR=piman,wtc
NOTRY=true

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

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

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

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

Cr-Original-Commit-Position: refs/heads/master@{#296849}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2c8e745d9c4de27b44f4d866a2bf0f0a880d9b8c
2014-09-26 01:28:15 +00:00
Cem Kocagil 9b0f035203 gn: Fix build issues blocking gfx from being built
BUG=354261
R=brettw@chromium.org, brettw

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

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

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

Cr-Original-Commit-Position: refs/heads/master@{#295283}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 39017e1de19051c3a3519c28ca980021ae098ee4
2014-09-17 16:04:03 +00:00
cjhopman dd11b15b83 Make base_unittests_apk actually work
This changes the "test" template to create a shared_library (instead of
an executable) on Android. After this, we can actually run
base_unittests with
`build/android/test_runner.py gtest -s base_unnittests`
as normal (though may need to CHROMIUM_OUT_DIR and BUILDTYPE as
appropriate).

This requires adding the following targets:

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

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

BUG=359249
TBR=rlarocque

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

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

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

Cr-Original-Commit-Position: refs/heads/master@{#294007}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 937a6d51df85cd7e338b952aeacb03bf7e5726c2
2014-09-09 21:00:57 +00:00
cjhopman 0f1865d588 Add content_shell_test_apk and several dependencies
This adds support for android_apk targets without any java included
directly in the target (only included through deps).

This adds the following targets:

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

BUG=359249

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

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

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

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

TBR=scottmg

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

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

BUG=405686
R=jamesr@chromium.org

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

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

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

R=jamesr@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@290894 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-20 19:39:43 +00:00
thakis@chromium.org b37fe3f31e Remove unused gn tool script.
No intended behavior change.

BUG=
NOTRY=true

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

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

R=bbudge@chromium.org, bbudge

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287873 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 22:11:59 +00:00
jamesr@chromium.org 9408b7c44f GN: Use rsp file, not rsp file contents, in solink line
Passing $rspfile_content passes the content of the rsp file verbatim
to the command line, which kind of defeats the purpose of using rsp files.
@\$rspfile tells the linker to open up the file itself.

BUG=398255

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286675 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-31 01:33:30 +00:00
scottmg@chromium.org b5e29cbe27 gn win: Add system include directories to midl template
Otherwise, midl.exe will fail to find standard .idls, e.g.:

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

R=brettw@chromium.org
BUG=354261

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

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

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

BUG=359249

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

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

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

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

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

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

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

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@284137 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-18 17:24:30 +00:00
dpranke@chromium.org b1fcc693ac Make goma work for the GN build on linux.
This drops the old gyp-compatible settings and wires up the
Linux and Android toolchains to be goma-aware. Mac and Win can
follow in subsequent CLs.

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

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@283971 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-18 01:51:08 +00:00