build-tools
build-tools copied to clipboard
feat: ability to use system xcode
This PR adds the ability to use system version of XCode (installed in /Applications) on Mac OS build hosts by setting a new optional root-level directive in the e config file.
The new directive as an example:
{
"goma": "none",
"root": "build/root/dir",
"xcode": "system",
......
Valid values are 'system' or 'default'. If not present, 'default' is assumed.
I'm still processing as to whether this is a good idea or not. Can you explain your use case?
Sure. Primarily this is useful when there is business need to build Electron forks with newer XCode versions than standard. For example, to take advantage of new SDKs/features in the newer XCode, or to link against proper headers in an updated SDK.
With current build tools, changing to a new version of XCode requires modifying:
.circlecifor targetingsrc/utils/xcode.jsto add a new version number- Manually installing the new XCode to the appropriate build dir to prevent
src/utils/XCode.jsfrom trying to download non-existent files from the build tools mirror
This change allows existing functionality completely intact, but simplifies the above to:
- Ensure your preferred XCode is installed in the default path (
/Applications/XCode.app) - Add
"xcode": "system"to the config.
Hope that clarifies. Happy to answer any additional questions or make some changes.
@MarshallOfSound are you still requesting changes on this PR?
I don't feel strongly about it one way or the other, but don't want to leave it in limbo. We should merge or close it