Skip to content

Conversation

@mateuuszzzzz
Copy link

@mateuuszzzzz mateuuszzzzz commented Nov 24, 2025

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:

  1. Instead of overriding CC, LD, CXX, and LDPLUSPLUS, we must now use the build setting C_COMPILER_LAUNCHER. This setting points to a universal C/C++ launcher.
  2. An additional flag, CLANG_ENABLE_EXPLICIT_MODULES_WITH_COMPILER_LAUNCHER, must be explicitly set to YES to enable correct compilation of explicit modules when a launcher is present.

Changelog:

[IOS][FIXED] ccache functionality 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:

  1. Install pods for RNtester with USE_CCACHE=1 bundle exec pod install.
  2. Build RNTester app for iOS. Check if cache is populated with ccache -s (the first run should show cache misses).
  3. Delete build cache including derived data.
  4. Build RNtester again. ccache -s should show cache hits, confirming the launcher integration works correctly.

@meta-cla
Copy link

meta-cla bot commented Nov 24, 2025

Hi @mateuuszzzzz!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

config.build_settings["CXX"] = ccache_clangpp_sh
config.build_settings["LDPLUSPLUS"] = ccache_clangpp_sh
config.build_settings["CCACHE_BINARY"] = ccache_path
config.build_settings["C_COMPILER_LAUNCHER"] = c_compiler_launcher
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context:

Without this change we would see lots of repeated warnings during build:

Explicit modules is enabled but the compiler was not recognized; disable explicit modules with
CLANG_ENABLE_EXPLICIT_MODULES=NO, or use
C_COMPILER_LAUNCHER with CLANG_ENABLE_EXPLICIT_MODULES_WITH_COMPILER_LAUNCHER=YES if using a compatible launcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant