Linux Chromium build uses headers and libraries in debian sysroot
instead of system's to provide hermetic build environment.
To compile simple chrome with Goma, builidng like this improve
cache hit ratio because we can expect compile happens in hermetic way.
Bug: 1003264
Change-Id: If7c5f80b5d732635f0b178efca0b9d4ca4a5c9e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846427
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703625}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 287391a16d3de28d1ca7758ec92cb2475c865d1e
This is a reland of be7c12590cbdbcf40ce36fcc3996ad9e3982100d
chromeos's simple chrome and build_package set additional flags in cc/cxx.
This CL checks that before relativize compiler path.
Original change's description:
> Relativize cros compiler path
>
> Combined with https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1180801
> this patch removes absolute path from command line for simple chrome build.
>
> This is a part of effort for build cache sharing when using goma by
> removing absolute path from compile result.
>
> Bug: chromium:846610
> Change-Id: Ia40a7194b4e485f26424f27ebfc210355e352cc0
> Reviewed-on: https://chromium-review.googlesource.com/1180826
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#584648}
Bug: chromium:846610
Change-Id: I142f6b466be0147252b419abca8abd87cb099ee1
Reviewed-on: https://chromium-review.googlesource.com/1183121
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1fa6069561057a05c66dc1a7e5b3c5a4beb519c6
Combined with https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1180801
this patch removes absolute path from command line for simple chrome build.
This is a part of effort for build cache sharing when using goma by
removing absolute path from compile result.
Bug: chromium:846610
Change-Id: Ia40a7194b4e485f26424f27ebfc210355e352cc0
Reviewed-on: https://chromium-review.googlesource.com/1180826
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584648}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be7c12590cbdbcf40ce36fcc3996ad9e3982100d
toolchain_args is changing from a function call to a scope that can be passed around. Pipe these args through the various toolchain templates. This adds complexity in some cases, but it eliminates the need for the toolchain templates to know about every build flag they might ever be called with.
BUG=634446
Review-Url: https://codereview.chromium.org/2219953002
Cr-Original-Commit-Position: refs/heads/master@{#410853}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3c38c5cdab9e6fc35852ae79be5351be2bd6d49e
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
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
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
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
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
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
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