Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2082d82

Browse files
committed
Handle -DRUNTIMES_default_
1 parent 9e14f89 commit 2082d82

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,19 @@ function(runtime_register_target name)
298298
list(APPEND ${name}_extra_args -DLLVM_USE_LINKER=${LLVM_USE_LINKER})
299299

300300
get_cmake_property(variable_names VARIABLES)
301+
set(normalized_variable_names "")
302+
foreach(var ${variable_names})
303+
if(var MATCHES "^RUNTIMES_default_")
304+
string(REPLACE "RUNTIMES_default_" "RUNTIMES_${LLVM_DEFAULT_TARGET_TRIPLE}_" normalized_var "${var}")
305+
set(${normalized_var} "${${var}}")
306+
list(APPEND normalized_variable_names "${normalized_var}")
307+
else()
308+
list(APPEND normalized_variable_names "${var}")
309+
endif()
310+
endforeach()
311+
301312
foreach(extra_name IN ITEMS ${ARG_BASE_NAME} ${name})
302-
foreach(variable_name ${variable_names})
313+
foreach(variable_name ${normalized_variable_names})
303314
string(FIND "${variable_name}" "RUNTIMES_${extra_name}_" out)
304315
if("${out}" EQUAL 0)
305316
string(REPLACE "RUNTIMES_${extra_name}_" "" new_name ${variable_name})

0 commit comments

Comments
 (0)