[lld/mac] Fix sub-library.s on Windows after 8e8701abca3d4f0
authorNico Weber <thakis@chromium.org>
Tue, 27 Jul 2021 19:24:38 +0000 (15:24 -0400)
committerNico Weber <thakis@chromium.org>
Tue, 27 Jul 2021 19:25:52 +0000 (15:25 -0400)
The endswith() check for the framework name fails when joining
with the native path separator. Always use the posix separator as fix.

lld/MachO/InputFiles.cpp

index 01a8444d6161aac8c7f2763002a55bfc65bafd16..a4fb9035193c330b5d62a1b0f178aa85a6202c9c 100644 (file)
@@ -865,7 +865,7 @@ static DylibFile *findDylib(StringRef path, DylibFile *umbrella,
   {
     StringRef stem = path::stem(path);
     SmallString<128> frameworkName;
-    path::append(frameworkName, stem + ".framework", stem);
+    path::append(frameworkName, path::Style::posix, stem + ".framework", stem);
     bool isFramework = path.endswith(frameworkName);
     if (isFramework) {
       for (StringRef dir : config->frameworkSearchPaths) {