[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 22 16:24:05 PDT 2025
================
@@ -180,35 +170,14 @@ bool InitHeaderSearch::AddUnmappedPath(const Twine &Path, IncludeDirGroup Group,
return false;
}
-void InitHeaderSearch::AddMinGWCPlusPlusIncludePaths(StringRef Base,
- StringRef Arch,
- StringRef Version) {
- AddPath(Base + "/" + Arch + "/" + Version + "/include/c++",
- CXXSystem, false);
- AddPath(Base + "/" + Arch + "/" + Version + "/include/c++/" + Arch,
- CXXSystem, false);
- AddPath(Base + "/" + Arch + "/" + Version + "/include/c++/backward",
- CXXSystem, false);
-}
-
void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) {
if (!ShouldAddDefaultIncludePaths(triple))
llvm_unreachable("Include management is handled in the driver.");
- llvm::Triple::OSType os = triple.getOS();
-
if (HSOpts.UseStandardSystemIncludes) {
- switch (os) {
- case llvm::Triple::Win32:
- if (triple.getEnvironment() != llvm::Triple::Cygnus)
- break;
- [[fallthrough]];
- default:
- // FIXME: temporary hack: hard-coded paths.
- AddPath("/usr/local/include", System, false);
- break;
- }
+ // FIXME: temporary hack: hard-coded paths.
----------------
brad0 wrote:
> Won't this change here cause win32-non-cygwin (e.g. mingw) to end up adding this path, where it wasn't added before?
No, adding Win32 to ShouldAddDefaultIncludePaths means not utilizing this code path.
> Then again, it looks like the removed switch below indicates that we never hit the win32 case here before, except for cygwin.
Correct.
https://github.com/llvm/llvm-project/pull/135691
More information about the cfe-commits
mailing list