Chromium Code Reviews| Index: build/common.gypi |
| =================================================================== |
| --- build/common.gypi (revision 237225) |
| +++ build/common.gypi (working copy) |
| @@ -138,6 +138,11 @@ |
| # Sets whether chrome is built for google tv device. |
| 'google_tv%': 0, |
| + # goma settings. |
| + # 1 to use goma. |
| + # If no gomadir is set, it uses the default gomadir. |
| + 'use_goma%': 0, |
| + |
| # Set ARM architecture version. |
| 'arm_version%': 7, |
| @@ -196,7 +201,14 @@ |
| 'use_ozone_evdev%': 1, |
| }, { |
| 'use_ozone_evdev%': 0, |
| - }] |
| + }], |
| + |
| + # Set default gomadir. |
| + ['OS=="win"', { |
| + 'gomadir%': 'c:\\goma\\goma-win', |
| + }, { |
| + 'gomadir%': '${HOME}/goma', |
| + }], |
| ], |
| }, |
| @@ -219,6 +231,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)', |
| @@ -793,6 +807,14 @@ |
| 'remoting%': 0, |
| 'enable_printing%': 0, |
| }], |
| + |
| + # Set goma_status = "ok" if the user can use goma. |
| + # TODO(yyanagisawa): set "ok" only if goma is available (if needed). |
|
Nico
2013/11/26 21:58:23
I'd remove this for now and just check "use_goma==
Yoshisato Yanagisawa
2013/11/27 02:01:39
Done.
|
| + ['use_goma==1 and gomadir!=""', { |
| + 'goma_status': 'ok', |
| + },{ |
| + 'goma_status': '', |
| + }], |
| ], |
| # Set this to 1 to enable use of concatenated impulse responses |
| @@ -958,6 +980,9 @@ |
| 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)', |
| 'v8_optimized_debug%': '<(v8_optimized_debug)', |
| 'proprietary_codecs%': '<(proprietary_codecs)', |
| + 'use_goma%': '<(use_goma)', |
| + 'gomadir%': '<(gomadir)', |
| + 'goma_status%': '<(goma_status)', |
| # Use system nspr instead of the bundled one. |
| 'use_system_nspr%': 0, |
| @@ -1872,6 +1897,16 @@ |
| 'ozone_platform_dri%': 0, |
| 'ozone_platform_test%': 0, |
| }], |
| + ['OS=="win" and goma_status=="ok"', { |
| + # 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, |
| + }], |
| + ], |
| + }], |
| ], |
| @@ -4644,33 +4679,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"', { |
| @@ -4681,6 +4704,18 @@ |
| ['CXX.host', '<!(which g++)'], |
| ], |
| }], |
| + |
| + # TODO(yyanagisawa): supports GENERATOR==make |
| + # make generator doesn't support CC_wrapper without CC |
| + # in make_global_settings yet. |
| + ['goma_status=="ok" and ("<(GENERATOR)"=="ninja" or clang==1 or OS=="android")', { |
|
Nico
2013/11/26 21:58:23
I think OS==android implies <(GENERATOR) = ninja,
Yoshisato Yanagisawa
2013/11/27 02:01:39
Done.
|
| + '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! |