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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
+ 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
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
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
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
+ 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
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
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
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
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
+ 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
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
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
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
//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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.orgTBR=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
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
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
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
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
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
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
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.orgTBR=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
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
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
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
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
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
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
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
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
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
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
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
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