[metadata prespecialization] Only Apple or linux.

Temporarily disable metadata prespecialization on platforms other than
MacOS, iOS, tvOS, watchOS, or Linux.  At the moment, tests are failing
on Windows with linker errors such as

  demangleToMetadata-558ea9.o : error LNK2001: unresolved external symbol $ss5Int64VN
  demangleToMetadata-558ea9.o : error LNK2001: unresolved external symbol $sSSSHsWP

Once the issue leading to those linker errors has been resolved, the
feature will be enabled on Windows.
This commit is contained in:
Nate Chandler
2020-02-05 16:05:03 -08:00
parent 0ae9e68607
commit ae1f41e1b2
39 changed files with 40 additions and 1 deletions

View File

@@ -1340,7 +1340,8 @@ bool IRGenModule::shouldPrespecializeGenericMetadata() {
AvailabilityContext::forDeploymentTarget(context);
return IRGen.Opts.PrespecializeGenericMetadata &&
deploymentAvailability.isContainedIn(
context.getPrespecializedGenericMetadataAvailability());
context.getPrespecializedGenericMetadataAvailability()) &&
(Triple.isOSDarwin() || Triple.isTvOS() || Triple.isOSLinux());
}
void IRGenerator::addGenModule(SourceFile *SF, IRGenModule *IGM) {