Skip to content

Swift: restore compatibility with old C++ driver

YR Chen requested to merge stevapple/cmake:swift-old-driver into master

Although official releases now default to the new Swift Driver, the old C++ driver for Swift is still used in earlier toolchains and the stage-0 compiler on platforms without early Swift Driver.

!7741 (merged) introduced default Whole Module Optimization for release builds, but we later found that the C++ driver behaves differently under WMO, resulting in unexpected build failures. This MR tries to revert the WMO change for legacy driver, and introduce CMAKE_Swift_COMPILER_USE_OLD_DRIVER flag internally for whether the old driver is used.

Fixes: #24641 (closed)
Backport: release

Edited by Brad King

Merge request reports