Skip to content

[Cygwin] Enable TLS on Cygwin target #138618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion clang/lib/Basic/Targets/X86.h
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,6 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_64TargetInfo : public X86_64TargetInfo {
CygwinX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
: X86_64TargetInfo(Triple, Opts) {
this->WCharType = TargetInfo::UnsignedShort;
TLSSupported = false;
}

void getTargetDefines(const LangOptions &Opts,
Expand Down
6 changes: 6 additions & 0 deletions clang/test/Driver/emulated-tls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// RUN: | FileCheck -check-prefix=NOEMU %s
// RUN: %clang -### --target=i686-pc-cygwin %s 2>&1 \
// RUN: | FileCheck -check-prefix=EMU %s
// RUN: %clang -### --target=x86_64-pc-cygwin %s 2>&1 \
// RUN: | FileCheck -check-prefix=EMU %s
// RUN: %clang -### --target=i686-pc-openbsd %s 2>&1 \
// RUN: | FileCheck -check-prefix=EMU %s

Expand All @@ -17,6 +19,8 @@
// RUN: | FileCheck -check-prefix=EMU %s
// RUN: %clang -### -target i686-pc-cygwin %s -fno-emulated-tls -femulated-tls 2>&1 \
// RUN: | FileCheck -check-prefix=EMU %s
// RUN: %clang -### -target x86_64-pc-cygwin %s -fno-emulated-tls -femulated-tls 2>&1 \
// RUN: | FileCheck -check-prefix=EMU %s
// RUN: %clang -### -target i686-pc-openbsd %s -fno-emulated-tls -femulated-tls 2>&1 \
// RUN: | FileCheck -check-prefix=EMU %s

Expand All @@ -26,6 +30,8 @@
// RUN: | FileCheck -check-prefix=NOEMU %s
// RUN: %clang -### -target i686-pc-cygwin %s -femulated-tls -fno-emulated-tls 2>&1 \
// RUN: | FileCheck -check-prefix=NOEMU %s
// RUN: %clang -### -target x86_64-pc-cygwin %s -femulated-tls -fno-emulated-tls 2>&1 \
// RUN: | FileCheck -check-prefix=NOEMU %s
// RUN: %clang -### -target i686-pc-openbsd %s -femulated-tls -fno-emulated-tls 2>&1 \
// RUN: | FileCheck -check-prefix=NOEMU %s

Expand Down