Skip to content

Commit b8a7d81

Browse files
committed
[LLVM] Fix incorrect GPU triple detection for runtimes builds
Summary: This block of code is used to prevent a GPU-based cross compiling build from taking incompatible arguments. However this incorrectly used the LLVM default triple instead of the runtimes target. Fix that so the bots can continue to default the triple to NVPTX.
1 parent 492e8ba commit b8a7d81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ if( LLVM_ENABLE_ASSERTIONS )
120120
endif()
121121
endif()
122122

123-
# If we are targeting a GPU architecture we want to ignore all the standard
124-
# flag handling.
125-
if("${LLVM_DEFAULT_TARGET_TRIPLE}" MATCHES "^amdgcn" OR
126-
"${LLVM_DEFAULT_TARGET_TRIPLE}" MATCHES "^nvptx64")
123+
# If we are targeting a GPU architecture in a runtimes build we want to ignore
124+
# all the standard flag handling.
125+
if("${LLVM_RUNTIMES_TARGET}" MATCHES "^amdgcn" OR
126+
"${LLVM_RUNTIMES_TARGET}" MATCHES "^nvptx64")
127127
return()
128128
endif()
129129

0 commit comments

Comments
 (0)