[英]xcodebuild clean deletes non-target files in BUILD_DIR - new in Xcode 12.5
I have our Xcode build system setup to place all build products in a pair of directories, one for Debug configuration and the other for Release using the build setting我有我们的 Xcode 构建系统设置,将所有构建产品放在一对目录中,一个用于调试配置,另一个用于使用构建设置发布
BUILD_DIR = /Library/DevWork/BuildProducts BUILD_DIR = /Library/DevWork/BuildProducts
specified in a shared.xconfig file.在 shared.xconfig 文件中指定。
This worked fine up through Xcode 12.4 as the xcodebuild clean
command would delete only the target and leave all the other files in the build products directory intact.这在 Xcode 12.4 之前运行良好,因为
xcodebuild clean
命令将仅删除目标并保留构建产品目录中的所有其他文件不变。
New with Xcode 12.5, xcodebuild clean
deletes the entire contents of the build products directory.新的 Xcode 12.5,
xcodebuild clean
删除构建产品目录的全部内容。 Is there a way to disable this behavior?有没有办法禁用这种行为?
New with Xcode 12.5, xcodebuild clean deletes the entire contents of the build products directory.
新的 Xcode 12.5,xcodebuild clean 删除构建产品目录的全部内容。 Is there a way to disable this behavior?
有没有办法禁用这种行为?
The behavior isn't actually new with Xcode 12.5; Xcode 12.5 的行为实际上并不新鲜; it's been part of the "new build system" since it was introduced in Xcode 10 :
自从在 Xcode 10 中引入以来,它一直是“新构建系统”的一部分:
The new build system uses the “clean build folder” behavior.
新的构建系统使用“干净的构建文件夹”行为。 The legacy “clean” behavior is not supported.
不支持旧的“干净”行为。
The "legacy" build system has been deprecated for a while. “旧版”构建系统已被弃用一段时间。 I don't know if it's still available at all in Xcode 12.5, but whether it is or not, it's time to make the move to the new system.
我不知道它在 Xcode 12.5 中是否仍然可用,但不管它是否仍然可用,是时候迁移到新系统了。
Is there a way to disable this behavior?
有没有办法禁用这种行为?
No.不。
If you really need to keep old build artifacts around, you could add a post-build script that copies them to another location.如果您确实需要保留旧的构建工件,您可以添加一个构建后脚本,将它们复制到另一个位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.