SWDEV-371628 - Shift device lib linking into clang driver

Previously, we used the following approach and Comgr actions
for device lib linking:

    AMD_COMGR_COMPILE_SOURCE_TO_BC (compile with clang driver)
    AMD_COMGR_ADD_DEVICE_LIBRARIES (link in device libs with
      llvm-link API)

However, the clang driver can link in device libraries as part
of compilation, assuming a --rocm-path is set. In this context,
this is accomplished by using the following Comgr action instead:

  AMD_COMGR_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC (compile and
    link in device libs with clang driver)

Change-Id: I661465865365afecc44aa15d4df91bfab361af8d


[ROCm/clr commit: a4c5c44008]
Этот коммит содержится в:
Jacob Lambert
2023-04-13 16:25:13 -07:00
коммит произвёл Jacob Lambert
родитель 915677e9a0
Коммит 2e664d2492
2 изменённых файлов: 21 добавлений и 31 удалений
+3 -3
Просмотреть файл
@@ -457,13 +457,13 @@ class Program : public amd::HeapObject {
bool linkLLVMBitcode(const amd_comgr_data_set_t inputs,
const std::vector<std::string>& options,
amd::option::Options* amdOptions, amd_comgr_data_set_t* output,
char* binaryData[] = nullptr, size_t* binarySize = nullptr,
const bool link_dev_libs = true);
char* binaryData[] = nullptr, size_t* binarySize = nullptr);
//! Create the bitcode of the compiled input dataset
bool compileToLLVMBitcode(const amd_comgr_data_set_t compileInputs,
const std::vector<std::string>& options, amd::option::Options* amdOptions,
char* binaryData[], size_t* binarySize);
char* binaryData[], size_t* binarySize,
const bool link_dev_libs = true);
//! Compile and create the excutable of the input dataset
bool compileAndLinkExecutable(const amd_comgr_data_set_t inputs,