| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # Defines the configuration of Goma. | 5 # Defines the configuration of Goma. |
| 6 # | 6 # |
| 7 # This is currently designed to match the GYP build exactly, so as not to break | 7 # This is currently designed to match the GYP build exactly, so as not to break |
| 8 # people during the transition. | 8 # people during the transition. |
| 9 # | |
| 10 # TODO(brettw) make Android work like normal Linux. It's silly that Android has | |
| 11 # completely different logic for configuring Goma. | |
| 12 | 9 |
| 13 declare_args() { | 10 declare_args() { |
| 14 use_goma = false | 11 use_goma = false |
| 15 | 12 |
| 16 goma_dir = "" | 13 goma_dir = "" |
| 17 } | 14 } |
| 18 | 15 |
| 19 # The Android GYP build has some logic that automatically turns on goma when | |
| 20 # the directory is set, but this isn't done for other platforms. | |
| 21 # TODO(brettw) rationalize all Linux-y platforms. | |
| 22 if (is_android) { | |
| 23 if (goma_dir == "") { | |
| 24 goma_dir = exec_script("android/default_goma_for_android.py", [], "value") | |
| 25 } | |
| 26 if (goma_dir != "") { | |
| 27 use_goma = true | |
| 28 } | |
| 29 } | |
| 30 | |
| 31 if (use_goma && goma_dir == "") { | 16 if (use_goma && goma_dir == "") { |
| 32 # Set the default goma directory. This must be a character-for-character | 17 # Set the default goma directory. This must be a character-for-character |
| 33 # match for the GYP default or else the compilers for the different targets | 18 # match for the GYP default or else the compilers for the different targets |
| 34 # won't match and GYP will assert. | 19 # won't match and GYP will assert. |
| 35 if (is_win) { | 20 if (is_win) { |
| 36 goma_dir = "c:\goma\goma-win" | 21 goma_dir = "c:\goma\goma-win" |
| 37 } else { | 22 } else { |
| 38 goma_dir = exec_script("get_default_posix_goma_dir.py", [], "value") | 23 goma_dir = exec_script("get_default_posix_goma_dir.py", [], "value") |
| 39 } | 24 } |
| 40 } | 25 } |
| 41 | 26 |
| 42 if (use_goma) { | 27 if (use_goma) { |
| 43 # Define the toolchain for the GYP build when using goma. | 28 # Define the toolchain for the GYP build when using goma. |
| 44 make_goma_global_settings = | 29 make_goma_global_settings = |
| 45 "['CC_wrapper', '$goma_dir/gomacc']," + | 30 "['CC_wrapper', '$goma_dir/gomacc']," + |
| 46 "['CXX_wrapper', '$goma_dir/gomacc']," + | 31 "['CXX_wrapper', '$goma_dir/gomacc']," + |
| 47 "['CC.host_wrapper', '$goma_dir/gomacc']," + | 32 "['CC.host_wrapper', '$goma_dir/gomacc']," + |
| 48 "['CXX.host_wrapper', '$goma_dir/gomacc']," | 33 "['CXX.host_wrapper', '$goma_dir/gomacc']," |
| 49 } | 34 } |
| OLD | NEW |