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

18 Коммитов

Автор SHA1 Сообщение Дата
Yoshisato Yanagisawa cb0a8b9df6 use_sysroot when possible.
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
2019-10-08 08:35:15 +00:00
Takuto Ikuta 674f1ecc7f Reland "Relativize cros compiler path"
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
2018-08-22 04:11:11 +00:00
Yoshifumi Inoue a853806eb3 Revert "Relativize cros compiler path"
This reverts commit be7c12590cbdbcf40ce36fcc3996ad9e3982100d.

Reason for revert: Can't find gold.
/bin/sh: 1: ../../build/toolchain/cros/build/cros_cache/chrome-sdk/tarballs/daisy+10974.0.0+target_toolchain/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.27.0-gold: not found






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}

TBR=vapier@chromium.org,dpranke@chromium.org,tikuta@chromium.org,manojgupta@chromium.org

Change-Id: I93891636a39e5b72f019f262c297c4f07239d0e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:846610
Reviewed-on: https://chromium-review.googlesource.com/1182882
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#584649}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 347fb734c75d4e79e37eacfc43500acde1aa7584
2018-08-21 04:24:52 +00:00
Takuto Ikuta 3ab629996d 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-Original-Commit-Position: refs/heads/master@{#584648}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be7c12590cbdbcf40ce36fcc3996ad9e3982100d
2018-08-21 04:09:31 +00:00
dpranke 752e3104d6 Add a way for CrOS toolchains to set custom flags for the nacl bootstrap.
R=llozano@chromium.org, bradnelson@chromium.org
BUG=629593

Review-Url: https://codereview.chromium.org/2188633004
Cr-Original-Commit-Position: refs/heads/master@{#411350}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2ffe82493c719eb280aa895608f16ae80898ad68
2016-08-11 16:30:33 +00:00
dpranke f0d063fa06 Fix v8_current_cpu setting for CrOS builds after r410853.
In r410853 we changed how the GN toolchains move arguments around,
but we missed one reference to the v8_toolchain_cpu in the CrOS
toolchain definitions. This CL fixes that.

TBR=brettw@chromium.org, stevenjb@chromium.org
BUG=634446

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

BUG=634446

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

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

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

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

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

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

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

Review-Url: https://codereview.chromium.org/2083063003
Cr-Original-Commit-Position: refs/heads/master@{#401532}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 44febce5c4911c03a7975273235fce6e9cacd16d
2016-06-23 03:38:43 +00:00
dpranke 400b785b94 Add cros_{target,host,v8_snapshot}_{nm,readelf} vars to GN build.
So that the CrOS ebuild builds can customize paths to nm and readelf
as needed.

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

Review-Url: https://codereview.chromium.org/2003193002
Cr-Original-Commit-Position: refs/heads/master@{#395505}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5d3de89f668f8e8923a8baa70e1e2b31b5a72fd0
2016-05-24 01:34:47 +00:00
dpranke 5cb2ea1147 Rework the way ChromiumOS toolchains will work in GN.
This CL reworks the way ChromiumOS toolchains work in GN, in such a way
that they might actually have all the flags they need for the
ChromiumOS ebuild files to be able to set all of the flags it needs
(though there are still some missing GN build_args).

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

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

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

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

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

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

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

Review-Url: https://codereview.chromium.org/1983613002
Cr-Original-Commit-Position: refs/heads/master@{#394534}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8ad2f49335feaddddbd3f318fc6f4d13eb52760b
2016-05-18 20:34:27 +00:00
dongseong.hwang f057bd6335 Add option cc_wrapper to GN
For example:
cc_wrapper="ccache"
cc_wrapper="icecc"
cc_wrapper="distcc"
cc_wrapper="ccache distcc"

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

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

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

Cr-Original-Commit-Position: refs/heads/master@{#377251}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e279af1c9c511972000049b2c4d261161b48075d
2016-02-24 09:29:19 +00:00
rjkroege 379012815d build CrOS chrome with gn
Augment the CrOS gn build to successfully build CrOS Chrome with gn.

BUG=558623

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

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

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

BUG=

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

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

BUG=490464
TBR=jochen

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

Cr-Original-Commit-Position: refs/heads/master@{#348392}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5747a19cad8feb463125f3c80376d3c535f25523
2015-09-11 13:51:44 +00:00
dpranke ef1bc954a4 Roll GN binaries to #317120 for the cpu_arch changes
The newest version of GN replaces the 'cpu_arch' and 'os' variables with 'current_cpu', 'target_cpu', 'current_os', and 'target_os', and also replaces 'build_cpu' with 'host_cpu', and 'build_os' with 'host_os'.

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

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

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

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

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

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

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

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

Cr-Original-Commit-Position: refs/heads/master@{#296849}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2c8e745d9c4de27b44f4d866a2bf0f0a880d9b8c
2014-09-26 01:28:15 +00:00