OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Defines the configuration of Goma. |
| 6 # |
| 7 # This is currently designed to match the GYP build exactly, so as not to break |
| 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 |
| 13 declare_args() { |
| 14 use_goma = false |
| 15 |
| 16 goma_dir = "" |
| 17 |
| 18 # Goma directory used by the Android build. Empty means use the GOMA_DIR |
| 19 # environment variable. |
| 20 # |
| 21 # TODO(brettw) remove this and make it work like regular Linux. |
| 22 android_goma_dir = "" |
| 23 } |
| 24 |
| 25 # The Android GYP build has some logic that automatically turns on goma when |
| 26 # the directory is set, but this isn't done for other platforms. |
| 27 # TODO(brettw) rationalize all Linux-y platforms. |
| 28 if (is_android && android_goma_dir != "") { |
| 29 use_goma = true |
| 30 } |
| 31 |
| 32 if (use_goma && goma_dir == "") { |
| 33 # Set the default goma directory. This must be a character-for-character |
| 34 # match for the GYP default or else the compilers for the different targets |
| 35 # won't match and GYP will assert. |
| 36 if (is_win) { |
| 37 goma_dir = "c:\goma\goma-win" |
| 38 } else if (is_android) { |
| 39 goma_dir = exec_script("android/default_goma_for_android.py", [], "value") |
| 40 } else { |
| 41 goma_dir = exec_script("get_default_posix_goma_dir.py", [], "value") |
| 42 } |
| 43 } |
| 44 |
| 45 if (use_goma) { |
| 46 # Define the toolchain for the GYP build when using goma. |
| 47 make_goma_global_settings = |
| 48 "'make_global_settings': [" + |
| 49 "['CC_wrapper', '$goma_dir/gomacc']," + |
| 50 "['CXX_wrapper', '$goma_dir/gomacc']," + |
| 51 "['CC.host_wrapper', '$gomadir/gomacc']," + |
| 52 "['CXX.host_wrapper', '$gomadir/gomacc']," + |
| 53 "]," |
| 54 } |
OLD | NEW |