Commit Graph

14 Commits

Author SHA1 Message Date
Joe Groff
4c92234662 Compatibility50: Install objc_getClass hook only in main executable
Xcode and other build systems currently link the compatibility libraries into every executable
or dynamic library, which can cause a chain of objc_getClass compatibility hacks to pile up if
a program loads a lot of dynamic libraries. In the static constructor that installs the
objc_getClass compatibility shim, check whether it's running on behalf of the main executable
before installing the shim.
2020-04-07 16:23:29 -07:00
Kuba (Brecka) Mracek
5d918e5ee1 Merge branch 'master' into mracek/arm64e 2020-03-03 08:28:01 -08:00
Saleem Abdulrasool
3a12738ebc stdlib: repair the macOS -stdlib build
When building on macOS without the standard library but building the
extra toolchain content, we would fail to configure due to the missing
include of the `AddSwiftStdlib`.
2020-02-27 20:45:24 -08:00
Kuba Mracek
84c4864911 [arm64e] Add Swift compiler support for arm64e pointer authentication 2020-02-27 16:10:31 -08:00
Mike Ash
c9f9350e74 [Compatibility50] Look up swift_getObjCClassMetadata at runtime.
This is the only dependency it has on libswiftCore. Looking this up at runtime allows its use in programs that don't link libswiftCore but might eventually load and run Swift code, such as xctest.

While we're in there, enable tests in files ending with `.c`.

rdar://problem/55274114
2019-10-10 12:10:39 -04:00
Jonas Devlieghere
61d2efc822 [Compatibility50] Include dlfcn.h 2019-09-18 19:30:03 -07:00
Joe Groff
427ed9c79d Compatibility50: Fix for high-bit characters. 2019-09-06 18:19:19 -04:00
Joe Groff
624ad4fcb0 Compatibility50: Backport objc_getClass hook patch.
We don't want older runtimes trying to chase rogue symbolic references through objc_getClass
either. rdar://problem/55036306
2019-09-05 10:46:15 -07:00
Joe Groff
60b21d4cf5 Disable LLVM ABI checks in the compatibility libraries 2019-08-20 18:27:42 -07:00
Mike Ash
ce26e7f3fd [Runtime] Fix protocol conformances on NULL types when back deploying.
Add code to the 5.0 compatibility library that scans for conformances pointing to a NULL type and rewrites them to point to a dummy type that the 5.0 protocol conformance checking code will safely ignore.
2019-08-14 11:07:31 -04:00
Alex Langford
a16c71cc86 [CMake] Remove TARGET_LIBRARY option from add_swift_target_library
If you're calling add_swift_target_library, you already know it's a
target library.
2019-07-24 14:55:08 -07:00
Ross Bayer
3257761ae0 [Build System: CMake] Move the CompatibilityDynamicReplacements library into the stdlib/toolchain source directory. 2019-07-23 15:34:17 -07:00
Ross Bayer
1a8dff82be [Build System: CMake] Move the Compatibility50 library into the stdlib/toolchain source directory. 2019-07-23 15:34:17 -07:00
Ross Bayer
6d0450a688 [Build System: CMake] Move the legacy_layouts content into stdlib/toolchain, a new directory of content that is installed only in the toolchain. 2019-07-23 14:15:36 -07:00