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

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 19:40:23 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL310017: [Driver][Fuchsia] Pass --hash-style=gnu to the linker (authored by phosek).

Changed prior to commit:
  https://reviews.llvm.org/D36254?vs=109603&id=109677#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36254

Files:
  cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp
  cfe/trunk/test/Driver/fuchsia.c


Index: cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Fuchsia.cpp
@@ -64,10 +64,12 @@
   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");
 
Index: cfe/trunk/test/Driver/fuchsia.c
===================================================================
--- cfe/trunk/test/Driver/fuchsia.c
+++ cfe/trunk/test/Driver/fuchsia.c
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36254.109677.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170804/92df098d/attachment-0001.bin>


More information about the cfe-commits mailing list