Add option to build (partially) without Xcode.#25429
Conversation
Useful when: * Building on Linux. * Building on older macOS versions, that can't install the required Xcode version. Refactor the existing IS_LINUX variable to use NO_XCODE instead.
There was a problem hiding this comment.
Pull request overview
Adds a NO_XCODE build mode to allow partial repository builds on hosts without the required Xcode, replacing several Linux-specific guards with Xcode-availability guards.
Changes:
- Adds
./configure --no-xcodeand propagatesNO_XCODEinto selected Makefile paths. - Skips Xcode-dependent build/test/tooling targets when
NO_XCODEis set. - Updates dependency checks to skip some Xcode-related requirements.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Make.config |
Adds Linux/no-Xcode detection and Xcode availability fallback logic. |
configure |
Adds the --no-xcode configure option. |
system-dependencies.sh |
Reads NO_XCODE and skips selected Xcode dependency checks. |
Makefile |
Skips top-level Xcode-dependent directories without Xcode. |
src/Makefile |
Skips AppleDocReader and copies XML docs directly without Xcode. |
msbuild/Makefile |
Skips selected MSBuild packaging/validation targets without Xcode. |
tests/Makefile |
Skips native test libraries without Xcode. |
tools/Makefile |
Skips Sharpie without Xcode. |
tools/mtouch/Makefile |
Skips registrar native artifacts without Xcode. |
Comments suppressed due to low confidence (1)
Make.config:216
- This existence check never evaluates to
OKwhen the Xcode directory exists becausels -dwrites the directory path beforeecho OK, so the shell output is<path> OK. As a resultNO_XCODEis set and the Xcode-dependent build parts are disabled even on machines with the required Xcode installed.
ifneq (OK,$(shell ls -d $(abspath $(XCODE_DEVELOPER_ROOT)) 2>/dev/null && echo OK))
NO_XCODE=1
$(warning The required Xcode ($(XCODE_VERSION)) is not installed in $(XCODE_DEVELOPER_ROOT) - this directory does not exist. Any parts of the build that require Xcode will be disabled.)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #20fdc31] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #20fdc31] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #20fdc31] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #20fdc31] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 2 tests failed, 173 tests passed. Failures❌ monotouch tests (MacCatalyst)1 tests failed, 17 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (tvOS)1 tests failed, 15 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Useful when:
Refactor the existing IS_LINUX variable to use NO_XCODE instead.