简体   繁体   English

xcodebuild clean 删除 BUILD_DIR 中的非目标文件 - Xcode 12.5 中的新文件

[英]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.

相关问题 升级到 Xcode 12.5 后的 xcodebuild 问题 - xcodebuild issue after upgrading to Xcode 12.5 Xcode 构建缺少预期的 TARGET_BUILD_DIR 构建设置 - Xcode build is missing expected TARGET_BUILD_DIR build setting XCode 4和Titanium:TARGET_BUILD_DIR设置不正确 - XCode 4 and Titanium: TARGET_BUILD_DIR is incorrectly set XCode应用商店构建-新目标或配置? - XCode app store build - new target or configuration? Xcode 12.5:目标“PACKAGENAME”的 header 布局无效 - Xcode 12.5: target ‘PACKAGENAME’ has invalid header layout xcodebuild等同于Xcode的“产品>构建>测试” - xcodebuild equivalent of Xcode's “Product > Build For > Testing” xcodebuild - 设置build dir不会生成dSYM - xcodebuild - setting build dir doesn't generate dSYM 在旧版本的 Xcode 上开发并在 Xcode 12.5 上重新打开的项目中出现构建错误? - Build error in project developed on older version of Xcode and reopened on Xcode 12.5? Xcode 12.5 无法使用 M1 上的 .systemLibrary 目标解析 SwiftPackageDependency - Xcode 12.5 fail resolving SwiftPackageDependency with .systemLibrary target on M1 xcodebuild在xcode构建时没有这样的模块'SwiftyJSON' - xcodebuild no such module 'SwiftyJSON' while build in xcode works
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM