Skip to content

Commit

Permalink
Update patch for config/compiler/BUILD.gn
Browse files Browse the repository at this point in the history
  • Loading branch information
bblanchon committed May 16, 2023
1 parent f846beb commit bcb7a36
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions patches/musl/build.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index 427296f35..cb62abf69 100644
index cbf73722e..73b048a6a 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -339,7 +339,7 @@ config("compiler") {
}
@@ -362,7 +362,7 @@ config("compiler") {
}

# The x86 toolchain currently has problems with stack-protector.
- if (is_android && current_cpu == "x86") {
+ if ((is_android || is_musl) && current_cpu == "x86") {
cflags += [ "-fno-stack-protector" ]
} else if (current_os != "aix") {
# Not available on aix.
# The x86 toolchain currently has problems with stack-protector.
- if (is_android && current_cpu == "x86") {
+ if ((is_android || is_musl) && current_cpu == "x86") {
cflags += [ "-fno-stack-protector" ]
} else if (current_os != "aix") {
# Not available on aix.
26 changes: 13 additions & 13 deletions patches/wasm/build.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index ba1a6222e..33052be60 100644
index cbf73722e..34f92c793 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -270,6 +270,8 @@ config("compiler") {
@@ -293,6 +293,8 @@ config("compiler") {
configs += [ "//build/config/aix:compiler" ]
} else if (current_os == "zos") {
configs += [ "//build/config/zos:compiler" ]
Expand All @@ -11,20 +11,20 @@ index ba1a6222e..33052be60 100644
}

configs += [
@@ -326,7 +328,7 @@ config("compiler") {
# The x86 toolchain currently has problems with stack-protector.
if (is_android && current_cpu == "x86") {
cflags += [ "-fno-stack-protector" ]
- } else if (current_os != "aix") {
+ } else if (current_os != "aix" && current_os != "wasm") {
# Not available on aix.
cflags += [ "-fstack-protector" ]
}
@@ -364,7 +366,7 @@ config("compiler") {
# The x86 toolchain currently has problems with stack-protector.
if (is_android && current_cpu == "x86") {
cflags += [ "-fno-stack-protector" ]
- } else if (current_os != "aix") {
+ } else if (current_os != "aix" && current_os != "wasm") {
# Not available on aix.
cflags += [ "-fstack-protector" ]
}
diff --git a/toolchain/toolchain.gni b/toolchain/toolchain.gni
index 98b23fd70..30197335d 100644
index 42973fa82..f46dcde12 100644
--- a/toolchain/toolchain.gni
+++ b/toolchain/toolchain.gni
@@ -47,6 +47,8 @@ if (is_apple) {
@@ -52,6 +52,8 @@ if (is_apple) {
shlib_extension = ".so"
} else if (is_win) {
shlib_extension = ".dll"
Expand Down

0 comments on commit bcb7a36

Please sign in to comment.