@@ -34,10 +34,9 @@ static std::optional<Path> getActualModuleMapPath(
3434
3535 Path result;
3636
37- StringRef SDKPath = Opts.getSDKPath ();
38- if (!SDKPath.empty ()) {
39- result.append (SDKPath.begin (), SDKPath.end ());
40- llvm::sys::path::append (result, " usr" , " lib" , " swift" );
37+ if (!Opts.RuntimeResourcePath .empty ()) {
38+ result.append (Opts.RuntimeResourcePath .begin (),
39+ Opts.RuntimeResourcePath .end ());
4140 llvm::sys::path::append (result, platform);
4241 if (isArchSpecific) {
4342 llvm::sys::path::append (result, arch);
@@ -51,10 +50,11 @@ static std::optional<Path> getActualModuleMapPath(
5150 return result;
5251 }
5352
54- if (!Opts.RuntimeResourcePath .empty ()) {
53+ StringRef SDKPath = Opts.getSDKPath ();
54+ if (!SDKPath.empty ()) {
5555 result.clear ();
56- result.append (Opts. RuntimeResourcePath . begin (),
57- Opts. RuntimeResourcePath . end () );
56+ result.append (SDKPath. begin (), SDKPath. end ());
57+ llvm::sys::path::append (result, " usr " , " lib " , " swift " );
5858 llvm::sys::path::append (result, platform);
5959 if (isArchSpecific) {
6060 llvm::sys::path::append (result, arch);
0 commit comments