什么是一个非脆弱的ABI?是一个、脆弱、ABI

2023-09-08 10:18:46 作者:够没

这似乎暗示着的每个人的知道什么是非脆弱ABI是 - 考虑频率和就事论事的 - 事实性质,以及它被称为 - 在X code 。例如...

It may seem implied that everyone knows what a "Non Fragile ABI" is - considering the frequency and matter-of-fact-nature to which it is referred to - within Xcode. For example...

标需要接口节点的尺寸,而不是常数非脆弱的ABI

Subscript requires size of interface node which is not constant in non-fragile ABI

选择Objective-C的ABI的版本使用。可用的版本1(传统的脆弱ABI),2,(非脆弱ABI 1)和3(非脆弱ABI 2)。

Select the Objective-C ABI version to use. Available versions are 1 (legacy "fragile" ABI), 2, (non-fragile ABI 1), and 3 (non-fragile ABI 2).

这是说... 什么是一个非脆弱ABI?(为什么不叫东西少抽象/解释清楚一点吗?)

That said... What is a non-fragile ABI? (and why isn't it called something less-abstract / explained more clearly?)

推荐答案

非脆弱ABI指的是实例变量添加到类,而不需要所有子类中重新编译的能力。

The non-fragile ABI refers to the ability to add instance variables to a class without requiring recompilation of all subclasses.

即。在V1(真的没有ObjC的真实版本),如果苹果要添加一个实例变量,比方说,一个NSView(可可,32位),一个NSView(或子类的子类),那么每个子类中就必须重新编译,否则将炸毁。 v2和v3解决这个问题。

I.e. in v1 (there really aren't true versions of ObjC), if Apple were to add an instance variable to, say, NSView (on Cocoa, 32 bit), then every subclass of NSView (or subclass of subclass) would have to be recompiled or they would blow up. v2 and v3 fix this.

这是detail在这个博客帖子。

你是指该文档是在LLVM /铛手册页。 pretty的罕见的地方是大多数开发人员大部分的时间;除非你正在编写一个Makefile文件是直接驱动编译器,没有太多的理由来阅读该网页(除非洞穴探险 - 这当然是相当的教育,)。

The documentation you are referring to is in the llvm/clang man page. Pretty rare place to be for most developers most of the time; unless you are writing a Makefile that is driving the compiler directly, there isn't much reason to read that page (unless spelunking -- which is quite educational, of course).

这是写在一个Unix手册页和,毫不奇怪的风格,有点......钝。对于几乎所有的任务,这是最好坚持到更高层次的文件。即在X code构建设置文档一般相当少一点钝。

It is written in the style of a Unix man page and, no surprise, is a bit... obtuse. For almost all tasks, it is best to stick to the higher level documentation. I.e. the Xcode build settings documentation is general quite a bit less obtuse.