diff --git a/README.md b/README.md index ad4cfed2..fdf8e7e9 100755 --- a/README.md +++ b/README.md @@ -198,6 +198,7 @@ Configure Xcode targets that **should use** XCRemoteCache: * `LD` - location of `xcld` (e.g. `xcremotecache/xcld`) * `LDPLUSPLUS` - location of `xcldplusplus` (e.g. `xcremotecache/xcldplusplus`) * `XCRC_PLATFORM_PREFERRED_ARCH` - `$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(PLATFORM_PREFERRED_ARCH):dir:standardizepath:file:default=arm64)` +* `SWIFT_USE_INTEGRATED_DRIVER` - `NO` (required in Xcode 14.0+)
Screenshot @@ -417,6 +418,7 @@ Note: This setup is not recommended and may not be supported in future XCRemoteC * Swift Package Manager (SPM) dependencies are not supported. _Because SPM does not allow customizing Build Settings, XCRemoteCache cannot specify `clang` and `swiftc` wrappers that control if the local compilation should be skipped (cache hit) or not (cache miss)_ * Filenames with `_vers.c` suffix are reserved and cannot be used as a source file * All compilation files should be referenced via the git repo root. Referencing `/AbsolutePath/someOther.swift` or `../../someOther.swift` that resolve to the location outside of the git repo root is prohibited. +* The new Swift driver (introduced by default in Xcode 14.0) is not supported and has to be disabled when using XCRemoteCache ## FAQ diff --git a/Sources/XCRemoteCache/Commands/Prepare/Integrate/BuildSettingsIntegrateAppender.swift b/Sources/XCRemoteCache/Commands/Prepare/Integrate/BuildSettingsIntegrateAppender.swift index 64bdbdd1..85d08cb5 100644 --- a/Sources/XCRemoteCache/Commands/Prepare/Integrate/BuildSettingsIntegrateAppender.swift +++ b/Sources/XCRemoteCache/Commands/Prepare/Integrate/BuildSettingsIntegrateAppender.swift @@ -44,6 +44,7 @@ class XcodeProjBuildSettingsIntegrateAppender: BuildSettingsIntegrateAppender { func appendToBuildSettings(buildSettings: BuildSettings, wrappers: XCRCBinariesPaths) -> BuildSettings { var result = buildSettings result["SWIFT_EXEC"] = wrappers.swiftc.path + result["SWIFT_USE_INTEGRATED_DRIVER"] = "NO" // When generating artifacts, no need to shell-out all compilation commands to our wrappers if case .consumer = mode { result["CC"] = wrappers.cc.path diff --git a/cocoapods-plugin/lib/cocoapods-xcremotecache/command/hooks.rb b/cocoapods-plugin/lib/cocoapods-xcremotecache/command/hooks.rb index 02cd75f8..474064f3 100644 --- a/cocoapods-plugin/lib/cocoapods-xcremotecache/command/hooks.rb +++ b/cocoapods-plugin/lib/cocoapods-xcremotecache/command/hooks.rb @@ -128,6 +128,7 @@ def self.enable_xcremotecache(target, repo_distance, xc_location, xc_cc_path, mo config.build_settings['LIBTOOL'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xclibtool"] config.build_settings['LD'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcld"] config.build_settings['LDPLUSPLUS'] = ["$SRCROOT/#{srcroot_relative_xc_location}/xcldplusplus"] + config.build_settings['SWIFT_USE_INTEGRATED_DRIVER'] = ['NO'] config.build_settings['XCREMOTE_CACHE_FAKE_SRCROOT'] = fake_src_root config.build_settings['XCRC_PLATFORM_PREFERRED_ARCH'] = ["$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(PLATFORM_PREFERRED_ARCH):dir:standardizepath:file:default=arm64)"] @@ -215,6 +216,7 @@ def self.disable_xcremotecache_for_target(target) config.build_settings.delete('LIBTOOL') if config.build_settings.key?('LIBTOOL') config.build_settings.delete('LD') if config.build_settings.key?('LD') config.build_settings.delete('LDPLUSPLUS') if config.build_settings.key?('LDPLUSPLUS') + config.build_settings.delete('SWIFT_USE_INTEGRATED_DRIVER') if config.build_settings.key?('SWIFT_USE_INTEGRATED_DRIVER') # Remove Fake src root for ObjC & Swift config.build_settings.delete('XCREMOTE_CACHE_FAKE_SRCROOT') config.build_settings.delete('XCRC_PLATFORM_PREFERRED_ARCH')