Xcode 11 beta 4构建错误:“命令CompileSwiftSources失败,退出代码非零” (错误:未知参数:'-Wno-shorten-64-to-32') [英] Xcode 11 beta 4 build error: "Command CompileSwiftSources failed with a nonzero exit code" (error: unknown argument: '-Wno-shorten-64-to-32')

查看:76
本文介绍了Xcode 11 beta 4构建错误:“命令CompileSwiftSources失败,退出代码非零” (错误:未知参数:'-Wno-shorten-64-to-32')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个在Xcode 11 beta 3中可以正常编译的项目,在Pod中出现错误时,无法在beta 4中进行编译:

A project that compiles fine in Xcode 11 beta 3, cannot compile in beta 4 with errors in the pods:

<unknown>:0: error: unknown argument: '-Wno-shorten-64-to-32'
Command CompileSwiftSources failed with a nonzero exit code

有问题的广告连播 Down ,这是Swift中的Markdown库。

The pod in question is Down, a Markdown library in Swift.

这与其他 SO问题,但带有不同的未知参数:

This is very similar to this other SO question but with a different "unknown argument":


错误:未知参数:'-Wno-shorten-64-to-32'

有什么建议吗?

推荐答案

为了让其他任何参与讨论的人受益,请查看此CocoaPods线程。事实证明,CocoaPods将标志传递给Swift是不可接受的,现在beta 4编译器会拒绝此类标志,而前一个则不能。对于Down,对于Objective-C编译器, -Wno-shorten-64-to-32 标志可以,但Swift不能。 Down可以通过删除

For the benefit of anyone else coming across this discussion, take a look at this CocoaPods thread. It turns out that there's a problem with CocoaPods passing flags to Swift that are not acceptable, and the beta 4 compiler now rejects such flags while the previous one did not. In the case of Down, the -Wno-shorten-64-to-32 flag is OK for the Objective-C compiler, but not Swift. Down could fix this in the near term by taking out the

spec.compiler_flags = '-Wno-shorten-64-to-32' 

line,正如Mike Glass在这里建议的那样,但从长远来看,CocoaPods必须允许如果需要匹配CocoaPods修复程序要求的任何新podspec语法,则在不同的编译器之间分隔编译器标志,然后进行相应的Down更新。

line, as Mike Glass has suggested here, but in the longer run CocoaPods will have to permit separating compiler flags between different compilers followed by a corresponding Down update if required to match whatever new podspec syntax the CocoaPods fix requires.

这篇关于Xcode 11 beta 4构建错误:“命令CompileSwiftSources失败,退出代码非零” (错误:未知参数:'-Wno-shorten-64-to-32')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆