Skip to content

Commit

Permalink
[runtimes] Fix not correctly searching target builtins directories (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
jhuber6 authored Aug 13, 2024
1 parent 1ccd7ab commit ad6558c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion llvm/runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ endforeach()
function(get_compiler_rt_path path)
set(all_runtimes ${runtimes})
foreach(name ${LLVM_RUNTIME_TARGETS})
list(APPEND all_runtimes ${RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES})
foreach(proj ${RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES})
set(proj_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
if(IS_DIRECTORY ${proj_dir} AND EXISTS ${proj_dir}/CMakeLists.txt)
list(APPEND all_runtimes ${proj_dir})
endif()
endforeach()
endforeach()
list(REMOVE_DUPLICATES all_runtimes)
foreach(entry ${all_runtimes})
Expand Down

0 comments on commit ad6558c

Please sign in to comment.