xcrun 使用说明
Dec 03, 2020
xcrun 是 Xcode 的工具链的一部分,一般用来配置编译环境,在跨平台的编译配置上非常有用。 内置的帮助说明非常简洁: Usage: xcrun [options] <tool name> ... arguments ... Find and execute the named command line tool from the active developer directory. The active developer directory can be set using `xcode-select`, or via the DEVELOPER_DIR environment variable. See the xcrun and xcode-select manual pages for more information. Options: -h, --help show this help message and exit --version show the xcrun version -v, --verbose show verbose logging output --sdk <sdk name> find the tool for the given SDK name --toolchain <name> find the tool for the given toolchain -l, --log show commands to be executed (with --run) -f, --find only find and print the tool path -r, --run find and execute the tool (the default behavior) -n, --no-cache do not use the lookup cache -k, --kill-cache invalidate all existing cache entries --show-sdk-path show selected SDK install path --show-sdk-version show selected SDK version --show-sdk-build-version show selected SDK build version --show-sdk-platform-path show selected SDK platform path --show-sdk-platform-version show selected SDK platform version 自动配置 sysroot 编译的时候需要指定 -sysroot=/root/path/to/sdk,include 和 lib 就基于 sysroot 指定的目录里进行查找,如果是在 macOS 上编译 iOS 程序,sysroot 就指向 iOS sdk 的目录。 …
恢复 Xcode 默认设置
Oct 15, 2020
一条命令就可以恢复 Xcode 的默认设置: defaults delete com.apple.dt.Xcode
TARGETED_DEVICE_FAMILY 编译选项说明
Aug 22, 2020
TARGETED_DEVICE_FAMILY 是 Xcode 编译选项里的一个字段,用于标识当前项目适用于哪些硬件设备。 …