SmallVector<std::string, 4> MAttrs;
bool VerifyModules;
bool UseOrcMCJITReplacement;
+ bool EmulatedTLS = true;
public:
/// Default constructor for EngineBuilder.
this->UseOrcMCJITReplacement = UseOrcMCJITReplacement;
}
+ void setEmulatedTLS(bool EmulatedTLS) {
+ this->EmulatedTLS = EmulatedTLS;
+ }
+
TargetMachine *selectTarget();
/// selectTarget - Pick a target either via -march or by guessing the native
TargetMachine *Target =
TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
Options, RelocModel, CMModel, OptLevel,
- /*JIT*/ true);
+ /*JIT*/ true);
+ Target->Options.EmulatedTLS = EmulatedTLS;
assert(Target && "Could not allocate target machine!");
return Target;
}
--- /dev/null
+; RUN: %lli %s > /dev/null
+
+@x = thread_local local_unnamed_addr global i32 0
+
+define i32 @main() {
+entry:
+ store i32 42, i32* @x
+ ret i32 0
+}
+
--- /dev/null
+; RUN: %lli %s > /dev/null
+
+@x = thread_local local_unnamed_addr global i32 0
+
+define i32 @main() {
+entry:
+ store i32 42, i32* @x
+ ret i32 0
+}
+