@@ -271,7 +271,7 @@ static void updateRuntimeLibraryPaths(SearchPathOptions &SearchPathOpts,
271
271
RuntimeLibraryImportPaths.push_back (std::string (LibPath.str ()));
272
272
}
273
273
274
- if (!SearchPathOpts.SkipSDKImportPaths && !SearchPathOpts.getSDKPath ().empty ()) {
274
+ if (!SearchPathOpts.SkipSDKImportPaths && Triple. isOSDarwin () && !SearchPathOpts.getSDKPath ().empty ()) {
275
275
const char *swiftDir = FrontendOpts.UseSharedResourceFolder
276
276
? " swift" : " swift_static" ;
277
277
@@ -284,18 +284,6 @@ static void updateRuntimeLibraryPaths(SearchPathOptions &SearchPathOpts,
284
284
285
285
LibPath = SearchPathOpts.getSDKPath ();
286
286
llvm::sys::path::append (LibPath, " usr" , " lib" , swiftDir);
287
- if (!Triple.isOSDarwin ()) {
288
- // Use the non-architecture suffixed form with directory-layout
289
- // swiftmodules.
290
- llvm::sys::path::append (LibPath, getPlatformNameForTriple (Triple));
291
- RuntimeLibraryImportPaths.push_back (std::string (LibPath.str ()));
292
-
293
- // Compatibility with older releases - use the architecture suffixed form
294
- // for pre-directory-layout multi-architecture layout. Note that some
295
- // platforms (e.g. Windows) will use this even with directory layout in
296
- // older releases.
297
- llvm::sys::path::append (LibPath, swift::getMajorArchitectureName (Triple));
298
- }
299
287
RuntimeLibraryImportPaths.push_back (std::string (LibPath.str ()));
300
288
}
301
289
SearchPathOpts.setRuntimeLibraryImportPaths (RuntimeLibraryImportPaths);
@@ -2411,7 +2399,7 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args,
2411
2399
2412
2400
if (const Arg *A = Args.getLastArg (OPT_resource_dir))
2413
2401
Opts.RuntimeResourcePath = A->getValue ();
2414
- else if (Args.hasArg (OPT_sdk)) {
2402
+ else if (!Triple. isOSDarwin () && Args.hasArg (OPT_sdk)) {
2415
2403
llvm::SmallString<128 > SDKResourcePath (Opts.getSDKPath ());
2416
2404
llvm::sys::path::append (
2417
2405
SDKResourcePath, " usr" , " lib" ,
0 commit comments