Chromium Code Reviews| Index: build/common.gypi |
| =================================================================== |
| --- build/common.gypi (revision 238489) |
| +++ build/common.gypi (working copy) |
| @@ -107,6 +107,12 @@ |
| ['embedded==1', { |
| 'use_ozone%': 1, |
| }], |
| + |
| + ['OS=="android"', { |
| + 'android_goma_dir%': '<!(dirname "${ANDROID_GOMA_WRAPPER}")', |
|
boliu
2013/12/04 17:11:39
This is breaking android builds that is *not* usin
|
| + }, { |
| + 'android_goma_dir%': '' |
| + }], |
| ], |
| }, |
| # Copy conditionally-set variables out one scope. |
| @@ -141,6 +147,12 @@ |
| # Set ARM architecture version. |
| 'arm_version%': 7, |
| + # goma settings. |
| + # 1 to use goma. |
| + # If no gomadir is set, it uses the default gomadir. |
| + 'use_goma%': 0, |
| + 'gomadir%': '', |
| + |
| 'conditions': [ |
| # Ash needs Aura. |
| ['use_aura==0', { |
| @@ -196,7 +208,19 @@ |
| 'use_ozone_evdev%': 1, |
| }, { |
| 'use_ozone_evdev%': 0, |
| - }] |
| + }], |
| + |
| + # Set default gomadir. |
| + ['OS=="win"', { |
| + 'gomadir': 'c:\\goma\\goma-win', |
| + }], |
| + ['android_goma_dir!=""', { |
| + 'use_goma': 1, |
| + 'gomadir': '<(android_goma_dir)', |
| + }], |
| + ['OS!="win" and android_goma_dir==""', { |
| + 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| + }], |
| ], |
| }, |
| @@ -219,6 +243,8 @@ |
| 'enable_touch_ui%': '<(enable_touch_ui)', |
| 'android_webview_build%': '<(android_webview_build)', |
| 'google_tv%': '<(google_tv)', |
| + 'use_goma%': '<(use_goma)', |
| + 'gomadir%': '<(gomadir)', |
| 'enable_app_list%': '<(enable_app_list)', |
| 'use_default_render_theme%': '<(use_default_render_theme)', |
| 'buildtype%': '<(buildtype)', |
| @@ -948,6 +974,8 @@ |
| 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)', |
| 'v8_optimized_debug%': '<(v8_optimized_debug)', |
| 'proprietary_codecs%': '<(proprietary_codecs)', |
| + 'use_goma%': '<(use_goma)', |
| + 'gomadir%': '<(gomadir)', |
| # Use system nspr instead of the bundled one. |
| 'use_system_nspr%': 0, |
| @@ -1861,6 +1889,16 @@ |
| 'ozone_platform_dri%': 0, |
| 'ozone_platform_test%': 0, |
| }], |
| + ['OS=="win" and use_goma==1', { |
| + # goma doesn't support pch yet. |
| + 'chromium_win_pch': 0, |
| + # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. |
| + 'conditions': [ |
| + ['fastbuild==0', { |
| + 'win_z7': 1, |
| + }], |
| + ], |
| + }], |
| ], |
| @@ -4645,33 +4683,21 @@ |
| }, |
| }], |
| ['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++)'], |
| - ['CC.host', '$(CC)'], |
| - ['CXX.host', '$(CXX)'], |
| - ], |
| - }, { |
| - 'make_global_settings': [ |
| - ['CC', '<(make_clang_dir)/bin/clang'], |
| - ['CXX', '<(make_clang_dir)/bin/clang++'], |
| - ['CC.host', '$(CC)'], |
| - ['CXX.host', '$(CXX)'], |
| - ], |
| - }], |
| + 'make_global_settings': [ |
| + ['CC', '<(make_clang_dir)/bin/clang'], |
| + ['CXX', '<(make_clang_dir)/bin/clang++'], |
| + ['CC.host', '$(CC)'], |
| + ['CXX.host', '$(CXX)'], |
| ], |
| }], |
| ['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++)'], |
| - ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'], |
| - ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
| + ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| + ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
| + ['CC.host', '<!(which gcc)'], |
| + ['CXX.host', '<!(which g++)'], |
| ], |
| }], |
| ['OS=="linux" and target_arch=="mipsel"', { |
| @@ -4682,6 +4708,18 @@ |
| ['CXX.host', '<!(which g++)'], |
| ], |
| }], |
| + |
| + # TODO(yyanagisawa): supports GENERATOR==make |
| + # make generator doesn't support CC_wrapper without CC |
| + # in make_global_settings yet. |
| + ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
| + 'make_global_settings': [ |
| + ['CC_wrapper', '<(gomadir)/gomacc'], |
| + ['CXX_wrapper', '<(gomadir)/gomacc'], |
| + ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| + ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| + ], |
| + }], |
| ], |
| 'xcode_settings': { |
| # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |