Commit Graph

2 Commits

Author SHA1 Message Date
David Farler
8ca30ff2d7 Ask SILFunction link entities' clang nodes for weakness when applicable
When importing C functions with availability attributes, we don't
properly use that information to decide whether a symbol should be
weak_extern, causing load failures in dylibs that reference these
symbols when deployed to an older OS.

This is a very targeted fix and we need a better architecture for
deciding this.

rdar://problem/26359452
2016-06-01 12:52:04 -07:00
Devin Coughlin
ecc7307e76 Test: Emulate deployment on older OSes to test weak linking to Objective-C
These tests emulate deploying back to an older OS where newer APIs are not
available by linking to an Objective-C framework where APIs have been
annotated to only be available in the far future and then moving the famework
aside so that it can't be found at run time.

These tests include some basics (global variables and classes), but the focus
is on Objective-C protocols to validate the change allowing types to
conform to protocols less available than the types themselves.

Swift SVN r30005
2015-07-09 00:58:27 +00:00