Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 2198423002: Clean up default toolchain logic for CrOS GN builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/toolchain/cros/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 _default_toolchain = "" 196 _default_toolchain = ""
197 197
198 if (target_os == "android") { 198 if (target_os == "android") {
199 assert(host_os == "linux" || host_os == "mac", 199 assert(host_os == "linux" || host_os == "mac",
200 "Android builds are only supported on Linux and Mac hosts.") 200 "Android builds are only supported on Linux and Mac hosts.")
201 if (is_clang) { 201 if (is_clang) {
202 _default_toolchain = "//build/toolchain/android:clang_$target_cpu" 202 _default_toolchain = "//build/toolchain/android:clang_$target_cpu"
203 } else { 203 } else {
204 _default_toolchain = "//build/toolchain/android:$target_cpu" 204 _default_toolchain = "//build/toolchain/android:$target_cpu"
205 } 205 }
206 } else if (target_os == "chromeos") { 206 } else if (target_os == "chromeos" || target_os == "linux") {
207 # See comments in build/toolchain/cros/BUILD.gn about board compiles. 207 # See comments in build/toolchain/cros/BUILD.gn about board compiles.
208 assert(host_os == "linux",
209 "ChromeOS builds are only supported on Linux hosts.")
210 if (is_clang) {
211 _default_toolchain = "//build/toolchain/cros:clang_target"
212 } else {
213 _default_toolchain = "//build/toolchain/cros:target"
214 }
215 } else if (target_os == "ios") {
216 _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu"
217 } else if (target_os == "linux") {
218 if (is_clang) { 208 if (is_clang) {
219 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" 209 _default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
220 } else { 210 } else {
221 _default_toolchain = "//build/toolchain/linux:$target_cpu" 211 _default_toolchain = "//build/toolchain/linux:$target_cpu"
222 } 212 }
213 } else if (target_os == "ios") {
214 _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu"
223 } else if (target_os == "mac") { 215 } else if (target_os == "mac") {
224 assert(host_os == "mac", "Mac cross-compiles are unsupported.") 216 assert(host_os == "mac", "Mac cross-compiles are unsupported.")
225 _default_toolchain = host_toolchain 217 _default_toolchain = host_toolchain
226 } else if (target_os == "win") { 218 } else if (target_os == "win") {
227 # On Windows we use the same toolchain for host and target by default. 219 # On Windows we use the same toolchain for host and target by default.
228 assert(target_os == host_os, "Win cross-compiles only work on win hosts.") 220 assert(target_os == host_os, "Win cross-compiles only work on win hosts.")
229 if (is_clang) { 221 if (is_clang) {
230 _default_toolchain = "//build/toolchain/win:clang_$target_cpu" 222 _default_toolchain = "//build/toolchain/win:clang_$target_cpu"
231 } else { 223 } else {
232 _default_toolchain = "//build/toolchain/win:$target_cpu" 224 _default_toolchain = "//build/toolchain/win:$target_cpu"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 set_defaults("component") { 622 set_defaults("component") {
631 if (is_component_build) { 623 if (is_component_build) {
632 configs = default_shared_library_configs 624 configs = default_shared_library_configs
633 if (is_android) { 625 if (is_android) {
634 configs -= [ "//build/config/android:hide_native_jni_exports" ] 626 configs -= [ "//build/config/android:hide_native_jni_exports" ]
635 } 627 }
636 } else { 628 } else {
637 configs = default_compiler_configs 629 configs = default_compiler_configs
638 } 630 }
639 } 631 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/cros/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698