Skip to content

Commit

Permalink
[LinkerWrapper] Use the correct empty file on Windows (llvm#84322)
Browse files Browse the repository at this point in the history
Summary:
The clang-offload-bundler uses an empty file to control the bundles made
for embedding. Previously this still used `/dev/null` by mistake even on
Windows.
  • Loading branch information
jhuber6 authored Mar 7, 2024
1 parent 4ce52e2 commit a213df5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,11 @@ fatbinary(ArrayRef<std::pair<StringRef, StringRef>> InputFiles,
Targets.push_back(Saver.save("hipv4-amdgcn-amd-amdhsa--" + Arch));
CmdArgs.push_back(Saver.save(llvm::join(Targets, ",")));

#ifdef _WIN32
CmdArgs.push_back("-input=NUL");
#else
CmdArgs.push_back("-input=/dev/null");
#endif
for (const auto &[File, Arch] : InputFiles)
CmdArgs.push_back(Saver.save("-input=" + File));

Expand Down

0 comments on commit a213df5

Please sign in to comment.