mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Don't suggest using 'xcrun' when not on OS X.
Also, suggest "xcrun swiftc" instead of "xcrun swift" on OS X, since "swift" already infers SDKs and we shouldn't get into this situation. (We shouldn't get into it on non-OS-X either thanks to the previous commit, but just in case.) rdar://problem/22440615 Swift SVN r31535
This commit is contained in:
@@ -253,7 +253,8 @@ FileUnit *SerializedModuleLoader::loadAST(
|
||||
missingNames);
|
||||
}
|
||||
|
||||
if (Ctx.SearchPathOpts.SDKPath.empty()) {
|
||||
if (Ctx.SearchPathOpts.SDKPath.empty() &&
|
||||
llvm::Triple(llvm::sys::getProcessTriple()).isMacOSX()) {
|
||||
Ctx.Diags.diagnose(SourceLoc(), diag::sema_no_import_no_sdk);
|
||||
Ctx.Diags.diagnose(SourceLoc(), diag::sema_no_import_no_sdk_xcrun);
|
||||
}
|
||||
@@ -263,7 +264,8 @@ FileUnit *SerializedModuleLoader::loadAST(
|
||||
case serialization::Status::MissingShadowedModule: {
|
||||
Ctx.Diags.diagnose(*diagLoc, diag::serialization_missing_shadowed_module,
|
||||
M.getName());
|
||||
if (Ctx.SearchPathOpts.SDKPath.empty()) {
|
||||
if (Ctx.SearchPathOpts.SDKPath.empty() &&
|
||||
llvm::Triple(llvm::sys::getProcessTriple()).isMacOSX()) {
|
||||
Ctx.Diags.diagnose(SourceLoc(), diag::sema_no_import_no_sdk);
|
||||
Ctx.Diags.diagnose(SourceLoc(), diag::sema_no_import_no_sdk_xcrun);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user