Skip to content

Conversation

@elsh
Copy link
Contributor

@elsh elsh commented May 16, 2024

When package resilience optimization is enabled, global accessor symbols are not added to the SIL symbol list, causing a linker issue.

Resolves rdar://127321129&127308331

@elsh elsh force-pushed the elsh/ir-global-accessor branch from d26265f to e3cce07 Compare May 16, 2024 22:27
@elsh
Copy link
Contributor Author

elsh commented May 16, 2024

@swift-ci smoke test

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

Nice catch!

@elsh elsh force-pushed the elsh/ir-global-accessor branch from 1fefb0d to c379f0a Compare May 16, 2024 23:30
@elsh
Copy link
Contributor Author

elsh commented May 16, 2024

@swift-ci smoke test

@elsh elsh enabled auto-merge May 16, 2024 23:32
@elsh elsh force-pushed the elsh/ir-global-accessor branch from c379f0a to 58cc800 Compare May 16, 2024 23:33
@elsh
Copy link
Contributor Author

elsh commented May 16, 2024

@swift-ci smoke test

@elsh elsh force-pushed the elsh/ir-global-accessor branch from 58cc800 to 34d9594 Compare May 17, 2024 18:40
@elsh elsh requested review from hborla and xedin as code owners May 17, 2024 18:40
@elsh
Copy link
Contributor Author

elsh commented May 17, 2024

@swift-ci smoke test

@elsh elsh force-pushed the elsh/ir-global-accessor branch from 97d5ef3 to c80f6c5 Compare May 17, 2024 19:18
@elsh elsh disabled auto-merge May 17, 2024 21:05
@elsh elsh force-pushed the elsh/ir-global-accessor branch from 9dfe9e3 to f83861e Compare May 20, 2024 21:37
Add global accessors to symbol list if VarDecl is fragile, i.e.
is non-resilient or its defining module allows non-resilient
access.

Don't set the class decl to hidden if it's in a package resilience
domain; even though its defining module is built resilently, the
class symbol should be visible across modules if they are in the
same package with resilience-bypass optimization. In such case,
treat its SubclassScope to Internal.

Resolves rdar://127321129
@elsh elsh force-pushed the elsh/ir-global-accessor branch from f83861e to 80855c8 Compare May 20, 2024 21:41
@elsh
Copy link
Contributor Author

elsh commented May 20, 2024

@swift-ci smoke test

@elsh elsh changed the title Fix global accessor linker error in package. Fix global accessor and class linker errors in package. May 21, 2024
@elsh
Copy link
Contributor Author

elsh commented May 21, 2024

@swift-ci smoke test

@elsh elsh force-pushed the elsh/ir-global-accessor branch from d72f92b to 36b4d2d Compare May 21, 2024 03:49
Add isStrictlyResilient() to nominal type and module decl.
@elsh
Copy link
Contributor Author

elsh commented May 22, 2024

@swift-ci smoke test

@elsh elsh merged commit c0720d5 into main May 22, 2024
@elsh elsh deleted the elsh/ir-global-accessor branch May 22, 2024 05:59
return getModuleContext()->isResilient();
}

bool NominalTypeDecl::isStrictlyResilient() const {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: strict is vague when used as an API name. A better alternative could be something like isNonResilientAccessDisallowed()

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.

4 participants