@@ -6000,57 +6000,10 @@ class OffloadingActionBuilder final {
60006000 // For NVPTX and NativeCPU we need to also link libclc at the same stage
60016001 // that we link all of the unbundled SYCL libdevice objects together.
60026002 if (TC ->getTriple ().isNVPTX () || isNativeCPU) {
6003- <<<<<<< HEAD
6004- std::string LibSpirvFile;
6005- if (Args.hasArg (options::OPT_fsycl_libspirv_path_EQ)) {
6006- auto ProvidedPath =
6007- Args.getLastArgValue (options::OPT_fsycl_libspirv_path_EQ).str ();
6008- if (llvm::sys::fs::exists (ProvidedPath))
6009- #ifdef SYCLomatic_CUSTOMIZATION
6010- LibSpirvFile = std::move (ProvidedPath);
6011- #else
6012- LibSpirvFile = ProvidedPath;
6013- #endif
6014- } else {
6015- SmallVector<StringRef, 2 > LibraryPaths;
6016-
6017- // Expected path w/out install.
6018- SmallString<256 > WithoutInstallPath (C.getDriver ().ResourceDir );
6019- llvm::sys::path::append (WithoutInstallPath, Twine (" ../../clc" ));
6020- LibraryPaths.emplace_back (WithoutInstallPath.c_str ());
6021-
6022- // Expected path w/ install.
6023- SmallString<256 > WithInstallPath (C.getDriver ().ResourceDir );
6024- llvm::sys::path::append (WithInstallPath, Twine (" ../../../share/clc" ));
6025- LibraryPaths.emplace_back (WithInstallPath.c_str ());
6026-
6027- // Select remangled libclc variant
6028- StringRef LibSpirvTargetNamePref =
6029- TC ->getAuxTriple ()->isOSWindows ()
6030- ? " remangled-l32-signed_char.libspirv-"
6031- : " remangled-l64-signed_char.libspirv-" ;
6032-
6033- for (StringRef LibraryPath : LibraryPaths) {
6034- SmallString<128 > LibSpirvTargetFile (LibraryPath);
6035- llvm::sys::path::append (LibSpirvTargetFile,
6036- LibSpirvTargetNamePref +
6037- TC ->getTripleString () + " .bc" );
6038- if (llvm::sys::fs::exists (LibSpirvTargetFile) ||
6039- Args.hasArg (options::OPT__HASH_HASH_HASH )) {
6040- LibSpirvFile = std::string (LibSpirvTargetFile.str ());
6041- break ;
6042- }
6043- }
6044- }
6045- if (!LibSpirvFile.empty ()) {
6046- Arg *LibClcInputArg = MakeInputArg (Args, C.getDriver ().getOpts (),
6047- Args.MakeArgString (LibSpirvFile));
6048- =======
60496003 if (const char *LibSpirvFile = SYCLInstallation.findLibspirvPath (
60506004 TC ->getTriple (), Args, *TC ->getAuxTriple ())) {
60516005 Arg *LibClcInputArg =
60526006 MakeInputArg (Args, C.getDriver ().getOpts (), LibSpirvFile);
6053- >>>>>>> opensrc/sycl
60546007 auto *SYCLLibClcInputAction =
60556008 C.MakeAction <InputAction>(*LibClcInputArg, types::TY_LLVM_BC );
60566009 DeviceLinkObjects.push_back (SYCLLibClcInputAction);
0 commit comments