summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-04-08 21:09:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-04-08 21:09:51 +0000
commit097d019c6cbdea0eb01b6fec659173925ba5a85e (patch)
tree43fd84aea2cee2194463e02a103b4f10d72e7e08 /clang/lib/CodeGen/BackendUtil.cpp
parentbb6ff08766f3348a3e76d42d9fb8adacfaac8827 (diff)
downloadbcm5719-llvm-097d019c6cbdea0eb01b6fec659173925ba5a85e.tar.gz
bcm5719-llvm-097d019c6cbdea0eb01b6fec659173925ba5a85e.zip
Wire up -fpie and -fPIE to LLVM's newly added TargetOptions. No test
case as we don't currently have any way of dumping target options or otherwise observing this. Another small step toward fixing PR12380. With this we generate TLS accesses using the static model instead of the dynamic model, but we're still generating suboptimal code under the mistaken assumption that the TLS offset might be greater than 2^32, and therefor not viable as an immediate offset of a segment register. llvm-svn: 154298
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index edc3a47186c..2f44711b607 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -344,6 +344,7 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
Options.RealignStack = CodeGenOpts.StackRealignment;
Options.DisableTailCalls = CodeGenOpts.DisableTailCalls;
Options.TrapFuncName = CodeGenOpts.TrapFuncName;
+ Options.PositionIndependentExecutable = LangOpts.PIELevel != 0;
TargetMachine *TM = TheTarget->createTargetMachine(Triple, TargetOpts.CPU,
FeaturesStr, Options,
OpenPOWER on IntegriCloud