Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / heap / asm / BUILD.gn
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
3 # found in the LICENSE file.
4
5 if (cpu_arch == "x86" || cpu_arch == "x64") {
6 import("//third_party/yasm/yasm_assemble.gni")
7
8 yasm_assemble("asm") {
9   assert(cpu_arch == "x86" || cpu_arch == "x64")
10
11   sources = [ "SaveRegisters_x86.asm" ]
12
13   yasm_flags = []
14   if (is_mac) {
15     # Necessary to ensure symbols end up with a _ prefix; added by
16     # yasm_compile.gypi for Windows, but not Mac.
17     yasm_flags += [ "-DPREFIX" ]
18   }
19   if (cpu_arch == "x64") {
20     if (is_win) {
21       yasm_flags += [ "-DX64WIN=1" ]
22     } else {
23       yasm_flags += [ "-DX64POSIX=1" ]
24     }
25   } else {  # cpu_arch == "x86"
26     yasm_flags += [ "-DIA32=1" ]
27   }
28 }
29
30 } else { # cpu_arch == "x86" || cpu_arch == "x64"
31
32 source_set("asm") {
33   if (cpu_arch == "arm") {
34     sources = [ "SaveRegisters_arm.S" ]
35   } else if (cpu_arch == "arm64") {
36     sources = [ "SaveRegisters_arm64.S" ]
37   } else if (cpu_arch == "mipsel") {
38     sources = [ "SaveRegisters_mips.S" ]
39   }
40
41   if (cpu_arch == "arm") {
42     defines = [ "ARM=1" ]
43   }
44 }
45
46 } # cpu_arch == "x86" || cpu_arch == "x64"
47
48