|
|
Created:
4 years, 10 months ago by dshwang Modified:
4 years, 10 months ago Reviewers:
Dirk Pranke, Nico, mkollaro, brettw CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd 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.
Committed: https://crrev.com/e279af1c9c511972000049b2c4d261161b48075d
Cr-Commit-Position: refs/heads/master@{#377251}
Patch Set 1 #Patch Set 2 : add faster_build option #Patch Set 3 : rename to cc_wrapper #
Created: 4 years, 10 months ago
Messages
Total messages: 31 (13 generated)
Description was changed from ========== [checkbuild] Add option android_toolchain to GN Same as the GYP flag with the same name. Useful for e.g. compiling with Icecc. BUG=None ========== to ========== Add option android_toolchain to GN Same as the GYP flag with the same name. Useful for e.g. compiling with Icecc. BUG=None ==========
dongseong.hwang@intel.com changed reviewers: + dpranke@chromium.org, martina.kollarova@intel.com, thakis@chromium.org
Nico, Dirk, could you review? it's follow-up of https://codereview.chromium.org/1610093003/ This CL enable icecc to compile Android chromium with GN. It's my gn gen for icecc. gn gen out_android/Release "--args=is_debug=false target_os="android" is_component_build=true use_debug_fission=false linux_use_bundled_binutils=false clang_use_chrome_plugins=false clang_dir="<icecc camouflage dir>" android_toolchain="<icecc camouflage dir>""
Using icecc doesn't seem android-specific. For other compiler accelerators (goma, distcc, ccache), we set things up in //build/toolchain/gcc_toolchain.gni ; can we do the same thing for icecc ?
On 2016/02/04 22:11:15, Dirk Pranke wrote: > Using icecc doesn't seem android-specific. > > For other compiler accelerators (goma, distcc, ccache), we set things up in > //build/toolchain/gcc_toolchain.gni ; > can we do the same thing for icecc ? //build/toolchain/gcc_toolchain.gni is sufficient to build desktop chromium however android needs cross-compile. build/toolchain/android/BUILD.gn takes care of target compile, so this change is needed to support distcc and icecc. I don't understand how goma can compile without this change.
On 2016/02/04 22:36:36, dshwang wrote: > On 2016/02/04 22:11:15, Dirk Pranke wrote: > > Using icecc doesn't seem android-specific. > > > > For other compiler accelerators (goma, distcc, ccache), we set things up in > > //build/toolchain/gcc_toolchain.gni ; > > can we do the same thing for icecc ? > > //build/toolchain/gcc_toolchain.gni is sufficient to build desktop chromium > however android needs cross-compile. > build/toolchain/android/BUILD.gn takes care of target compile, so this change is > needed to support distcc and icecc. > I don't understand how goma can compile without this change. the toolchains are defined using android_gcc_toolchain_helper(), which is a template that wraps the gcc_toolchain() definition, so it'll pick up the settings from gcc_toolchain.gni. So that's how goma works today, even for cross-compiles on android.
Description was changed from ========== Add option android_toolchain to GN Same as the GYP flag with the same name. Useful for e.g. compiling with Icecc. BUG=None ========== to ========== Add option faster_build to GN For example: faster_build="ccache" faster_build="icecc" faster_build="distcc" faster_build="ccache distcc" In addition, it deprecates use_ccache and clang_dir. ==========
On 2016/02/04 23:55:32, Dirk Pranke wrote: > the toolchains are defined using android_gcc_toolchain_helper(), which is a > template > that wraps the gcc_toolchain() definition, so it'll pick up the settings from > gcc_toolchain.gni. > > So that's how goma works today, even for cross-compiles on android. Thank you for explaining. There are two ways to use goma as well as icecc and ccache 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 goma uses #1 way and I've used #2 way. As goma uses #1, it's much better for external contributors to use #1. |use_ccache| already exists in #1 way. I extend |use_ccache| to |faster_build| to support any build system flexibly. The new CL description shows how to use it. icecc user will generate gn as follow: > gn gen out_gn/Release '--args=is_debug=false faster_build="icecc"' In addition, https://codereview.chromium.org/1610093003/ added |make_clang_dir| to support icecc in the #2 way. As this CL introduces more general way, this CL deprecates |make_clang_dir|.
dpranke@chromium.org changed reviewers: + brettw@chromium.org
I think this approach generally looks good, but we might want to work on the name: "faster_build" is quite generic and doesn't really describe what is going on. However, I'm not sure I have a better name at the moment. "compiler_accelerator" seems too long :). If you're not in a hurry for this, I'd also like to get Brett's thoughts on the name and the move away from use_ccache et al., but I think he's off this week.
Maybe cc_wrapper? (also it'd be nice if goma used the same machinery as it's morally doing a similar thing)
On 2016/02/09 03:06:52, Nico wrote: > Maybe cc_wrapper? (also it'd be nice if goma used the same machinery as it's > morally doing a similar thing) cc_wrapper seems pretty good (or cc_prefix?). I agree that we might want to convert goma to the same mechanism, but there'll be a lot of legacy stuff to update if we get rid of use_goma=true .
Description was changed from ========== Add option faster_build to GN For example: faster_build="ccache" faster_build="icecc" faster_build="distcc" faster_build="ccache distcc" In addition, it deprecates use_ccache and clang_dir. ========== to ========== 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. ==========
On 2016/02/09 03:08:42, Dirk Pranke wrote: > On 2016/02/09 03:06:52, Nico wrote: > > Maybe cc_wrapper? (also it'd be nice if goma used the same machinery as it's > > morally doing a similar thing) > > cc_wrapper seems pretty good (or cc_prefix?). I agree that we might want to > convert > goma to the same mechanism, but there'll be a lot of legacy stuff to update if > we get > rid of use_goma=true . Good idea! I buy cc_wrapper. cc_prefix is also good but someone might understand it as something like arm-linux-androideabi- Could you review again?
lgtm. If it's okay with you I'd still like to wait for brettw@ to take a look, though.
On 2016/02/09 23:38:06, Dirk Pranke wrote: > lgtm. If it's okay with you I'd still like to wait for brettw@ to take a look, > though. Thank you for reviewing. I can wait for brettw@'s review. brettw@, could you take a review?
On 2016/02/10 09:14:42, dshwang wrote: > On 2016/02/09 23:38:06, Dirk Pranke wrote: > > lgtm. If it's okay with you I'd still like to wait for brettw@ to take a look, > > though. > > Thank you for reviewing. I can wait for brettw@'s review. > brettw@, could you take a review? brettw@, PTAL
On 2016/02/16 18:49:13, dshwang wrote: > On 2016/02/10 09:14:42, dshwang wrote: > > On 2016/02/09 23:38:06, Dirk Pranke wrote: > > > lgtm. If it's okay with you I'd still like to wait for brettw@ to take a > look, > > > though. > > > > Thank you for reviewing. I can wait for brettw@'s review. > > brettw@, could you take a review? > > brettw@, PTAL Dirk, brettw might be busy. How about landing it?
LGTM, it would be helpful to explain in the commit message more about the clang_dir removal and why we can do this now.
Description was changed from ========== 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. ========== to ========== 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. ==========
On 2016/02/23 21:20:00, brettw wrote: > LGTM, it would be helpful to explain in the commit message more about the > clang_dir removal and why we can do this now. Thank you for reviewing. Done.
The CQ bit was checked by dongseong.hwang@intel.com
The CQ bit was unchecked by dongseong.hwang@intel.com
The CQ bit was checked by dongseong.hwang@intel.com
The CQ bit was unchecked by dongseong.hwang@intel.com
The CQ bit was checked by dongseong.hwang@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1660053005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1660053005/40001
Message was sent while issue was closed.
Description was changed from ========== 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. ========== to ========== 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. ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== 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. ========== to ========== 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. Committed: https://crrev.com/e279af1c9c511972000049b2c4d261161b48075d Cr-Commit-Position: refs/heads/master@{#377251} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/e279af1c9c511972000049b2c4d261161b48075d Cr-Commit-Position: refs/heads/master@{#377251} |