forked from OSchip/llvm-project
[Cygwin] Enable TLS as emutls.
It resolves clang selfhosting with std::once() for Cygwin. FIXME: It may be EmulatedTLS-generic also for X86-Android. FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls. llvm-svn: 256134
This commit is contained in:
parent
ecba4c3d0b
commit
9ec6a826dd
|
@ -3834,7 +3834,6 @@ class CygwinX86_32TargetInfo : public X86_32TargetInfo {
|
|||
public:
|
||||
CygwinX86_32TargetInfo(const llvm::Triple &Triple)
|
||||
: X86_32TargetInfo(Triple) {
|
||||
TLSSupported = false;
|
||||
WCharType = UnsignedShort;
|
||||
DoubleAlign = LongLongAlign = 64;
|
||||
DataLayoutString = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32";
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s
|
||||
// REQUIRES: tls
|
||||
|
||||
template<typename T> concept thread_local bool VCTL = true; // expected-error {{variable concept cannot be declared 'thread_local'}}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DLAMBDA -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=TLS-LAMBDA %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -x c++ -fblocks -DBLOCKS -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=TLS-BLOCKS %s
|
||||
// RUN: %clang_cc1 -verify -fopenmp -x c++ -std=c++11 -DARRAY -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck -check-prefix=TLS-ARRAY %s
|
||||
// REQUIRES: tls
|
||||
// expected-no-diagnostics
|
||||
#ifndef ARRAY
|
||||
#ifndef HEADER
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
// RUN: %clang_cc1 -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-1
|
||||
// RUN: %clang_cc1 -fopenmp -emit-llvm -chain-include %s -chain-include %s %s -o - | FileCheck %s -check-prefix=CHECK-TLS-2
|
||||
|
||||
// REQUIRES: tls
|
||||
|
||||
#if !defined(PASS1)
|
||||
#define PASS1
|
||||
|
||||
|
|
|
@ -105,6 +105,14 @@ Changes to the PowerPC Target
|
|||
During this release ...
|
||||
|
||||
|
||||
Changes to the X86 Target
|
||||
-----------------------------
|
||||
|
||||
During this release ...
|
||||
|
||||
* TLS is enabled for Cygwin as emutls.
|
||||
|
||||
|
||||
Changes to the OCaml bindings
|
||||
-----------------------------
|
||||
|
||||
|
|
|
@ -12258,6 +12258,12 @@ SDValue
|
|||
X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const {
|
||||
|
||||
GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
|
||||
|
||||
// Cygwin uses emutls.
|
||||
// FIXME: It may be EmulatedTLS-generic also for X86-Android.
|
||||
if (Subtarget->isTargetWindowsCygwin())
|
||||
return LowerToTLSEmulatedModel(GA, DAG);
|
||||
|
||||
const GlobalValue *GV = GA->getGlobal();
|
||||
auto PtrVT = getPointerTy(DAG.getDataLayout());
|
||||
|
||||
|
|
Loading…
Reference in New Issue