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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 # - is_mac is set only for desktop Mac. It is not set on iOS. | 166 # - is_mac is set only for desktop Mac. It is not set on iOS. |
167 # - is_posix is true for mac and any Unix-like system (basically everything | 167 # - is_posix is true for mac and any Unix-like system (basically everything |
168 # except Windows). | 168 # except Windows). |
169 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is | 169 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is |
170 # generally too different despite being based on the Linux kernel). | 170 # generally too different despite being based on the Linux kernel). |
171 # | 171 # |
172 # Do not add more is_* variants here for random lesser-used Unix systems like | 172 # Do not add more is_* variants here for random lesser-used Unix systems like |
173 # aix or one of the BSDs. If you need to check these, just check the | 173 # aix or one of the BSDs. If you need to check these, just check the |
174 # current_os value directly. | 174 # current_os value directly. |
175 | 175 |
176 if (current_os == "win") { | 176 if (current_os == "win" || current_os == "winrt_81" || |
| 177 current_os == "winrt_81_phone" || current_os == "winrt_10") { |
177 is_android = false | 178 is_android = false |
178 is_chromeos = false | 179 is_chromeos = false |
179 is_ios = false | 180 is_ios = false |
180 is_linux = false | 181 is_linux = false |
181 is_mac = false | 182 is_mac = false |
182 is_nacl = false | 183 is_nacl = false |
183 is_posix = false | 184 is_posix = false |
184 is_win = true | 185 is_win = true |
185 } else if (current_os == "mac") { | 186 } else if (current_os == "mac") { |
186 is_android = false | 187 is_android = false |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 ] | 387 ] |
387 if (is_win) { | 388 if (is_win) { |
388 _native_compiler_configs += [ | 389 _native_compiler_configs += [ |
389 "//build/config/win:lean_and_mean", | 390 "//build/config/win:lean_and_mean", |
390 "//build/config/win:nominmax", | 391 "//build/config/win:nominmax", |
391 "//build/config/win:sdk", | 392 "//build/config/win:sdk", |
392 "//build/config/win:unicode", | 393 "//build/config/win:unicode", |
393 "//build/config/win:winver", | 394 "//build/config/win:winver", |
394 ] | 395 ] |
395 } | 396 } |
| 397 if (current_os == "winrt_81" || current_os == "winrt_81_phone" || |
| 398 current_os == "winrt_10") { |
| 399 _native_compiler_configs += [ "//build/config/win:target_winrt" ] |
| 400 } |
396 if (is_posix) { | 401 if (is_posix) { |
397 _native_compiler_configs += [ | 402 _native_compiler_configs += [ |
398 "//build/config/gcc:no_exceptions", | 403 "//build/config/gcc:no_exceptions", |
399 "//build/config/gcc:symbol_visibility_hidden", | 404 "//build/config/gcc:symbol_visibility_hidden", |
400 ] | 405 ] |
401 } | 406 } |
402 | 407 |
403 if (is_linux) { | 408 if (is_linux) { |
404 _native_compiler_configs += [ "//build/config/linux:sdk" ] | 409 _native_compiler_configs += [ "//build/config/linux:sdk" ] |
405 } else if (is_mac) { | 410 } else if (is_mac) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 # doing cross-compiles. When not cross-compiling, this will be the same as the | 546 # doing cross-compiles. When not cross-compiling, this will be the same as the |
542 # default toolchain. | 547 # default toolchain. |
543 | 548 |
544 if (is_win) { | 549 if (is_win) { |
545 # On windows we use the same toolchain for host and target by default. | 550 # On windows we use the same toolchain for host and target by default. |
546 if (is_clang) { | 551 if (is_clang) { |
547 host_toolchain = "//build/toolchain/win:clang_$current_cpu" | 552 host_toolchain = "//build/toolchain/win:clang_$current_cpu" |
548 } else { | 553 } else { |
549 host_toolchain = "//build/toolchain/win:$current_cpu" | 554 host_toolchain = "//build/toolchain/win:$current_cpu" |
550 } | 555 } |
551 set_default_toolchain("$host_toolchain") | 556 |
| 557 if (current_os == "win") { |
| 558 set_default_toolchain("$host_toolchain") |
| 559 } else if (current_cpu == "x64") { # WinRT x64 |
| 560 set_default_toolchain("//build/toolchain/win:winrt_x64") |
| 561 } else if (current_cpu == "x86") { # WinRT x86 |
| 562 set_default_toolchain("//build/toolchain/win:winrt_x86") |
| 563 } |
552 } else if (is_android) { | 564 } else if (is_android) { |
553 if (host_os == "linux") { | 565 if (host_os == "linux") { |
554 # Use clang for the x86/64 Linux host builds. | 566 # Use clang for the x86/64 Linux host builds. |
555 if (host_cpu == "x86" || host_cpu == "x64") { | 567 if (host_cpu == "x86" || host_cpu == "x64") { |
556 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 568 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
557 } else { | 569 } else { |
558 host_toolchain = "//build/toolchain/linux:$host_cpu" | 570 host_toolchain = "//build/toolchain/linux:$host_cpu" |
559 } | 571 } |
560 } else if (host_os == "mac") { | 572 } else if (host_os == "mac") { |
561 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" | 573 host_toolchain = "//build/toolchain/mac:clang_$host_cpu" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 } | 794 } |
783 if (defined(invoker.testonly)) { | 795 if (defined(invoker.testonly)) { |
784 testonly = invoker.testonly | 796 testonly = invoker.testonly |
785 } | 797 } |
786 if (defined(invoker.visibility)) { | 798 if (defined(invoker.visibility)) { |
787 visibility = invoker.visibility | 799 visibility = invoker.visibility |
788 } | 800 } |
789 } | 801 } |
790 } | 802 } |
791 } | 803 } |
OLD | NEW |