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

Unified Diff: Source/platform/BUILD.gn

Issue 336633003: GN: Add disabled-by-default heap asm rules (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
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 8fb6f1f888512e37ca4a5e037831fdd01acc1848..60edf06e23a7b41036dcba6f642eaf7eac8077c8 100644
--- a/Source/platform/BUILD.gn
+++ b/Source/platform/BUILD.gn
@@ -7,17 +7,28 @@ import("//third_party/WebKit/Source/build/scripts/scripts.gni")
import("//third_party/WebKit/Source/config.gni")
import("//third_party/WebKit/Source/platform/platform_generated.gni")
+# TODO(GYP) Remove when heap targets work
+enable_blink_platform_heap_targets = false
+
+
+if (enable_blink_platform_heap_targets) {
+import("//third_party/yasm/yasm_assemble.gni")
+}
+
platform_gypi = exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("blink_platform.gypi") ],
"scope",
[ "blink_platform.gypi" ])
-# TODO(GYP) Uncomment when the targets below that need this value are enabled.
-#heap_gypi = exec_script(
-# "//build/gypi_to_gn.py",
-# [ rebase_path("heap/blink_heap.gypi") ],
-# "scope",
-# [ "heap/blink_heap.gypi" ])
+
+if (enable_blink_platform_heap_targets) {
+heap_gypi = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("heap/blink_heap.gypi") ],
+ "scope",
+ [ "heap/blink_heap.gypi" ])
+}
+
blink_platform_neon_files = [
"graphics/cpu/arm/WebGLImageConversionNEON.h",
"graphics/cpu/arm/filters/FEBlendNEON.h",
@@ -202,10 +213,13 @@ component("platform") {
"//third_party/WebKit/Source/wtf",
"//third_party/WebKit/Source/platform/heap",
"//url",
- #'blink_heap_asm_stubs',
"//v8",
]
+ if (enable_blink_platform_heap_targets) {
+ deps += [ ":heap_asm_stubs" ]
+ }
+
forward_dependent_configs_from = [
"//gpu/command_buffer/client:gles2_c_lib",
"//skia",
@@ -333,6 +347,41 @@ component("platform") {
}
}
+
+if (enable_blink_platform_heap_targets) {
+
+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" ]
+ }
+
+ yasm_flags = []
+ if (is_mac) {
+ # Necessary to ensure symbols end up with a _ prefix; added by
+ # yasm_compile.gypi for Windows, but not Mac.
+ yasm_flags += [ "-DPREFIX" ]
+ }
+ if (cpu_arch == "x64") {
+ if (is_win) {
+ yasm_flags += [ "-DX64WIN=1" ]
+ } else {
+ yasm_flags += [ "-DX64POSIX=1" ]
+ }
+ } else if (cpu_arch == "x86") {
+ yasm_flags += [ "-DIA32=1" ]
+ } else if (cpu_arch == "arm") {
+ yasm_flags += [ "-DARM=1" ]
+ }
+}
+
+}
+
source_set("heap_run_all_tests") {
sources = [
"heap/RunAllTests.cpp"
@@ -352,8 +401,7 @@ source_set("heap_run_all_tests") {
]
}
-# TODO(GYP) enable this target when it links (blocked on WebP symbols).
-if (false) {
+if (enable_blink_platform_heap_targets) {
test("heap_unittests") {
output_name = "blink_heap_unittests"
@@ -376,7 +424,7 @@ test("heap_unittests") {
]
}
-} # TODO(GYP)
+}
source_set("platform_run_all_tests") {
sources = [
« 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