@@ -35,10 +35,9 @@ static std::optional<Path> getActualModuleMapPath(
3535
3636 Path result;
3737
38- StringRef SDKPath = Opts.getSDKPath ();
39- if (!SDKPath.empty ()) {
40- result.append (SDKPath.begin (), SDKPath.end ());
41- llvm::sys::path::append (result, " usr" , " lib" , " swift" );
38+ if (!Opts.RuntimeResourcePath .empty ()) {
39+ result.append (Opts.RuntimeResourcePath .begin (),
40+ Opts.RuntimeResourcePath .end ());
4241 llvm::sys::path::append (result, platform);
4342 if (isArchSpecific) {
4443 llvm::sys::path::append (result, arch);
@@ -52,10 +51,11 @@ static std::optional<Path> getActualModuleMapPath(
5251 return result;
5352 }
5453
55- if (!Opts.RuntimeResourcePath .empty ()) {
54+ StringRef SDKPath = Opts.getSDKPath ();
55+ if (!SDKPath.empty ()) {
5656 result.clear ();
57- result.append (Opts. RuntimeResourcePath . begin (),
58- Opts. RuntimeResourcePath . end () );
57+ result.append (SDKPath. begin (), SDKPath. end ());
58+ llvm::sys::path::append (result, " usr " , " lib " , " swift " );
5959 llvm::sys::path::append (result, platform);
6060 if (isArchSpecific) {
6161 llvm::sys::path::append (result, arch);
0 commit comments