From b5f6574895e68554794d511fd0a6bde3771c6f1d Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 6 May 2020 12:53:31 -0400 Subject: [PATCH] Do not use llvm-dis to pick the triple There are a couple problems with this. First, llvm-dis is an unstable llvm development tool and 3rd party users should generally not rely on it. The text format is unstable, and the regex here isn't even explicitly looking for the target triple field, so it could accidentally find something else. Second, picking the target to compile based on the library you are linking is a fundamentally backwards decision. The target you're compiling for changes the library you would want to link. The device libraries are only ever compiled with amdgcn-amd-amdhsa. If we had a second triple, this should be explicitly building for any it cares about. Change-Id: I3bae8398f60f78df61ab2177aa9e83f47ec6dea4 [ROCm/ROCR-Runtime commit: 96d414060984af5725e4399da1770c0e523f4f88] --- .../runtime/hsa-runtime/image/blit_src/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt index 59dcf49c06..9318a7ae66 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt @@ -107,10 +107,7 @@ if (QUIT) return() endif() -# Determine the target triple -execute_process(COMMAND ${LLVM_DIS} ${BITCODE_LIB} -o - OUTPUT_VARIABLE LLVM_DIS_OUTPUT) -string(REGEX MATCH "(amdgcn-amd-.*)\"[\r\n]" QUOTED_TRIPLE "${LLVM_DIS_OUTPUT}") -string(REGEX REPLACE "[\"\r\n]" "" TARGET_TRIPLE "${QUOTED_TRIPLE}") +set(TARGET_TRIPLE "amdgcn-amd-amdhsa") message("") message("Build Setting:")