Swift Package is built as a universal binary in main project

这篇具有很好参考价值的文章主要介绍了Swift Package is built as a universal binary in main project。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Swift Package is built as a universal binary in main project

Hi,

Following line from Xcode build log shows that Xcode is building swift package dependencies as universal binaries

 
 

CreateUniversalBinary .../UIComponents.o normal arm64\ x86_64 (in target 'UIComponents' from project 'PlatformPackages')

Also confirmed with lipo

 
 

lipo -info UIComponents.o Architectures in the fat file: UIComponents.o are: x86_64 arm64

Is it possible to build swift package for active architecture only? Or for selected architectures based on configuration.

  • created

    Dec '21

  • last reply

    Apr '22

  • 6
    replies
  • 1.9k
    views
  • 4
    users
  • 4
    likes
  • ​编辑3

    ​编辑2

29 days later

Jon_Shier

Jan '22

AFAIK, Swift packages in Xcode are built for the active architecture in debug mode and universally in release mode and there's no way to control the behavior. You may try changing the setting in your project, but I don't believe Xcode's SPM integration passes that setting through.

1

NeoNachoBoris Buegling

Jan '22

That is correct, packages behave like projects do by default here and there's no control over the build setting. Build settings of client projects generally don't apply to packages in any way.

2 Replies

1

shahzadmajeed

Jan '22

Could swift package itself specify build settings in Package.swift?

2 months later

TorustThomas Roughton

1

Mar '22

 NeoNacho:

Build settings of client projects generally don't apply to packages in any way.

For what it's worth, I've filed FB9915302 about this. It's a major workflow issue for apps which need to be built with optimisations to run well enough to be tested – the compile times are very lengthy regardless and building for architectures you're not going to use only makes it worse.

I'll also add that per-target optimisation settings would be very useful – it's often the case that I'm working on a particular package and want that to be built in debug mode, but still need other packages it depends on to be in release mode so the app is usable.

1

1 month later

 文章来源地址https://www.toymoban.com/news/detail-659187.html

shahzadmajeed

Apr '22

@Torust just curious if you heard back from Apple on this?

TorustThomas Roughton

Apr '22

Nothing at this stage.

 

到了这里,关于Swift Package is built as a universal binary in main project的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • R Removing package报错(as ‘lib’ is unspecified)

    remove.packages(\\\'ggpubr\\\') Removing package from ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’ (as ‘lib’ is unspecified) 解决办法: .libPaths() [1] \\\"/Library/Frameworks/R.framework/Versions/4.0/Resources/library\\\" .libPaths(\\\"/Library/Frameworks/R.framework/Versions/4.0/Resources/library\\\")

    2024年02月09日
    浏览(45)
  • goland报错:“package command-line-arguments is not a main package”解决方案

    大家好!我是躺平哥。         今天模拟客户端和服务端交互时遇到了一个问题: “package command-line-arguments is not a main package”          翻译过来就是包命令行参数不是主包         因为在Go语言中,和java的main是有所区别的,具体区别如下:         在java中,任何

    2023年04月19日
    浏览(33)
  • .eslintrc.js is treated as an ES module file as it is a .js file whose nearest parent package.json c

    在给vue3项目添加eslint的时候,安装完依赖,并且在package.json中的scripts配置了eslint检测的命令之后执行检测命令,发生如下报错: 按照报错,打算把根目录下的.eslintrc.js改为.eslintrc.cjs,改完之后确实能够执行了,但是.eslintrc.cjs文件一直显示报错,官方有建议几种文件的格式

    2024年02月12日
    浏览(43)
  • MySQL备份恢复数据--binary-mode is enabled and mysql is run in non-interactive...

    使用 mysqldump ; MySQL 自带的逻辑备份工具。 备份 恢复 使用 source命令恢复   数据库工具目录需要添加到系统变量里面:C:WindowsSystem32cmd.exe 导出和恢复都使用cmd即可; 如果使用 powershell 导出 ;导入时会报错: <”运算符是为将来使用而保留的... 都无法执行恢复命令 使用

    2024年03月09日
    浏览(34)
  • 安装MySQL报错:Failing package is: mysql-community-client-5.7.40-1.el7.x86_64 GPG Keys are configured as

    Failing package is: mysql-community-client-5.7.40-1.el7.x86_64  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 安装MySQL执行  yum -y install mysql-community-server  时,未安装成功 MySQL GPG 密钥已过期 执行 rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 执行后再执行  yum -y install mysql-community

    2024年02月11日
    浏览(75)
  • ImportError: ERROR: recursion is detected during loading of “cv2“ binary extensions. Check OpenCV in

    1. import cv2错误 ImportError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation. 2. 解决 cv2版本太高,需要降低cv2版本 2.1 在anaconda环境下使用conda list查看当前cv2的版本为4.6.0.66,如下图: 2.2 使用pip uninstall opencv-python==4.6.0.66(指定卸载的当前cv2版本号)

    2024年02月12日
    浏览(65)
  • 【解决问题】RLException: [xx.launch] is neither a launch file in package [x] nor is [x] a launch file name

    解决方案 方案1 回去再次编译: 添加环境变量: 方案2 相比方案1,这个不需要每次编写都添加环境变量了。 打开这个文件: 在该文件的最后添加如下代码 catkin_ws为我的ROS工作路径。 然后重启bashrc 查看ROS路径是否添加上

    2024年04月23日
    浏览(31)
  • RLException: [xx.launch] is neither a launch file in package [x] nor is [x] a launch file name的解决方法

    在ROS学习中,进行工作区下编译的时候,突然报错, 出现的错误如下 : RLException: [racecar.launch] is neither a launch file in package [racecar_gazebo] nor is [racecar_gazebo] a launch file name The traceback for the exception was written to the log file 这种错误的出现,是因为坏境变量没有被添加!!! 添加环境

    2024年02月06日
    浏览(31)
  • Traceback (most recent call last): File "D:\python项目\main.py", line 3, in <module> import pandas as pd ModuleNotFoundError

    这是一个 Python 错误信息,表明在文件 \\\"D:python项目main.py\\\" 的第 3 行中尝试导入 pandas 模块时出错,错误为 \\\"ModuleNotFoundError: No module named pandas\\\"。这意味着 pandas 模块没有在你的系统上安装。要解决此问题,请使用 pip 安装 pandas:在命令行中运行 \\\"pip install pandas\\\" 即可。

    2024年02月10日
    浏览(40)
  • BIST(built in self test)入门

    BIST分为logic bist和memory bist(MBIST)。 logic bist测试随机逻辑电路。 memory bist 测试 存储器电路 ,通过输入不同组数值测试sram存储器有没有坏点,需要将自检的硬件逻辑加到rtl里面。 存储器电路 模型 :地址译码器、读写控制逻辑、存储单元阵列 MBIST测试 对象 是RAM或ROM MBIST 电

    2024年02月11日
    浏览(47)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包