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, is there a good way to detect why a specific file needed to be compiled even though
Intermediates.noindex
folder exists in the build folder? Like visualizing the dependency graph for the build?Our incremental builds were working in the legacy build system if I keep
Intermediates.noindex
folder and guarantee that the mtime for source files are earlier than the mtime of corresponding object file underIntermediates.noindex
.With new build system I can't guarantee that anymore. Would be great if I can somehow debug this.
I guarantee mtime of the following file extensions to be older than object file generation:
c,cc,h,pch,cpp,hpp,m,mm,xcconfig