Skip to content

[Stdlib][Frontend][CMake] Remove SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT option, make it permanently on. #23235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Mar 12, 2019

No description provided.

@mikeash
Copy link
Contributor Author

mikeash commented Mar 12, 2019

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Mar 12, 2019

@compnerd
Copy link
Member

LGTM modulo the couple of questions. Glad to see that you got around to that bit of review comments :-)

Class cls = objc_getClass("_TtCs19__EmptyArrayStorage");
if (!cls) abort();
uintptr_t *words = (uintptr_t *)cls;
if ((words[4] & 3) != 2) return false; // wrong stable is-Swift bit
return true;
// This check can be removed after SWIFT_CLASS_IS_SWIFT_MASK is made
// static everywhere.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What check is this referring to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I messed up the change here, and the comment is supposed to replace the removed comment above it and refer to the "wrong stable is-Swift bit" check.

@@ -138,7 +138,7 @@ namespace swift {

/// On Darwin platforms, use the pre-stable ABI's mark bit for Swift
/// classes instead of the stable ABI's bit.
bool UseDarwinPreStableABIBit = !bool(SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT);
bool UseDarwinPreStableABIBit = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this guard at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiler still needs to emit the pre-stable ABI bit when targeting OSes prior to 10.14.4 and corresponding releases. This option controls that. It gets set based on the target OS version here: https://github.com/apple/swift/pull/23235/files#diff-487c2f92307618024a8f8f553589405dR431

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind putting a reference to that in a comment? It seems like it would be something that could get dropped at some point (when 10.14.4 is EOL'ed).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll do that. Given that we still support 10.9 that might be a while, but it would be good to explain.

@mikeash mikeash force-pushed the remove-stable-abi-bit-configuration branch from d7aaad3 to e4514da Compare March 12, 2019 18:01
@mikeash
Copy link
Contributor Author

mikeash commented Mar 12, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - d7aaad32a28a9aeee5f2bcc9b6b69fcb5b9def10

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d7aaad32a28a9aeee5f2bcc9b6b69fcb5b9def10

@mikeash mikeash force-pushed the remove-stable-abi-bit-configuration branch from e4514da to 597dcd8 Compare March 13, 2019 13:32
@mikeash
Copy link
Contributor Author

mikeash commented Mar 13, 2019

@swift-ci please smoke test and merge

1 similar comment
@mikeash
Copy link
Contributor Author

mikeash commented Mar 15, 2019

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 497e94e into swiftlang:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants