[lld] dd57915 - [lld/mac] Fix sub-library.s on Windows after 8e8701abca3d4f0
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 12:25:59 PDT 2021
Author: Nico Weber
Date: 2021-07-27T15:25:52-04:00
New Revision: dd57915b1ef6568e335053131e600eb4c26d1f1e
URL: https://github.com/llvm/llvm-project/commit/dd57915b1ef6568e335053131e600eb4c26d1f1e
DIFF: https://github.com/llvm/llvm-project/commit/dd57915b1ef6568e335053131e600eb4c26d1f1e.diff
LOG: [lld/mac] Fix sub-library.s on Windows after 8e8701abca3d4f0
The endswith() check for the framework name fails when joining
with the native path separator. Always use the posix separator as fix.
Added:
Modified:
lld/MachO/InputFiles.cpp
Removed:
################################################################################
diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp
index 01a8444d6161..a4fb9035193c 100644
--- a/lld/MachO/InputFiles.cpp
+++ b/lld/MachO/InputFiles.cpp
@@ -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) {
More information about the llvm-commits
mailing list