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

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

Issue 117863003: Work on GN toolchain definitions and build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/toolchain/android/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 # BUILD FLAGS 6 # BUILD FLAGS
7 # ============================================================================= 7 # =============================================================================
8 # 8 #
9 # This block lists input arguments to the build, along with their default 9 # This block lists input arguments to the build, along with their default
10 # values. GN requires listing them explicitly so it can validate input and have 10 # values. GN requires listing them explicitly so it can validate input and have
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 is_ios = false 111 is_ios = false
112 is_linux = false 112 is_linux = false
113 is_mac = true 113 is_mac = true
114 is_nacl = false 114 is_nacl = false
115 is_posix = true 115 is_posix = true
116 is_win = false 116 is_win = false
117 if (!is_clang) { 117 if (!is_clang) {
118 is_clang = true # Always use clang on Mac. 118 is_clang = true # Always use clang on Mac.
119 } 119 }
120 } else if (os == "android") { 120 } else if (os == "android") {
121 is_android = false 121 is_android = true
122 is_chromeos = false 122 is_chromeos = false
123 is_ios = false 123 is_ios = false
124 is_linux = true 124 is_linux = true
125 is_mac = false 125 is_mac = false
126 is_nacl = false 126 is_nacl = false
127 is_posix = true 127 is_posix = true
128 is_win = false 128 is_win = false
129 } else if (os == "chromeos") { 129 } else if (os == "chromeos") {
130 is_android = false 130 is_android = false
131 is_chromeos = true 131 is_chromeos = true
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 # ============================================================================== 406 # ==============================================================================
407 # TOOLCHAIN SETUP 407 # TOOLCHAIN SETUP
408 # ============================================================================== 408 # ==============================================================================
409 # 409 #
410 # Here we set the default toolchain, as well as the variable host_toolchain 410 # Here we set the default toolchain, as well as the variable host_toolchain
411 # which will identify the toolchain corresponding to the local system when 411 # which will identify the toolchain corresponding to the local system when
412 # doing cross-compiles. When not cross-compiling, this will be the same as the 412 # doing cross-compiles. When not cross-compiling, this will be the same as the
413 # default toolchain. 413 # default toolchain.
414 414
415 if (is_win) { 415 if (is_win) {
416 # TODO(brettw) name the toolchains the same as cpu_arch as with Linux below
417 # to eliminate these conditionals.
416 if (build_cpu_arch == "x64") { 418 if (build_cpu_arch == "x64") {
417 host_toolchain = "//build/toolchain/win:64" 419 host_toolchain = "//build/toolchain/win:64"
418 } else if (build_cpu_arch == "x86") { 420 } else if (build_cpu_arch == "x86") {
419 host_toolchain = "//build/toolchain/win:32" 421 host_toolchain = "//build/toolchain/win:32"
420 } 422 }
421 423
422 if (cpu_arch == "x64") { 424 if (cpu_arch == "x64") {
423 set_default_toolchain("//build/toolchain/win:64") 425 set_default_toolchain("//build/toolchain/win:64")
424 } else if (cpu_arch == "x86") { 426 } else if (cpu_arch == "x86") {
425 set_default_toolchain("//build/toolchain/win:32") 427 set_default_toolchain("//build/toolchain/win:32")
426 } 428 }
429 } else if (is_android) {
430 host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
431 set_default_toolchain("//build/toolchain/android:$cpu_arch")
427 } else if (is_linux) { 432 } else if (is_linux) {
428 if (build_cpu_arch == "arm") { 433 host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
429 host_toolchain = "//build/toolchain/linux:arm" 434 set_default_toolchain("//build/toolchain/linux:$cpu_arch")
430 } else if (build_cpu_arch == "x86") {
431 host_toolchain = "//build/toolchain/linux:32"
432 } else if (build_cpu_arch == "x64") {
433 host_toolchain = "//build/toolchain/linux:64"
434 }
435
436 if (build_cpu_arch == "arm") {
437 set_default_toolchain("//build/toolchain/linux:arm")
438 } else if (build_cpu_arch == "x86") {
439 set_default_toolchain("//build/toolchain/linux:32")
440 } else if (build_cpu_arch == "x64") {
441 set_default_toolchain("//build/toolchain/linux:64")
442 }
443 } else if (is_mac || is_ios) { 435 } else if (is_mac || is_ios) {
444 host_toolchain = "//build/toolchain/mac:clang" 436 host_toolchain = "//build/toolchain/mac:clang"
445 set_default_toolchain(host_toolchain) 437 set_default_toolchain(host_toolchain)
446 } 438 }
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698