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

100 Коммитов

Автор SHA1 Сообщение Дата
shinyak cbdc39da96 Don't invoke goma for linking on mac
Currently, linking with goma causes goma 'local fallback', and goma
allows at most 1 link in parallel (without special flag).

In 520f95147c821e13003362194a5de003a9f5c8f9, linking with goma is
enabled (maybe accidentally). It's better not to use goma for
linking now.

Review-Url: https://codereview.chromium.org/2667383002
Cr-Original-Commit-Position: refs/heads/master@{#447858}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c398506e3abc0799330e39144194d70c00e4032e
2017-02-02 22:21:23 +00:00
kmarshall 897d55366c Add GN assert to prevent GOMA from being used with static analyzer.
This prevents users from accidentally combining the two flags and
hosing their systems with excessive local compile tasks.

R=thakis@chromium.org
BUG=687243

Review-Url: https://codereview.chromium.org/2664063004
Cr-Original-Commit-Position: refs/heads/master@{#447314}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 40df344eeb73fa17e450750ef72d373c004f9f62
2017-01-31 20:30:36 +00:00
kmarshall e381bc2fc0 Add Clang static analyzer support to Clang toolchain defs in GN.
If "use_clang_static_analyzer" is enabled in args.gn, Clang builds will redirect compilation to use Clang's ccc-analyzer and cxx-analyzer for static analysis.

Review-Url: https://codereview.chromium.org/2617283002
Cr-Original-Commit-Position: refs/heads/master@{#445854}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 520f95147c821e13003362194a5de003a9f5c8f9
2017-01-24 23:25:01 +00:00
sdefresne 76573f292e GN: avoid going through compiler wrapper for "link" tool for macOS/iOS.
Stop going through goma (or other compiler wrapper) for the "link"
tool when building for macOS/iOS (to follow gcc_compiler.gni).

BUG=None

Review-Url: https://codereview.chromium.org/2613503002
Cr-Original-Commit-Position: refs/heads/master@{#442245}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5adef79d6f465dddc30e88db148c5b69c7059448
2017-01-09 13:42:56 +00:00
jochen ce0b3e0041 Add mac clang toolchains required for V8 cross compiling
BUG=none
R=machenbach@chromium.org,dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2607323002
Cr-Original-Commit-Position: refs/heads/master@{#441337}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4596f9dac41a269f19eb8bc999a67d6b552a15bb
2017-01-04 08:02:25 +00:00
justincohen ba30870b6a Support hermetic Xcode compilation with use_xcode_clang.
iOS builds can set use_xcode_clang = true and use_system_xcode = false when
chromium clang is broken.  This requires prepending DEVELOPER_DIR to clang/clang++, etc

BUG=669094

Review-Url: https://codereview.chromium.org/2578273002
Cr-Original-Commit-Position: refs/heads/master@{#439028}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c360dbf9da64cbf1c6b2d63e87aab8eda61dd424
2016-12-16 04:58:20 +00:00
justincohen 90b6677250 Correct iOS GN hermetic support.
BUG=

Review-Url: https://codereview.chromium.org/2452593004
Cr-Original-Commit-Position: refs/heads/master@{#428373}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e3f7eea5174f118c4baf5562b157cdee651a9426
2016-10-28 15:10:02 +00:00
erikchen 2b99cbd1e4 Add a variable use_system_xcode to GN.
Start plumbing it through to actions that require binaries from the Xcode
toolchain.

BUG=651267
TBR=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2388063003
Cr-Original-Commit-Position: refs/heads/master@{#423673}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b58a723ab22333fe40575f6992c3cb8c7dde0b0a
2016-10-06 21:02:17 +00:00
yyanagisawa e8c7e52d25 fix pylint warning: build/toolchain/mac/linker_driver.py
W:134, 3: Unused variable 'head' (unused-variable)
W:159, 3: Unused variable 'head' (unused-variable)

Review-Url: https://codereview.chromium.org/2396723003
Cr-Original-Commit-Position: refs/heads/master@{#423410}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f636eadf2f2096579005f581cc87963429cf4444
2016-10-06 02:56:15 +00:00
sdefresne 45574dce74 Pass the bundle product_type to the actool invocation.
With Xcode 8, the invocation of actool need to contain the type of
the bundle containing the asset catalog, pass the information from
the create_bundle target to the actool command.

BUG=634373

Review-Url: https://codereview.chromium.org/2236973004
Cr-Original-Commit-Position: refs/heads/master@{#411865}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bf8b26608b67a274cf7b5ca99446043e9e197394
2016-08-13 02:50:15 +00:00
brettw d4b649434b Clean up GN template code.
This cleans up some variable definitions around templates not marking variables used.

The chromevox directory worked around the bug by putting the variables to share
in a .gni file. This file can now be deleted and the contents merged with the
BUILD file (the only place it was included).

The iOS code referencing this bug seems to be mistaken, at least in some of the
cases. The conditions in that file do not trigger the variable used bug. The
build seems to work without this code, so I removed it.

BUG=395883
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2237233002
Cr-Original-Commit-Position: refs/heads/master@{#411738}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 84f93c430207e806a6a3746d4163990391c1fbc1
2016-08-12 19:46:15 +00:00
brettw 56e8f75dbe Remove GN forwarding of the target variables.
The Posix toolchain definitions forwarded the target_cpu and target_os to all secondary toolchains. But the computation of these values should be invariant of the toolchain. This removes the forwarding.

Review-Url: https://codereview.chromium.org/2229063002
Cr-Original-Commit-Position: refs/heads/master@{#410883}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ec467a46f0e8760fae1928e4040d053caae843df
2016-08-10 00:03:42 +00:00
brettw 441e520c3f Use new toolchain_args variable in GN.
toolchain_args is changing from a function call to a scope that can be passed around. Pipe these args through the various toolchain templates. This adds complexity in some cases, but it eliminates the need for the toolchain templates to know about every build flag they might ever be called with.

BUG=634446

Review-Url: https://codereview.chromium.org/2219953002
Cr-Original-Commit-Position: refs/heads/master@{#410853}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3c38c5cdab9e6fc35852ae79be5351be2bd6d49e
2016-08-09 22:23:24 +00:00
sdefresne 84e23b51eb Make compile_xcassets.py less verbose.
Parse output of actool and discard uninteresting messages and
fail on unexpected warning messages (as actool termines with
a success error code even if some resources are missing).

BUG=635306

Review-Url: https://codereview.chromium.org/2224763002
Cr-Original-Commit-Position: refs/heads/master@{#410824}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5b150b0a5a28f95f651767f901819390fc065676
2016-08-09 21:24:21 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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