Skip to content

Commit fe09dc2

Browse files
committed
Fix build failures related to PR llvm#164551
1 parent 2db482d commit fe09dc2

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS
55
IRReader
66
JITLink
77
Object
8+
ObjectYAML
89
OrcDebugging
910
OrcJIT
1011
OrcShared

llvm/unittests/ExecutionEngine/Orc/LibraryResolverTest.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,14 +690,21 @@ TEST_F(LibraryResolverIT, PathResolverFollowsSymlinks) {
690690
// Create a symlink temp -> BaseDir (only if filesystem allows it)
691691
std::string linkName = BaseDir + withext("/link_to_C");
692692
std::string target = lib("C");
693-
::symlink(target.c_str(), linkName.c_str());
693+
694+
if (::symlink(target.c_str(), linkName.c_str()) != 0) {
695+
perror("symlink failed");
696+
FAIL() << "Failed to create symlink: " << strerror(errno);
697+
}
694698

695699
auto resolved = PResolver->resolve(linkName, EC);
696700
ASSERT_TRUE(resolved.has_value());
697701
EXPECT_FALSE(EC);
698702
EXPECT_EQ(*resolved, target);
699703

700-
::unlink(linkName.c_str()); // cleanup
704+
if (::unlink(linkName.c_str()) != 0) {
705+
perror("unlink failed");
706+
FAIL() << "Failed to remove symlink: " << strerror(errno);
707+
}
701708
}
702709

703710
TEST_F(LibraryResolverIT, PathResolverCachesResults) {

0 commit comments

Comments
 (0)