forked from pool/nodejs-electron
60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
|
|
Compile files which declare functions in inline assembly without LTO due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703
|
||
|
|
|
||
|
|
--- src/base/allocator/partition_allocator/BUILD.gn.old 2022-10-01 13:53:03.367797474 +0200
|
||
|
|
+++ src/base/allocator/partition_allocator/BUILD.gn 2022-10-05 14:23:53.999860356 +0200
|
||
|
|
@@ -51,6 +51,22 @@
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
+source_set("partition_alloc_asm") {
|
||
|
|
+ defines = [ "PA_PCSCAN_STACK_SUPPORTED" ]
|
||
|
|
+ cflags = [ "-fno-lto" ]
|
||
|
|
+ if (current_cpu == "x64") {
|
||
|
|
+ sources = [ "starscan/stack/asm/x64/push_registers_asm.cc" ]
|
||
|
|
+ } else if (current_cpu == "x86") {
|
||
|
|
+ sources = [ "starscan/stack/asm/x86/push_registers_asm.cc" ]
|
||
|
|
+ } else if (current_cpu == "arm") {
|
||
|
|
+ sources = [ "starscan/stack/asm/arm/push_registers_asm.cc" ]
|
||
|
|
+ } else if (current_cpu == "arm64") {
|
||
|
|
+ sources = [ "starscan/stack/asm/arm64/push_registers_asm.cc" ]
|
||
|
|
+ } else {
|
||
|
|
+ # To support a trampoline for another arch, please refer to v8/src/heap/base.
|
||
|
|
+ }
|
||
|
|
+}
|
||
|
|
+
|
||
|
|
target(partition_alloc_target_type, "partition_alloc") {
|
||
|
|
sources = [
|
||
|
|
"address_pool_manager.cc",
|
||
|
|
@@ -262,20 +278,10 @@
|
||
|
|
"partition_alloc_base/mac/scoped_typeref.h",
|
||
|
|
]
|
||
|
|
}
|
||
|
|
- if (current_cpu == "x64") {
|
||
|
|
- defines += [ "PA_PCSCAN_STACK_SUPPORTED" ]
|
||
|
|
- sources += [ "starscan/stack/asm/x64/push_registers_asm.cc" ]
|
||
|
|
- } else if (current_cpu == "x86") {
|
||
|
|
- defines += [ "PA_PCSCAN_STACK_SUPPORTED" ]
|
||
|
|
- sources += [ "starscan/stack/asm/x86/push_registers_asm.cc" ]
|
||
|
|
- } else if (current_cpu == "arm") {
|
||
|
|
- defines += [ "PA_PCSCAN_STACK_SUPPORTED" ]
|
||
|
|
- sources += [ "starscan/stack/asm/arm/push_registers_asm.cc" ]
|
||
|
|
- } else if (current_cpu == "arm64") {
|
||
|
|
+ deps = []
|
||
|
|
+ if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64") {
|
||
|
|
defines += [ "PA_PCSCAN_STACK_SUPPORTED" ]
|
||
|
|
- sources += [ "starscan/stack/asm/arm64/push_registers_asm.cc" ]
|
||
|
|
- } else {
|
||
|
|
- # To support a trampoline for another arch, please refer to v8/src/heap/base.
|
||
|
|
+ deps += [ ":partition_alloc_asm" ]
|
||
|
|
}
|
||
|
|
public_deps = [
|
||
|
|
":chromecast_buildflags",
|
||
|
|
@@ -289,7 +295,6 @@
|
||
|
|
":partition_alloc_implementation",
|
||
|
|
":memory_tagging",
|
||
|
|
]
|
||
|
|
- deps = []
|
||
|
|
public_configs = []
|
||
|
|
if (is_android) {
|
||
|
|
# tagging.cc requires __arm_mte_set_* functions.
|