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 if (target_os == "") { | 5 if (target_os == "") { |
6 target_os = host_os | 6 target_os = host_os |
7 } | 7 } |
8 | 8 |
9 if (target_cpu == "") { | 9 if (target_cpu == "") { |
10 if (target_os == "android") { | 10 if (target_os == "android") { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 # - is_mac is set only for desktop Mac. It is not set on iOS. | 146 # - is_mac is set only for desktop Mac. It is not set on iOS. |
147 # - is_posix is true for mac and any Unix-like system (basically everything | 147 # - is_posix is true for mac and any Unix-like system (basically everything |
148 # except Windows). | 148 # except Windows). |
149 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is | 149 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is |
150 # generally too different despite being based on the Linux kernel). | 150 # generally too different despite being based on the Linux kernel). |
151 # | 151 # |
152 # Do not add more is_* variants here for random lesser-used Unix systems like | 152 # Do not add more is_* variants here for random lesser-used Unix systems like |
153 # aix or one of the BSDs. If you need to check these, just check the | 153 # aix or one of the BSDs. If you need to check these, just check the |
154 # current_os value directly. | 154 # current_os value directly. |
155 | 155 |
156 if (current_os == "win") { | 156 if (current_os == "win" || current_os == "winrt_81" || |
157 current_os == "winrt_81_phone" || current_os == "winrt_10") { | |
157 is_android = false | 158 is_android = false |
158 is_chromeos = false | 159 is_chromeos = false |
159 is_ios = false | 160 is_ios = false |
160 is_linux = false | 161 is_linux = false |
161 is_mac = false | 162 is_mac = false |
162 is_nacl = false | 163 is_nacl = false |
163 is_posix = false | 164 is_posix = false |
164 is_win = true | 165 is_win = true |
165 } else if (current_os == "mac") { | 166 } else if (current_os == "mac") { |
166 is_android = false | 167 is_android = false |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
366 ] | 367 ] |
367 if (is_win) { | 368 if (is_win) { |
368 _native_compiler_configs += [ | 369 _native_compiler_configs += [ |
369 "//build/config/win:lean_and_mean", | 370 "//build/config/win:lean_and_mean", |
370 "//build/config/win:nominmax", | 371 "//build/config/win:nominmax", |
371 "//build/config/win:sdk", | 372 "//build/config/win:sdk", |
372 "//build/config/win:unicode", | 373 "//build/config/win:unicode", |
373 "//build/config/win:winver", | 374 "//build/config/win:winver", |
374 ] | 375 ] |
375 } | 376 } |
377 if (current_os == "winrt_81" || current_os == "winrt_81_phone" || | |
378 current_os == "winrt_10") { | |
379 _native_compiler_configs += [ "//build/config/win:target_winrt" ] | |
380 } | |
376 if (is_posix) { | 381 if (is_posix) { |
377 _native_compiler_configs += [ | 382 _native_compiler_configs += [ |
378 "//build/config/gcc:no_exceptions", | 383 "//build/config/gcc:no_exceptions", |
379 "//build/config/gcc:symbol_visibility_hidden", | 384 "//build/config/gcc:symbol_visibility_hidden", |
380 ] | 385 ] |
381 } | 386 } |
382 | 387 |
383 if (is_linux) { | 388 if (is_linux) { |
384 _native_compiler_configs += [ "//build/config/linux:sdk" ] | 389 _native_compiler_configs += [ "//build/config/linux:sdk" ] |
385 } else if (is_mac) { | 390 } else if (is_mac) { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
522 # default toolchain. | 527 # default toolchain. |
523 | 528 |
524 if (is_win) { | 529 if (is_win) { |
525 # On windows we use the same toolchain for host and target by default. | 530 # On windows we use the same toolchain for host and target by default. |
526 # TODO(dpranke): rename the toolchains to x64 and x86 to match current_cpu. | 531 # TODO(dpranke): rename the toolchains to x64 and x86 to match current_cpu. |
527 if (current_cpu == "x64") { | 532 if (current_cpu == "x64") { |
528 host_toolchain = "//build/toolchain/win:64" | 533 host_toolchain = "//build/toolchain/win:64" |
529 } else if (current_cpu == "x86") { | 534 } else if (current_cpu == "x86") { |
530 host_toolchain = "//build/toolchain/win:32" | 535 host_toolchain = "//build/toolchain/win:32" |
531 } | 536 } |
532 set_default_toolchain("$host_toolchain") | 537 |
538 if (current_os == "win") { | |
539 set_default_toolchain("$host_toolchain") | |
540 } else { # WinRT variants | |
brettw
2015/07/22 20:29:19
Just eliminate this and make the whole thing one b
| |
541 if (current_cpu == "x64") { | |
542 set_default_toolchain("//build/toolchain/win:winrt_x64") | |
543 } else if (current_cpu == "x86") { | |
544 set_default_toolchain("//build/toolchain/win:winrt_x86") | |
545 } | |
546 } | |
533 } else if (is_android) { | 547 } else if (is_android) { |
534 if (host_os == "linux") { | 548 if (host_os == "linux") { |
535 # Use clang for the x86/64 Linux host builds. | 549 # Use clang for the x86/64 Linux host builds. |
536 if (host_cpu == "x86" || host_cpu == "x64") { | 550 if (host_cpu == "x86" || host_cpu == "x64") { |
537 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 551 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
538 } else { | 552 } else { |
539 host_toolchain = "//build/toolchain/linux:$host_cpu" | 553 host_toolchain = "//build/toolchain/linux:$host_cpu" |
540 } | 554 } |
541 } else if (host_os == "mac") { | 555 } else if (host_os == "mac") { |
542 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" | 556 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
769 } | 783 } |
770 if (defined(invoker.testonly)) { | 784 if (defined(invoker.testonly)) { |
771 testonly = invoker.testonly | 785 testonly = invoker.testonly |
772 } | 786 } |
773 if (defined(invoker.visibility)) { | 787 if (defined(invoker.visibility)) { |
774 visibility = invoker.visibility | 788 visibility = invoker.visibility |
775 } | 789 } |
776 } | 790 } |
777 } | 791 } |
778 } | 792 } |
OLD | NEW |