forked from OSchip/llvm-project
[Driver] Make --execute-only the default for aarch64-fuchsia
Clang already generates code that doesn't use writeable data in executable sections so the linker flag is all that is necessary. -Wl,--no-execute-only can be used to turn this default off. Differential Revision: https://reviews.llvm.org/D134289
This commit is contained in:
parent
2e58d3e334
commit
16f735d2fb
|
@ -87,6 +87,8 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
|
||||
if (ToolChain.getArch() == llvm::Triple::aarch64) {
|
||||
CmdArgs.push_back("--execute-only");
|
||||
|
||||
std::string CPU = getCPUName(D, Args, Triple);
|
||||
if (CPU.empty() || CPU == "generic" || CPU == "cortex-a53")
|
||||
CmdArgs.push_back("--fix-cortex-a53-843419");
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
// CHECK: "-pie"
|
||||
// CHECK: "--build-id"
|
||||
// CHECK: "--hash-style=gnu"
|
||||
// CHECK-AARCH64: "--fix-cortex-a53-843419"
|
||||
// CHECK-AARCH64: "--execute-only" "--fix-cortex-a53-843419"
|
||||
// CHECK: "-dynamic-linker" "ld.so.1"
|
||||
// CHECK-RISCV64: "-X"
|
||||
// CHECK: Scrt1.o
|
||||
|
|
Loading…
Reference in New Issue