Skip to content

Commit ad6558c

Browse files
authored
[runtimes] Fix not correctly searching target builtins directories (#103311)
Summary: Enabling `compiler-rt` only worked previously if we had it in the default target. This is because we didn't extract the path carefully. This patch fixes that by getting the correct path and appending it, instead of just the project name.
1 parent 1ccd7ab commit ad6558c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ endforeach()
1919
function(get_compiler_rt_path path)
2020
set(all_runtimes ${runtimes})
2121
foreach(name ${LLVM_RUNTIME_TARGETS})
22-
list(APPEND all_runtimes ${RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES})
22+
foreach(proj ${RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES})
23+
set(proj_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
24+
if(IS_DIRECTORY ${proj_dir} AND EXISTS ${proj_dir}/CMakeLists.txt)
25+
list(APPEND all_runtimes ${proj_dir})
26+
endif()
27+
endforeach()
2328
endforeach()
2429
list(REMOVE_DUPLICATES all_runtimes)
2530
foreach(entry ${all_runtimes})

0 commit comments

Comments
 (0)