Skip to content

Commit 04116bc

Browse files
committed
Enable swift-driver forwarding on non-Apple platforms.
This removes the `#ifdef __APPLE__` guard that restricts this forwarding to Apple platforms only. If a given build/toolchain does not build or include the `swift-driver` executable alongside the compiler executables, the driver will still safely default to the legacy driver. Resolves rdar://75534188
1 parent 99c521b commit 04116bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/driver/driver.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,18 +158,18 @@ static bool appendSwiftDriverName(SmallString<256> &buffer) {
158158
llvm::sys::path::append(buffer, *driverNameOp);
159159
return true;
160160
}
161-
#ifdef __APPLE__
162-
// FIXME: use swift-driver as the default driver for all platforms.
161+
163162
llvm::sys::path::append(buffer, "swift-driver");
164163
if (llvm::sys::fs::exists(buffer)) {
165164
return true;
166165
}
167166
llvm::sys::path::remove_filename(buffer);
168167
llvm::sys::path::append(buffer, "swift-driver-new");
169-
return true;
170-
#else
168+
if (llvm::sys::fs::exists(buffer)) {
169+
return true;
170+
}
171+
171172
return false;
172-
#endif
173173
}
174174

175175
static int run_driver(StringRef ExecName,

0 commit comments

Comments
 (0)