[clang] [Cygwin] Cygwin basic support (PR #74868)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 09:02:15 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver
Author: εΎζζ Xu Chiheng (xu-chiheng)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/74868.diff
2 Files Affected:
- (modified) clang/lib/Basic/Targets/X86.h (+4-1)
- (modified) clang/lib/Driver/ToolChains/Clang.cpp (+3-1)
``````````diff
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h
index 0ab1c10833db2..e77e1e690cfc0 100644
--- a/clang/lib/Basic/Targets/X86.h
+++ b/clang/lib/Basic/Targets/X86.h
@@ -905,7 +905,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,
@@ -919,6 +918,10 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_64TargetInfo : public X86_64TargetInfo {
if (Opts.CPlusPlus)
Builder.defineMacro("_GNU_SOURCE");
}
+
+ BuiltinVaListKind getBuiltinVaListKind() const override {
+ return TargetInfo::CharPtrBuiltinVaList;
+ }
};
class LLVM_LIBRARY_VISIBILITY DarwinX86_64TargetInfo
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index eb26bfade47b7..8b38c9e386d76 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6656,7 +6656,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// -fuse-cxa-atexit is default.
if (!Args.hasFlag(
options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit,
- !RawTriple.isOSAIX() && !RawTriple.isOSWindows() &&
+ !RawTriple.isOSAIX()
+ && !RawTriple.isWindowsGNUEnvironment()
+ && !RawTriple.isWindowsMSVCEnvironment() &&
((RawTriple.getVendor() != llvm::Triple::MipsTechnologies) ||
RawTriple.hasEnvironment())) ||
KernelOrKext)
``````````
</details>
https://github.com/llvm/llvm-project/pull/74868
More information about the cfe-commits
mailing list