Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index 591e75cda6fe3a9d3d164e9564dc664a1f83e904..3556d7ea5f829402bf447763497fb69595bbc2be 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -110,6 +110,11 @@ |
| # Sets whether chrome is built for google tv device. |
| 'google_tv%': 0, |
| + # goma settings. |
| + # 1 to use goma if user specified gomadir. |
| + # 0 not to use goma even if user specified gomadir. |
| + 'use_goma%': 1, |
| + |
| 'conditions': [ |
| # Set default value of toolkit_views based on OS. |
| ['OS=="win" or chromeos==1 or use_aura==1', { |
| @@ -154,6 +159,17 @@ |
| }, { |
| 'use_default_render_theme%': 0, |
| }], |
| + |
| + # goma settings |
| + # TODO(ukai): download goma in default dir |
| + # by gclient hooks (as clang prebuilt binary). |
| + ['OS=="android"', { |
| + # On android, ANDROID_GOMA_WRAPPER might be gomacc path |
| + # see build/android/envsetup.sh |
| + 'gomadir%': '<!(dirname ${ANDROID_GOMA_WRAPPER})', |
| + },{ |
| + 'gomadir%': '', |
| + }], |
| ], |
| }, |
| @@ -171,6 +187,8 @@ |
| 'enable_touch_ui%': '<(enable_touch_ui)', |
| 'android_build_type%': '<(android_build_type)', |
| 'google_tv%': '<(google_tv)', |
| + 'use_goma%': '<(use_goma)', |
| + 'gomadir%': '<(gomadir)', |
| 'enable_app_list%': '<(enable_app_list)', |
| 'enable_message_center%': '<(enable_message_center)', |
| 'use_default_render_theme%': '<(use_default_render_theme)', |
| @@ -632,6 +650,21 @@ |
| ['target_arch=="mipsel"', { |
| 'sysroot': '<!(cd <(DEPTH) && pwd -P)/native_client/toolchain/linux_mips-trusted/sysroot', |
| }], |
| + |
| + ['use_goma==1 and gomadir!=""', { |
| + # Start goma and check whether it is available or not. |
| + 'conditions': [ |
| + ['OS!="win"', { |
| + 'goma_status': |
| + '<!(<(gomadir)/goma_ctl.sh ensure_start >/dev/null 2>&1 && echo ok)' |
| + }, { |
| + 'goma_status': |
| + '<!(python <(gomadir)/goma_ctl.py ensure_start >/dev/null 2>/dev/null && echo ok)' |
|
iannucci
2013/03/08 04:04:09
It's really too bad we can't just use goma_ctl for
ukai
2013/03/08 06:52:05
Oh, fixed to use NUL.
|
| + }], |
| + ] |
| + },{ |
| + 'goma_status': '', |
| + }], |
| ], |
| # Set this to 1 to use the Google-internal file containing |
| @@ -763,6 +796,9 @@ |
| 'enable_managed_users%': '<(enable_managed_users)', |
| 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', |
| 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
| + 'use_goma%': '<(use_goma)', |
| + 'gomadir%': '<(gomadir)', |
| + 'goma_status%': '<(goma_status)', |
| # Use system ffmpeg instead of bundled one. |
| 'use_system_ffmpeg%': 0, |
| @@ -1021,6 +1057,17 @@ |
| 'enable_rlz%': 0, |
| 'conditions': [ |
| + ['goma_status=="ok" and OS=="win"', { |
| + # goma doesn't support pch yet. |
| + 'chromium_win_pch': 0, |
| + # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. |
| + 'conditions': [ |
| + ['win_z7==0', { |
| + 'fastbuild': 1, |
|
iannucci
2013/03/08 04:04:09
At first I didn't like this, but now that I think
|
| + }], |
| + ], |
| + }], |
| + |
| ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', { |
| 'windows_sdk_path%': '<(windows_sdk_default_path)', |
| }, { |
| @@ -4030,39 +4077,25 @@ |
| }, |
| }], |
| ['clang==1', { |
| - 'conditions': [ |
| - ['OS=="android"', { |
| - # Android could use the goma with clang. |
| - 'make_global_settings': [ |
| - ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'], |
| - ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], |
| - ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], |
| - ['CC.host', '$(CC)'], |
| - ['CXX.host', '$(CXX)'], |
| - ['LINK.host', '$(LINK)'], |
| - ], |
| - }, { |
| - 'make_global_settings': [ |
| - ['CC', '<(make_clang_dir)/bin/clang'], |
| - ['CXX', '<(make_clang_dir)/bin/clang++'], |
| - ['LINK', '$(CXX)'], |
| - ['CC.host', '$(CC)'], |
| - ['CXX.host', '$(CXX)'], |
| - ['LINK.host', '$(LINK)'], |
| - ], |
| - }], |
| + 'make_global_settings': [ |
| + ['CC', '<(make_clang_dir)/bin/clang'], |
| + ['CXX', '<(make_clang_dir)/bin/clang++'], |
| + ['LINK', '$(CXX)'], |
| + ['CC.host', '$(CC)'], |
| + ['CXX.host', '$(CXX)'], |
| + ['LINK.host', '$(LINK)'], |
| ], |
| }], |
| ['OS=="android" and clang==0', { |
| # Hardcode the compiler names in the Makefile so that |
| # it won't depend on the environment at make time. |
| 'make_global_settings': [ |
| - ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], |
| - ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'], |
| - ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], |
| - ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'], |
| - ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
| - ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
| + ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| + ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
| + ['LINK', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| + ['CC.host', '<!(which gcc)'], |
| + ['CXX.host', '<!(which g++)'], |
| + ['LINK.host', '<!(which g++)'], |
| ], |
| }], |
| ['target_arch=="mipsel"', { |
| @@ -4075,6 +4108,21 @@ |
| ['LINK.host', '<!(which g++)'], |
| ], |
| }], |
| + |
| + # TODO(ukai): supports GENERATOR==make |
| + # make generator doesn't support CC_wrapper without CC |
| + # in make_global_settings yet. |
|
iannucci
2013/03/08 04:04:09
AFAIK, nothing uses goma with Make currently, and
ukai
2013/03/08 06:52:05
Oh, really?
Linux Builder x64, for instance, uses
iannucci
2013/03/08 06:54:10
You're completely right, I'm not sure what I was t
|
| + ['goma_status=="ok" and ("<(GENERATOR)"=="ninja" or clang==1 or OS=="android")', { |
| + 'make_global_settings': [ |
| + ['CC_wrapper', '<(gomadir)/gomacc'], |
| + ['CXX_wrapper', '<(gomadir)/gomacc'], |
| + ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| + ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| + # TODO(ukai): link support |
| + # ['LINK_wrapper', '<(gomadir)/gomacc'], |
| + # ['LINK.host_wrapper', '<(gomadir)/gomacc'] |
| + ], |
| + }], |
| ], |
| 'xcode_settings': { |
| # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |