================
@@ -3068,15 +3068,25 @@ void tools::addOpenMPDeviceRTL(const Driver &D,
}
}
-void tools::addOpenCLBuiltinsLib(const Driver &D,
+void tools::addOpenCLBuiltinsLib(const Driver &D, const llvm::Triple &TT,
const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) {
+
+ StringRef LibclcNamespec;
const Arg *A = DriverArgs.getLastArg(options::OPT_libclc_lib_EQ);
- if (!A)
- return;
+ if (A) {
+ // If the namespec is of the form :filename we use it exactly.
+ LibclcNamespec = A->getValue();
+ } else {
+ if (!TT.isAMDGPU() || TT.getEnvironment() != llvm::Triple::LLVM)
+ return;
+
+ // TODO: Should this accept following -stdlib to override?
----------------
arsenm wrote:
I did that originally, but undid it since I don't know how that is supposed to
interact with -nodefaultlibs.
https://github.com/llvm/llvm-project/pull/180922
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits