[PATCH] Introduce new gold plugin option "relocation-pic"
Alexey Volkov
avolkov.intel at gmail.com
Fri Apr 4 05:02:42 PDT 2014
I updated patch to the current trunk.
Alexey, could you check if interaction between -static and Sanitize.hasZeroBaseShadow() is correct?
Hi rafael,
http://llvm-reviews.chandlerc.com/D2668
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D2668?vs=7051&id=8367#toc
Files:
lib/Driver/Tools.cpp
test/Driver/gold-lto.c
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -6841,7 +6841,8 @@
ToolChain.getTriple().getEnvironment() == llvm::Triple::Android;
const bool IsPIE =
!Args.hasArg(options::OPT_shared) &&
- (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
+ !Args.hasArg(options::OPT_static) &&
+ (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault() || isAndroid);
ArgStringList CmdArgs;
Index: test/Driver/gold-lto.c
===================================================================
--- test/Driver/gold-lto.c
+++ test/Driver/gold-lto.c
@@ -19,3 +19,8 @@
// CHECK-ARM-V7A: "-plugin" "{{.*}}/LLVMgold.so"
// CHECK-ARM-V7A: "-plugin-opt=mcpu=cortex-a8"
// CHECK-ARM-V7A: "-plugin-opt=foo"
+//
+// RUN: %clang -target i686-linux-android -### %t.o -flto 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-X86-ANDROID
+// CHECK-X86-ANDROID: "-pie"
+// CHECK-X86-ANDROID: "-plugin" "{{.*}}/LLVMgold.so"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2668.3.patch
Type: text/x-patch
Size: 1039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140404/c0f8f445/attachment.bin>
More information about the llvm-commits
mailing list