-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Add CCACHE_BINARY path to Xcode build settings and use it in ccache scripts #48257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ccache_compiler_and_linker_build_settings
The `$CCACHE_BINARY` env is set at `pod install` time when the USE_CCACHE flag is 1. This fixes ccache not found facebook#46126 as the ccache path is directly used.
Hi @ste7en! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
@ste7en thanks for the fix! Could you sign the CLA, please? Otherwise I'm not allowed to import the PR in our repo! |
Sure @cipolleschi, didn't know about the CLA. Just signed it, thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@cipolleschi merged this pull request in d31ac83. |
This pull request was successfully merged by @ste7en in d31ac83 When will my fix make it into a release? | How to file a pick request? |
@ste7en Thanks for the fix. Works great. But I wonder is it okay to store local setup ccache path into project.pbxproj? Maybe it's worth to consider moving this variable to .xcode.env generating script (with-environment.sh) |
Yes @mefjuu, I agree it would be a much cleaner solution |
Summary:
When building a react native app from Xcode and ccache has been set to be used, the
ccache-clang.sh
andccache-clang++.sh
scripts cannot findccache
, because Xcode PATH does not include ccache binary.What I've done is setting a
CCACHE_BINARY
user-defined Xcode setting containing the result of executingcommand -v ccache
during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.Fixes #46126
Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Test Plan:
Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time:
USE_CCACHE=1 pod install
.