On OSX with LLVM 2.9, always generate position-independent code.

Fixes Issue #99.
This commit is contained in:
Matt Pharr
2011-09-17 13:03:23 -07:00
parent a501ab1aa6
commit de84acfa5d

View File

@@ -237,6 +237,9 @@ Target::GetTargetMachine() const {
llvm::TargetMachine *targetMachine =
target->createTargetMachine(triple, cpu, featuresString, relocModel);
#else
#ifdef ISPC_IS_APPLE
relocModel = llvm::Reloc::PIC_;
#endif // ISPC_IS_APPLE
std::string featuresString = cpu + std::string(",") + attributes;
llvm::TargetMachine *targetMachine =
target->createTargetMachine(triple, featuresString);