aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCSubtarget.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-17 18:55:48 +0000
committerChris Lattner <sabre@nondot.org>2005-11-17 18:55:48 +0000
commit1d05cb47a94bb5639b690519c6027447791e06f7 (patch)
treef0af396ca34ac0b18e55a136a36a34dff70b0e1c /lib/Target/PowerPC/PPCSubtarget.cpp
parent1df747867cc1e7d37447bc3072e55e380c6720e8 (diff)
add an option to generate completely non-pic code, corresponding to what
gcc -static produces on PPC. This is used for building kexts and other things. With this, materializing the address of a global looks like: lis r2, ha16(L_H$non_lazy_ptr) la r3, lo16(L_H$non_lazy_ptr)(r2) we're still emitting stubs for functions, which is wrong. That is next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r--lib/Target/PowerPC/PPCSubtarget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp
index 442017d8cd..f43c18d7df 100644
--- a/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -19,6 +19,7 @@
using namespace llvm;
PPCTargetEnum llvm::PPCTarget = TargetDefault;
+bool llvm::PPCGenerateStaticCode = false;
namespace llvm {
cl::opt<PPCTargetEnum, true>
@@ -29,6 +30,11 @@ namespace llvm {
" Enable Darwin codegen"),
clEnumValEnd),
cl::location(PPCTarget), cl::init(TargetDefault));
+
+ cl::opt<bool, true>
+ PPCStaticCode("ppc-static",
+ cl::desc("PowerPC: generate completely non-pic code"),
+ cl::location(PPCGenerateStaticCode));
}
#if defined(__APPLE__)