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

Side by Side Diff: snapshot_toolchain.gni

Issue 2265983002: Use clang for snapshot_toolchain by default, except on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Import order. 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 the V8 project authors. All rights reserved. 1 # Copyright 2015 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution. 11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its 12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived 13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission. 14 # from this software without specific prior written permission.
15 # 15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 import("//build/config/chromecast_build.gni")
jochen (gone - plz use gerrit) 2016/08/22 15:46:53 why is that required here?
slan 2016/08/22 15:54:25 is_chromecast is declared in that file.
jochen (gone - plz use gerrit) 2016/08/22 15:57:46 but we also don't include special files to get the
28 import("//build/config/v8_target_cpu.gni") 29 import("//build/config/v8_target_cpu.gni")
29 30
30 declare_args() { 31 declare_args() {
31 # The v8 snapshot needs to be built by code that is compiled with a 32 # The v8 snapshot needs to be built by code that is compiled with a
32 # toolchain that matches the bit-width of the target CPU, but runs on 33 # toolchain that matches the bit-width of the target CPU, but runs on
33 # the host. 34 # the host.
34 v8_snapshot_toolchain = "" 35 v8_snapshot_toolchain = ""
35 } 36 }
36 37
37 # Try to infer the appropriate snapshot toolchain for the v8_current_cpu 38 # Try to infer the appropriate snapshot toolchain for the v8_current_cpu
(...skipping 27 matching lines...) Expand all
65 66
66 } else if (current_os == "win" && host_os == "mac" && is_clang) { 67 } else if (current_os == "win" && host_os == "mac" && is_clang) {
67 # This is a mac -> win cross-compile, which is only supported w/ clang. 68 # This is a mac -> win cross-compile, which is only supported w/ clang.
68 v8_snapshot_toolchain = "//build/toolchain/mac:clang_${v8_current_cpu}" 69 v8_snapshot_toolchain = "//build/toolchain/mac:clang_${v8_current_cpu}"
69 70
70 } else if (host_cpu == "x64") { 71 } else if (host_cpu == "x64") {
71 # This is a cross-compile from an x64 host to either a non-Intel target 72 # This is a cross-compile from an x64 host to either a non-Intel target
72 # cpu or a different target OS. Assume the same toolchain (Clang or GCC 73 # cpu or a different target OS. Assume the same toolchain (Clang or GCC
73 # or MSVS) for target and host, unless this is an Android build, where 74 # or MSVS) for target and host, unless this is an Android build, where
74 # Clang is always used on the host. 75 # Clang is always used on the host.
75 if (is_clang || is_android) { 76 if (is_clang || is_android || is_chromecast) {
76 _clang = "clang_" 77 _clang = "clang_"
77 } else { 78 } else {
78 _clang = "" 79 _clang = ""
79 } 80 }
80 81
81 if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { 82 if (v8_current_cpu == "x64" || v8_current_cpu == "x86") {
82 _cpus = v8_current_cpu 83 _cpus = v8_current_cpu
83 } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el") { 84 } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el") {
84 _cpus = "x64_v8_${v8_current_cpu}" 85 _cpus = "x64_v8_${v8_current_cpu}"
85 } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel") { 86 } else if (v8_current_cpu == "arm" || v8_current_cpu == "mipsel") {
86 _cpus = "x86_v8_${v8_current_cpu}" 87 _cpus = "x86_v8_${v8_current_cpu}"
87 } else { 88 } else {
88 # This branch should not be reached; leave _cpus blank so the assert 89 # This branch should not be reached; leave _cpus blank so the assert
89 # below will fail. 90 # below will fail.
90 _cpus = "" 91 _cpus = ""
91 } 92 }
92 93
93 if (_cpus != "") { 94 if (_cpus != "") {
94 v8_snapshot_toolchain = "//build/toolchain/${host_os}:${_clang}${_cpus}" 95 v8_snapshot_toolchain = "//build/toolchain/${host_os}:${_clang}${_cpus}"
95 } 96 }
96 } 97 }
97 } 98 }
98 99
99 assert(v8_snapshot_toolchain != "", 100 assert(v8_snapshot_toolchain != "",
100 "Do not know how to build a snapshot for $current_toolchain " + 101 "Do not know how to build a snapshot for $current_toolchain " +
101 "on $host_os $host_cpu") 102 "on $host_os $host_cpu")
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698