Skip to content

Commit a213df5

Browse files
authored
[LinkerWrapper] Use the correct empty file on Windows (#84322)
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.
1 parent 4ce52e2 commit a213df5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,11 @@ fatbinary(ArrayRef<std::pair<StringRef, StringRef>> InputFiles,
410410
Targets.push_back(Saver.save("hipv4-amdgcn-amd-amdhsa--" + Arch));
411411
CmdArgs.push_back(Saver.save(llvm::join(Targets, ",")));
412412

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

0 commit comments

Comments
 (0)