mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Toolchains] Cygwin toolchain inherits from Unix
There is currently a great deal of duplication across the `GenericUnix` and `Windows` toolchains. The Android port will add even more duplication. To mitigate this, have `Windows` inherit from `GenericUnix`, and have them share most of their implementation. In addition, rename `Windows` to `Cygwin` (it would be pretty strange to have a `Windows` toolchain inherit from something named `*Unix`).
This commit is contained in:
@@ -2035,7 +2035,7 @@ const ToolChain *Driver::getToolChain(const ArgList &Args) const {
|
||||
TC = new toolchains::GenericUnix(*this, Target);
|
||||
break;
|
||||
case llvm::Triple::Win32:
|
||||
TC = new toolchains::Windows(*this, Target);
|
||||
TC = new toolchains::Cygwin(*this, Target);
|
||||
break;
|
||||
default:
|
||||
TC = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user