xcrun(1) BSD General Commands Manual xcrun(1)
NAME
xcrun -- run or locate development tools
SYNOPSIS
xcrun [-sdk SDK] -find <tool_name> xcrun [-sdk SDK] [-log] <tool_name> [<tool_arguments>] <tool_name> [<tool_arguments>]
DESCRIPTION
xcrun provides a means to locate or invoke coexistence- and platform- aware developer tools from the command-line, without requiring users to modify makefiles or otherwise take inconvenient measures to support mul- tiple Xcode tool chains. The tool xcode-select is used to specify which installation of Xcode is used, and may be overridden by the DEVELOPER_DIR environment variable. The SDK defaults to the boot system OS SDK, and can be specified by the SDKROOT environment variable or the -sdk option (which takes precedences over SDKROOT). Usages The first usage returns the full path to the found tool_name. The second usage executes tool_name with tool_arguments. The third usage is when xcrun is used as a replacement for any of the standard UNIX developer tools (typically in /usr/bin). In this case, xcrun will use the name of the tool it's replacing ( tool_name ) to locate the corresponding tool within evaluated DEVELOPER_DIR and SDK. If the tool is not named xcrun , as in the third usage, then tool_arguments are not parsed by xcrun. Options -verbose Display information about how the redirected path is constructed. -no-cache Don't consult the cache when looking up values. In effect, causes the cache entry to be refreshed. -kill-cache Removes the cache. Causes all values to be re-cached. -sdk SDK Specifies which SDK to use. Overrides any SDKROOT set in the envi- ronment. -log Print the full command line that is invoked. -find Print the full path to the tool. Environment Variables The following environment variables affect the execution of xcrun: DEVELOPER_DIR Specifies the search path for locating the current devel- oper tools (overrides xcode-select default). SDKROOT Specifies the SDK to use; overriden by the command line -sdk option. xcrun_log Same as specifying -log. xcrun_nocache Same as specifying -no-cache. xcrun_verbose Same as specifying -verbose. Diagnostics When xcrun is invoked with the name xcrun , the options -log and -verbose are useful debugging aids. The option -no-cache can be used to bypass cache lookup, but often at a significant cost in performance. When xcrun has taken the place of another tool, the arguments are those of the tool replaced, and the various xcrun options can't be used. In this case, use the specific environment variables instead.
SEE ALSO
xcodebuild -find Xcode coexistence Mac OS X June 14, 2011 Mac OS X
Mac OS X 10.8 - Generated Mon Aug 20 16:33:56 CDT 2012