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

Side by Side Diff: BUILD.gn

Issue 1927893002: Port arm, arm64, mipsle, and mips64le flags to GN (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni") 6 import("//build/config/arm.gni")
7 import("//build/config/mips.gni") 7 import("//build/config/mips.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 9
10 if (is_android) { 10 if (is_android) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 # based where the regular expression is compiled to a bytecode. 48 # based where the regular expression is compiled to a bytecode.
49 v8_interpreted_regexp = false 49 v8_interpreted_regexp = false
50 50
51 # Sets -dOBJECT_PRINT. 51 # Sets -dOBJECT_PRINT.
52 v8_object_print = false 52 v8_object_print = false
53 53
54 # With post mortem support enabled, metadata is embedded into libv8 that 54 # With post mortem support enabled, metadata is embedded into libv8 that
55 # describes various parameters of the VM for use by debuggers. See 55 # describes various parameters of the VM for use by debuggers. See
56 # tools/gen-postmortem-metadata.py for details. 56 # tools/gen-postmortem-metadata.py for details.
57 v8_postmortem_support = false 57 v8_postmortem_support = false
58
59 # Similar to vfp but on MIPS.
60 v8_can_use_fpu_instructions = true
61
62 # Similar to the ARM hard float ABI but on MIPS.
63 v8_use_mips_abi_hardfloat = true
58 } 64 }
59 65
60 v8_random_seed = "314159265" 66 v8_random_seed = "314159265"
61 v8_toolset_for_d8 = "host" 67 v8_toolset_for_d8 = "host"
62 68
63 if (is_msan) { 69 if (is_msan) {
64 # Running the V8-generated code on an ARM simulator is a powerful hack that 70 # Running the V8-generated code on an ARM simulator is a powerful hack that
65 # allows the tool to see the memory accesses from JITted code. Without this 71 # allows the tool to see the memory accesses from JITted code. Without this
66 # flag, JS code causes false positive reports from MSan. 72 # flag, JS code causes false positive reports from MSan.
67 v8_target_arch = "arm64" 73 v8_target_arch = "arm64"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 167 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
162 } 168 }
163 } 169 }
164 170
165 config("toolchain") { 171 config("toolchain") {
166 visibility = [ ":*" ] # Only targets in this file can depend on this. 172 visibility = [ ":*" ] # Only targets in this file can depend on this.
167 173
168 defines = [] 174 defines = []
169 cflags = [] 175 cflags = []
170 176
171 # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el.
172
173 if (v8_target_arch == "arm") { 177 if (v8_target_arch == "arm") {
174 defines += [ "V8_TARGET_ARCH_ARM" ] 178 defines += [ "V8_TARGET_ARCH_ARM" ]
175 if (current_cpu == "arm") { 179 if (arm_version == 7) {
176 if (arm_version == 7) { 180 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
177 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] 181 }
178 } 182 if (arm_fpu == "vfpv3-d16") {
179 if (arm_fpu == "vfpv3-d16") { 183 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
180 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] 184 } else if (arm_fpu == "vfpv3") {
181 } else if (arm_fpu == "vfpv3") {
182 defines += [
183 "CAN_USE_VFP3_INSTRUCTIONS",
184 "CAN_USE_VFP32DREGS",
185 ]
186 } else if (arm_fpu == "neon") {
187 defines += [
188 "CAN_USE_VFP3_INSTRUCTIONS",
189 "CAN_USE_VFP32DREGS",
190 "CAN_USE_NEON",
191 ]
192 }
193 } else {
194 # These defines ares used for the ARM simulator.
195 defines += [ 185 defines += [
196 "CAN_USE_ARMV7_INSTRUCTIONS",
197 "CAN_USE_VFP3_INSTRUCTIONS", 186 "CAN_USE_VFP3_INSTRUCTIONS",
198 "CAN_USE_VFP32DREGS", 187 "CAN_USE_VFP32DREGS",
199 "USE_EABI_HARDFLOAT=0", 188 ]
189 } else if (arm_fpu == "neon") {
190 defines += [
191 "CAN_USE_VFP3_INSTRUCTIONS",
192 "CAN_USE_VFP32DREGS",
193 "CAN_USE_NEON",
200 ] 194 ]
201 } 195 }
196 # TODO(jochen): Add support for arm_test_noprobe.
202 197
203 # TODO(jochen): Add support for arm_test_noprobe. 198 if (current_cpu != "arm") {
199 # These defines ares used for the ARM simulator.
200 if (arm_float_abi == "hard") {
201 defines += [ "USE_EABI_HARDFLOAT=1" ]
202 } else if (arm_float_abi == "softfp") {
203 defines += [ "USE_EABI_HARDFLOAT=0" ]
204 }
205 }
204 } 206 }
205 if (v8_target_arch == "arm64") { 207 if (v8_target_arch == "arm64") {
206 defines += [ "V8_TARGET_ARCH_ARM64" ] 208 defines += [ "V8_TARGET_ARCH_ARM64" ]
207 } 209 }
210 # TODO(jochen): Add support for mips.
208 if (v8_target_arch == "mipsel") { 211 if (v8_target_arch == "mipsel") {
209 defines += [ "V8_TARGET_ARCH_MIPS" ] 212 defines += [ "V8_TARGET_ARCH_MIPS" ]
213 if (v8_can_use_fpu_instructions) {
214 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
215 }
216 if (v8_use_mips_abi_hardfloat) {
217 defines += [
218 "__mips_hard_float=1",
219 "CAN_USE_FPU_INSTRUCTIONS",
220 ]
221 } else {
222 defines += [ "__mips_soft_float=1" ]
223 }
224 if (mips_arch_variant == "r6") {
225 defines += [
226 "_MIPS_ARCH_MIPS32R6",
227 "FPU_MODE_FP64",
228 ]
229 } else if (mips_arch_variant == "r2") {
230 defines += [ "_MIPS_ARCH_MIPS32R2" ]
231 if (mips_fpu_mode == "fp64") {
232 defines += [ "FPU_MODE_FP64" ]
233 } else if (mips_fpu_mode == "fpxx") {
234 defines += [ "FPU_MODE_FPXX" ]
235 } else if (mips_fpu_mode == "fp32") {
236 defines += [ "FPU_MODE_FP32" ]
237 }
238 } else if (mips_arch_variant == "r1") {
239 defines += [ "FPU_MODE_FP32" ]
240 }
241 # TODO(jochen): Add support for mips_arch_variant rx and loongson.
210 } 242 }
243 # TODO(jochen): Add support for mips64.
211 if (v8_target_arch == "mips64el") { 244 if (v8_target_arch == "mips64el") {
212 defines += [ "V8_TARGET_ARCH_MIPS64" ] 245 defines += [ "V8_TARGET_ARCH_MIPS64" ]
246 if (v8_can_use_fpu_instructions) {
247 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
248 }
249 # TODO(jochen): Add support for big endian host byteorder.
250 defines += [ "V8_TARGET_ARCH_MIPS64_LE" ]
251 if (v8_use_mips_abi_hardfloat) {
252 defines += [
253 "__mips_hard_float=1",
254 "CAN_USE_FPU_INSTRUCTIONS",
255 ]
256 } else {
257 defines += [ "__mips_soft_float=1" ]
258 }
259 if (mips_arch_variant == "r6") {
260 defines += [ "_MIPS_ARCH_MIPS64R6" ]
261 } else if (mips_arch_variant == "r2") {
262 defines += [ "_MIPS_ARCH_MIPS64R2" ]
263 }
213 } 264 }
214 if (v8_target_arch == "s390") { 265 if (v8_target_arch == "s390") {
215 defines += [ "V8_TARGET_ARCH_S390" ] 266 defines += [ "V8_TARGET_ARCH_S390" ]
216 } 267 }
217 if (v8_target_arch == "s390x") { 268 if (v8_target_arch == "s390x") {
218 defines += [ 269 defines += [
219 "V8_TARGET_ARCH_S390", 270 "V8_TARGET_ARCH_S390",
220 "V8_TARGET_ARCH_S390X", 271 "V8_TARGET_ARCH_S390X",
221 ] 272 ]
222 } 273 }
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 2212
2162 configs -= [ "//build/config/compiler:chromium_code" ] 2213 configs -= [ "//build/config/compiler:chromium_code" ]
2163 configs += [ "//build/config/compiler:no_chromium_code" ] 2214 configs += [ "//build/config/compiler:no_chromium_code" ]
2164 configs += [ 2215 configs += [
2165 ":internal_config", 2216 ":internal_config",
2166 ":libplatform_config", 2217 ":libplatform_config",
2167 ":features", 2218 ":features",
2168 ":toolchain", 2219 ":toolchain",
2169 ] 2220 ]
2170 } 2221 }
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