fix: Bring back ccache support on new Xcode versions
#54645
Draft
+28
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This Pull Request updates the build configuration to maintain compatibility with custom compiler launchers (
ccache) in Xcode versions 16 and newer.On newer Xcode versions, the method for using a custom compiler launcher has changed:
CC,LD,CXX, andLDPLUSPLUS, we must now use the build settingC_COMPILER_LAUNCHER. This setting points to a universal C/C++ launcher.CLANG_ENABLE_EXPLICIT_MODULES_WITH_COMPILER_LAUNCHER, must be explicitly set toYESto enable correct compilation of explicit modules when a launcher is present.Changelog:
[IOS][FIXED]
ccachefunctionality is restored for Xcode/xcodebuild versions >=16.[IOS][BREAKING] This change removes ccache support for older Xcode versions that do not recognise the new compiler launcher settings. (Not sure if this is needed for backward compatibility, but it shouldn’t be difficult to add)
Test Plan:
USE_CCACHE=1 bundle exec pod install.RNTesterapp for iOS. Check if cache is populated withccache -s(the first run should show cache misses).RNtesteragain.ccache -sshould show cache hits, confirming the launcher integration works correctly.