swiftlang / swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence
swift.org
Apache License 2.0
5.29k stars 1.13k forks source link

[SR-14077] swift-corelibs-foundation: variables in ForSwiftFoundationOnly.h are used outside Swift #4379

Open swift-ci opened 3 years ago

swift-ci commented 3 years ago
Previous ID SR-14077
Radar rdar://problem/73460926
Original Reporter monson (JIRA User)
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 21211bdfcd6a29c77cb6674e386ad7b9

Issue Description:

While building CoreFoundation without Swift, variables `_CFAllocatorHintZeroWhenAllocating` `_CFThreadRef` `_CFThreadSpecificKey` are defined in ForSwiftFoundationOnly.h, but used in CFRuntime.c outside `DEPLOYMENT_RUNTIME_SWIFT`.

Please check and pull they out to ForFoundationOnly.h or make them inside DEPLOYMENT_RUNTIME_SWIFT macro.

typesanitizer commented 3 years ago

@swift-ci create