[Driver][Fuchsia] Pass --hash-style=gnu to the linker

The .gnu_hash format is superior, and all versions of the Fuchsia
dynamic linker support it.

Differential Revision: https://reviews.llvm.org/D36254

llvm-svn: 310017
This commit is contained in:
Petr Hosek 2017-08-04 02:39:27 +00:00
parent 02aeadcf3d
commit 83214dfb01
2 changed files with 5 additions and 2 deletions

View File

@ -64,10 +64,12 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (Args.hasArg(options::OPT_s))
CmdArgs.push_back("-s");
if (Args.hasArg(options::OPT_r))
if (Args.hasArg(options::OPT_r)) {
CmdArgs.push_back("-r");
else
} else {
CmdArgs.push_back("--build-id");
CmdArgs.push_back("--hash-style=gnu");
}
CmdArgs.push_back("--eh-frame-hdr");

View File

@ -9,6 +9,7 @@
// CHECK: "--sysroot=[[SYSROOT]]"
// CHECK: "-pie"
// CHECK: "--build-id"
// CHECK: "--hash-style=gnu"
// CHECK: "-dynamic-linker" "ld.so.1"
// CHECK: Scrt1.o
// CHECK-NOT: crti.o