Chromium Code Reviews| 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 # ============================================================================= | 5 # ============================================================================= |
| 6 # PLATFORM SELECTION | 6 # PLATFORM SELECTION |
| 7 # ============================================================================= | 7 # ============================================================================= |
| 8 # | 8 # |
| 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name | 9 # There are two main things to set: "os" and "cpu". The "toolchain" is the name |
| 10 # of the GN thing that encodes combinations of these things. | 10 # of the GN thing that encodes combinations of these things. |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 | 138 |
| 139 # Compile for Leak Sanitizer to find leaks. | 139 # Compile for Leak Sanitizer to find leaks. |
| 140 is_lsan = false | 140 is_lsan = false |
| 141 | 141 |
| 142 # Compile for Memory Sanitizer to find uninitialized reads. | 142 # Compile for Memory Sanitizer to find uninitialized reads. |
| 143 is_msan = false | 143 is_msan = false |
| 144 | 144 |
| 145 # Compile for Thread Sanitizer to find threading bugs. | 145 # Compile for Thread Sanitizer to find threading bugs. |
| 146 is_tsan = false | 146 is_tsan = false |
| 147 | 147 |
| 148 if (current_os == "chromeos") { | 148 # Allows the target toolchain to be injected as arguments. This is needed |
| 149 # Allows the target toolchain to be injected as arguments. This is needed | 149 # to support the CrOS build system which supports per-build-configuration |
| 150 # to support the CrOS build system which supports per-build-configuration | 150 # toolchains. |
| 151 # toolchains. | 151 cros_use_custom_toolchain = false |
|
Dirk Pranke
2015/08/13 20:25:16
if this is no longer strictly tied to CrOS, should
| |
| 152 cros_use_custom_toolchain = false | |
| 153 } | |
| 154 | 152 |
| 155 # DON'T ADD MORE FLAGS HERE. Read the comment above. | 153 # DON'T ADD MORE FLAGS HERE. Read the comment above. |
| 156 } | 154 } |
| 157 | 155 |
| 158 # ============================================================================= | 156 # ============================================================================= |
| 159 # OS DEFINITIONS | 157 # OS DEFINITIONS |
| 160 # ============================================================================= | 158 # ============================================================================= |
| 161 # | 159 # |
| 162 # We set these various is_FOO booleans for convenience in writing OS-based | 160 # We set these various is_FOO booleans for convenience in writing OS-based |
| 163 # conditions. | 161 # conditions. |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 580 set_default_toolchain("//build/toolchain/android:$current_cpu") | 578 set_default_toolchain("//build/toolchain/android:$current_cpu") |
| 581 } | 579 } |
| 582 } else if (is_linux) { | 580 } else if (is_linux) { |
| 583 if (is_clang) { | 581 if (is_clang) { |
| 584 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 582 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
| 585 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") | 583 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") |
| 586 } else { | 584 } else { |
| 587 host_toolchain = "//build/toolchain/linux:$host_cpu" | 585 host_toolchain = "//build/toolchain/linux:$host_cpu" |
| 588 set_default_toolchain("//build/toolchain/linux:$current_cpu") | 586 set_default_toolchain("//build/toolchain/linux:$current_cpu") |
| 589 } | 587 } |
| 590 if (is_chromeos && cros_use_custom_toolchain) { | 588 if (cros_use_custom_toolchain) { |
| 591 set_default_toolchain("//build/toolchain/cros:target") | 589 set_default_toolchain("//build/toolchain/cros:target") |
| 592 } | 590 } |
| 593 } else if (is_mac) { | 591 } else if (is_mac) { |
| 594 host_toolchain = "//build/toolchain/mac:clang_x64" | 592 host_toolchain = "//build/toolchain/mac:clang_x64" |
| 595 set_default_toolchain(host_toolchain) | 593 set_default_toolchain(host_toolchain) |
| 596 } else if (is_ios) { | 594 } else if (is_ios) { |
| 597 host_toolchain = "//build/toolchain/mac:clang_x64" | 595 host_toolchain = "//build/toolchain/mac:clang_x64" |
| 598 set_default_toolchain("//build/toolchain/mac:ios_clang_arm") | 596 set_default_toolchain("//build/toolchain/mac:ios_clang_arm") |
| 599 } else if (is_nacl) { | 597 } else if (is_nacl) { |
| 600 # TODO(GYP): This will need to change when we get NaCl working | 598 # TODO(GYP): This will need to change when we get NaCl working |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 618 forward_variables_from(invoker, "*") | 616 forward_variables_from(invoker, "*") |
| 619 | 617 |
| 620 # All shared libraries must have the sanitizer deps to properly link in | 618 # All shared libraries must have the sanitizer deps to properly link in |
| 621 # asan mode (this target will be empty in other cases). | 619 # asan mode (this target will be empty in other cases). |
| 622 if (!defined(deps)) { | 620 if (!defined(deps)) { |
| 623 deps = [] | 621 deps = [] |
| 624 } | 622 } |
| 625 deps += [ "//build/config/sanitizers:deps" ] | 623 deps += [ "//build/config/sanitizers:deps" ] |
| 626 } | 624 } |
| 627 } | 625 } |
| OLD | NEW |