llvm.org GIT mirror llvm / 801676c
[ExecutionEngine] After a heroic dev-meeting hack session, the JIT supports TLS. Turns on EmulatedTLS support by default in EngineBuilder. ;) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316200 91177308-0d34-0410-b5e6-96231b3b80d8 Lang Hames 2 years ago
4 changed file(s) with 27 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
540540 SmallVector MAttrs;
541541 bool VerifyModules;
542542 bool UseOrcMCJITReplacement;
543 bool EmulatedTLS = true;
543544
544545 public:
545546 /// Default constructor for EngineBuilder.
640641 this->UseOrcMCJITReplacement = UseOrcMCJITReplacement;
641642 }
642643
644 void setEmulatedTLS(bool EmulatedTLS) {
645 this->EmulatedTLS = EmulatedTLS;
646 }
647
643648 TargetMachine *selectTarget();
644649
645650 /// selectTarget - Pick a target either via -march or by guessing the native
9494 TargetMachine *Target =
9595 TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr,
9696 Options, RelocModel, CMModel, OptLevel,
97 /*JIT*/ true);
97 /*JIT*/ true);
98 Target->Options.EmulatedTLS = EmulatedTLS;
9899 assert(Target && "Could not allocate target machine!");
99100 return Target;
100101 }
0 ; RUN: %lli %s > /dev/null
1
2 @x = thread_local local_unnamed_addr global i32 0
3
4 define i32 @main() {
5 entry:
6 store i32 42, i32* @x
7 ret i32 0
8 }
9
0 ; RUN: %lli %s > /dev/null
1
2 @x = thread_local local_unnamed_addr global i32 0
3
4 define i32 @main() {
5 entry:
6 store i32 42, i32* @x
7 ret i32 0
8 }
9