alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
# Some minimal additional logging (this is safe to leave on).
defaults write com.apple.dt.XCBuild EnableDebugActivityLogs -bool YES
# Enable build debugging mode (safe to leave on, but slows down the build system & litters DerivedData/<project>/Build/Intermediates.noindex), generally should only be enabled when trying to capture a trace for incremental build debugging purposes.
defaults write com.apple.dt.XCBuild EnableBuildDebugging -bool YES
# You can also use:
env EnableBuildDebugging=YES xcodebuild -UseNewBuildSystem=1 ...
# Use `xcbuild` to dump a headermap.
xcbuild headermap --dump <path>open with Internal > XCBuild Console
writePIF <workspace name> <path>
# … you can use this with the `xcbuild build …` command (above) to build via the service directly
showStatistics
clearAllCaches
setConfig EnableBuildDebugging true
# … then save DerivedData & build log; same as above dwrite, but not persisted
@ddunbar as of 2026, is there any up-to-date recipe for incremental builds in CI? I'm trying to speed up Github Workflow runs, caching the whole DerivedData folder helped cut it in half but looking at the .xcresult Timeline it's still compiling project level code, even when no changes were made. Between xcode26 Compilation Cache and old online tips like setting
IgnoreFileSystemDeviceInodeChangesand restoring mtime, it's unclear what's the correct way to properly setup incremental builds. For reference, I'm usingxcrun xcodebuild build-for-testing/xcrun xcodebuild test-without-building.