mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When compiling a Swift module in incremental mode, each Swift source file is compiled into an object file and we use linker to link them together. Because the predicate function for checking dynamic feature availability is eagerly synthesized per compilation unit, the linker will complain about duplicated symbols for them. Setting their visibility as private ensures that linker doesn't see them, thus addressing the linker errors. One workaround for this problem is to enable WMO. rdar://164971313
6 lines
75 B
C
6 lines
75 B
C
#include "AvailabilityDomains.h"
|
|
|
|
int dynamic_domain_pred() {
|
|
return 1;
|
|
}
|