[clang] [clang][Driver][SPIR-V] Allow linking IR using llvm-link (PR #169572)
Manuel Carrasco via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 8 03:20:15 PST 2025
================
@@ -3637,3 +3637,28 @@ void tools::setComplexRange(const Driver &D, StringRef NewOpt,
LastOpt = NewOpt;
Range = NewRange;
}
+
+void tools::constructLlvmLinkCommand(Compilation &C, const Tool &T,
+ const JobAction &JA,
+ const InputInfoList &JobInputs,
+ const ArgStringList &LinkerInputs,
+ const InputInfo &Output,
+ const llvm::opt::ArgList &Args,
+ const char *OutputFilename) {
+ // Construct llvm-link command.
+ // The output from llvm-link is a bitcode file.
+
+ assert(!LinkerInputs.empty() && !JobInputs.empty() &&
----------------
mgcarrasco wrote:
Would the function work if `LinkerInputs.empty()` but `!JobInputs.empty()`?
https://github.com/llvm/llvm-project/pull/169572
More information about the cfe-commits
mailing list