diff --git a/src/build/config/compiler/BUILD.gn b/src/build/config/compiler/BUILD.gn index 3117499a70..2d51a981b0 100644 --- a/src/build/config/compiler/BUILD.gn +++ b/src/build/config/compiler/BUILD.gn @@ -512,10 +512,18 @@ config("compiler") { cflags += [ "-pipe" ] } - ldflags += [ - "-Wl,-z,noexecstack", - "-Wl,-z,relro", - ] + if (current_cpu != "mipsel" && current_cpu != "mips64el") { + ldflags += [ + "-Wl,-z,noexecstack", + "-Wl,-z,relro", + ] + } else { + ldflags += [ + # https://github.com/llvm/llvm-project/pull/124068 + "-Wl,-z,execstack", + "-Wl,-z,relro", + ] + } if (!is_component_build) { ldflags += [ "-Wl,-z,now" ]