Skip to content

Commit

Permalink
Use modified lld vfs interface
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Nov 12, 2023
1 parent 5415482 commit 4e53bfe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lld/link-elfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ using namespace llvm;

LLD_HAS_DRIVER( elf )

namespace lld {
namespace elf {
void useVFS(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> vfs);
}
}

std::pair<bool, std::string> link_elfs( std::vector<char*> dep_files, std::vector<size_t> dep_file_sizes )
{
// Create File System
Expand All @@ -30,7 +36,8 @@ std::pair<bool, std::string> link_elfs( std::vector<char*> dep_files, std::vecto
std::string llvm_stderr;
raw_string_ostream llvm_stderrOS( llvm_stderr );

bool r = lld::elf::link( args, llvm_stdoutOS, llvm_stderrOS, false, false, InMemFS );
lld::elf::useVFS( InMemFS );
bool r = lld::elf::link( args, llvm_stdoutOS, llvm_stderrOS, false, false );

if ( r ) {
return make_pair( true, llvm_stdout );
Expand Down

0 comments on commit 4e53bfe

Please sign in to comment.