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

Unified Diff: Source/platform/BUILD.gn

Issue 541933003: GN: Update heap stubs for android (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/heap/BUILD.gn » ('j') | Source/platform/heap/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/*"
« no previous file with comments | « no previous file | Source/platform/heap/BUILD.gn » ('j') | Source/platform/heap/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698