| Index: Source/platform/BUILD.gn
|
| diff --git a/Source/platform/BUILD.gn b/Source/platform/BUILD.gn
|
| index e80d157d9554da818315b10e3de8884ce53a6c00..cea25c0f751c932da6d9cdaeabe3c1edbcca77b5 100644
|
| --- a/Source/platform/BUILD.gn
|
| +++ b/Source/platform/BUILD.gn
|
| @@ -7,7 +7,6 @@ import("//third_party/WebKit/Source/build/scripts/scripts.gni")
|
| import("//third_party/WebKit/Source/config.gni")
|
| import("//third_party/WebKit/Source/platform/platform.gni")
|
| import("//third_party/WebKit/Source/platform/platform_generated.gni")
|
| -import("//third_party/yasm/yasm_assemble.gni")
|
|
|
| # Most targets in this file are private actions so use that as the default.
|
| visibility = ":*"
|
| @@ -334,16 +333,13 @@ component("platform") {
|
| }
|
| }
|
|
|
| +if (cpu_arch == "x86" || cpu_arch == "x64") {
|
| +import("//third_party/yasm/yasm_assemble.gni")
|
| +
|
| yasm_assemble("heap_asm_stubs") {
|
| - if (cpu_arch == "x86" || cpu_arch == "x64") {
|
| - sources = [ "heap/asm/SaveRegisters_x86.asm" ]
|
| - } else if (cpu_arch == "arm") {
|
| - sources = [ "heap/asm/SaveRegisters_arm.S" ]
|
| - } else if (cpu_arch == "arm64") {
|
| - sources = [ "heap/asm/SaveRegisters_arm64.S" ]
|
| - } else if (cpu_arch == "mipsel") {
|
| - sources = [ "heap/asm/SaveRegisters_mips.S" ]
|
| - }
|
| + assert(cpu_arch == "x86" || cpu_arch == "x64")
|
| +
|
| + sources = [ "heap/asm/SaveRegisters_x86.asm" ]
|
|
|
| yasm_flags = []
|
| if (is_mac) {
|
| @@ -357,13 +353,30 @@ yasm_assemble("heap_asm_stubs") {
|
| } else {
|
| yasm_flags += [ "-DX64POSIX=1" ]
|
| }
|
| - } else if (cpu_arch == "x86") {
|
| + } else { # cpu_arch == "x86"
|
| yasm_flags += [ "-DIA32=1" ]
|
| - } else if (cpu_arch == "arm") {
|
| - yasm_flags += [ "-DARM=1" ]
|
| }
|
| }
|
|
|
| +} else { # cpu_arch == "x86" || cpu_arch == "x64"
|
| +
|
| +source_set("heap_asm_stubs") {
|
| + if (cpu_arch == "arm") {
|
| + sources = [ "heap/asm/SaveRegisters_arm.S" ]
|
| + } else if (cpu_arch == "arm64") {
|
| + sources = [ "heap/asm/SaveRegisters_arm64.S" ]
|
| + } else if (cpu_arch == "mipsel") {
|
| + sources = [ "heap/asm/SaveRegisters_mips.S" ]
|
| + }
|
| +
|
| + if (cpu_arch == "arm") {
|
| + defines = [ "ARM=1" ]
|
| + }
|
| +
|
| +}
|
| +
|
| +} # cpu_arch == "x86" || cpu_arch == "x64"
|
| +
|
|
|
| test("heap_unittests") {
|
| visibility = "//third_party/WebKit/*"
|
|
|