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

Unified Diff: sky/engine/platform/BUILD.gn

Issue 678533002: Fix sky build on android (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « sky/BUILD.gn ('k') | sky/engine/public/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/BUILD.gn
diff --git a/sky/engine/platform/BUILD.gn b/sky/engine/platform/BUILD.gn
index 477790270ea57a9b0d6d0d5149a913ce476ba493..5f2ad24f3100f67462ec7a2aa55db0aed92ffa4f 100644
--- a/sky/engine/platform/BUILD.gn
+++ b/sky/engine/platform/BUILD.gn
@@ -5,7 +5,6 @@
import("//build/config/ui.gni")
import("//sky/engine/build/scripts/scripts.gni")
import("//sky/engine/config.gni")
-import("//third_party/yasm/yasm_assemble.gni")
# Most targets in this file are private actions so use that as the default.
visibility = [":*"]
@@ -754,16 +753,12 @@ 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" ]
- }
+ sources = [ "heap/asm/SaveRegisters_x86.asm" ]
yasm_flags = []
if (is_mac) {
@@ -779,11 +774,27 @@ yasm_assemble("heap_asm_stubs") {
}
} else if (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" ]
+ }
+}
+
+}
+
test("platform_unittests") {
visibility += ["//sky/*"]
output_name = "sky_platform_unittests"
« no previous file with comments | « sky/BUILD.gn ('k') | sky/engine/public/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698