Add compile time config flag for detecting objc-interop.

Swift SVN r22605
This commit is contained in:
Graham Batty
2014-10-08 17:09:34 +00:00
parent 5f0439cfb0
commit 7676c8240d
10 changed files with 33 additions and 9 deletions

View File

@@ -90,6 +90,12 @@ static void updateTargetConfigurationOptions(LangOptions &LangOpts,
llvm_unreachable("Unsupported target architecture");
}
// Set the "runtime" target configuration.
if (triple.isOSDarwin())
LangOpts.addTargetConfigOption("_runtime", "_ObjC");
else
LangOpts.addTargetConfigOption("_runtime", "_Native");
// Set the minimum platform version for deployment.
unsigned major, minor, revision;
if (triple.isMacOSX()) {