Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/runtimes/CMakeLists.txt
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | llvm_ExternalProject_Add(builtins | ||||
PASSTHROUGH_PREFIXES COMPILER_RT | PASSTHROUGH_PREFIXES COMPILER_RT | ||||
DARWIN | DARWIN | ||||
SANITIZER | SANITIZER | ||||
USE_TOOLCHAIN | USE_TOOLCHAIN | ||||
TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} | TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} | ||||
${EXTRA_ARGS}) | ${EXTRA_ARGS}) | ||||
endfunction() | endfunction() | ||||
function(builtin_register_target compiler_rt_path target) | function(builtin_register_target compiler_rt_path name) | ||||
cmake_parse_arguments(ARG "" "" "DEPENDS" ${ARGN}) | cmake_parse_arguments(ARG "" "" "DEPENDS;CMAKE_ARGS;EXTRA_ARGS" ${ARGN}) | ||||
check_apple_target(${target} builtin) | |||||
get_cmake_property(variableNames VARIABLES) | set(${name}_extra_args ${ARG_CMAKE_ARGS}) | ||||
foreach(variableName ${variableNames}) | get_cmake_property(variable_names VARIABLES) | ||||
string(FIND "${variableName}" "BUILTINS_${target}" out) | foreach(variable_name ${variable_names}) | ||||
string(FIND "${variable_name}" "BUILTINS_${name}" out) | |||||
if("${out}" EQUAL 0) | if("${out}" EQUAL 0) | ||||
string(REPLACE "BUILTINS_${target}_" "" new_name ${variableName}) | string(REPLACE "BUILTINS_${name}_" "" new_name ${variable_name}) | ||||
string(REPLACE ";" "|" new_value "${${variableName}}") | string(REPLACE ";" "|" new_value "${${variable_name}}") | ||||
list(APPEND ${target}_extra_args "-D${new_name}=${new_value}") | list(APPEND ${name}_extra_args "-D${new_name}=${new_value}") | ||||
endif() | endif() | ||||
endforeach() | endforeach() | ||||
llvm_ExternalProject_Add(builtins-${target} | llvm_ExternalProject_Add(builtins-${name} | ||||
${compiler_rt_path}/lib/builtins | ${compiler_rt_path}/lib/builtins | ||||
DEPENDS ${ARG_DEPENDS} | DEPENDS ${ARG_DEPENDS} | ||||
CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR} | CMAKE_ARGS -DLLVM_LIBRARY_OUTPUT_INTDIR=${LLVM_LIBRARY_DIR} | ||||
-DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR} | -DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_TOOLS_BINARY_DIR} | ||||
-DLLVM_DEFAULT_TARGET_TRIPLE=${target} | |||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON | -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON | ||||
-DCMAKE_C_COMPILER_WORKS=ON | -DCMAKE_C_COMPILER_WORKS=ON | ||||
-DCMAKE_ASM_COMPILER_WORKS=ON | -DCMAKE_ASM_COMPILER_WORKS=ON | ||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON | -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON | ||||
${COMMON_CMAKE_ARGS} | ${COMMON_CMAKE_ARGS} | ||||
${${target}_extra_args} | ${${name}_extra_args} | ||||
USE_TOOLCHAIN | USE_TOOLCHAIN | ||||
TARGET_TRIPLE ${target} | ${EXTRA_ARGS} ${ARG_EXTRA_ARGS}) | ||||
${EXTRA_ARGS}) | |||||
endfunction() | endfunction() | ||||
# If compiler-rt is present we need to build the builtin libraries first. This | # If compiler-rt is present we need to build the builtin libraries first. This | ||||
# is required because the other runtimes need the builtin libraries present | # is required because the other runtimes need the builtin libraries present | ||||
# before the just-built compiler can pass the configuration tests. | # before the just-built compiler can pass the configuration tests. | ||||
get_compiler_rt_path(compiler_rt_path) | get_compiler_rt_path(compiler_rt_path) | ||||
if(compiler_rt_path) | if(compiler_rt_path) | ||||
if(NOT LLVM_BUILTIN_TARGETS) | if(NOT LLVM_BUILTIN_TARGETS) | ||||
builtin_default_target(${compiler_rt_path} | builtin_default_target(${compiler_rt_path} | ||||
DEPENDS clang-resource-headers) | DEPENDS clang-resource-headers) | ||||
else() | else() | ||||
if("default" IN_LIST LLVM_BUILTIN_TARGETS) | if("default" IN_LIST LLVM_BUILTIN_TARGETS) | ||||
builtin_default_target(${compiler_rt_path} | builtin_default_target(${compiler_rt_path} | ||||
DEPENDS clang-resource-headers) | DEPENDS clang-resource-headers) | ||||
list(REMOVE_ITEM LLVM_BUILTIN_TARGETS "default") | list(REMOVE_ITEM LLVM_BUILTIN_TARGETS "default") | ||||
else() | else() | ||||
add_custom_target(builtins) | add_custom_target(builtins) | ||||
add_custom_target(install-builtins) | add_custom_target(install-builtins) | ||||
add_custom_target(install-builtins-stripped) | add_custom_target(install-builtins-stripped) | ||||
endif() | endif() | ||||
foreach(target ${LLVM_BUILTIN_TARGETS}) | foreach(target ${LLVM_BUILTIN_TARGETS}) | ||||
check_apple_target(${target} builtin) | |||||
builtin_register_target(${compiler_rt_path} ${target} | builtin_register_target(${compiler_rt_path} ${target} | ||||
DEPENDS clang-resource-headers) | DEPENDS clang-resource-headers | ||||
CMAKE_ARGS -DLLVM_DEFAULT_TARGET_TRIPLE=${target} | |||||
EXTRA_ARGS TARGET_TRIPLE ${target}) | |||||
add_dependencies(builtins builtins-${target}) | add_dependencies(builtins builtins-${target}) | ||||
add_dependencies(install-builtins install-builtins-${target}) | add_dependencies(install-builtins install-builtins-${target}) | ||||
add_dependencies(install-builtins-stripped install-builtins-${target}-stripped) | add_dependencies(install-builtins-stripped install-builtins-${target}-stripped) | ||||
endforeach() | endforeach() | ||||
endif() | endif() | ||||
set(builtins_dep builtins) | set(builtins_dep builtins) | ||||
# We don't need to depend on the builtins if we're building instrumented | # We don't need to depend on the builtins if we're building instrumented | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | llvm_ExternalProject_Add(runtimes | ||||
${SUB_COMPONENTS} | ${SUB_COMPONENTS} | ||||
${SUB_CHECK_TARGETS} | ${SUB_CHECK_TARGETS} | ||||
${SUB_INSTALL_TARGETS} | ${SUB_INSTALL_TARGETS} | ||||
USE_TOOLCHAIN | USE_TOOLCHAIN | ||||
TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} | TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} | ||||
${EXTRA_ARGS}) | ${EXTRA_ARGS}) | ||||
endfunction() | endfunction() | ||||
# runtime_register_target(target) | # runtime_register_target(name) | ||||
# Utility function to register external runtime target. | # Utility function to register external runtime target. | ||||
function(runtime_register_target name target) | function(runtime_register_target name) | ||||
cmake_parse_arguments(ARG "" "" "DEPENDS;CMAKE_ARGS" ${ARGN}) | cmake_parse_arguments(ARG "" "BASE_NAME" "DEPENDS;CMAKE_ARGS;EXTRA_ARGS" ${ARGN}) | ||||
smeenai: This part of the multilib setup has always confused me. Is there only ever going to be one… | |||||
include(${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake OPTIONAL) | include(${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake OPTIONAL) | ||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake) | set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake) | ||||
check_apple_target(${target} runtime) | |||||
set(${name}_deps ${ARG_DEPENDS}) | |||||
if(NOT name STREQUAL target) | |||||
list(APPEND ${name}_deps runtimes-${target}) | |||||
endif() | |||||
foreach(runtime_name ${runtime_names}) | foreach(runtime_name ${runtime_names}) | ||||
set(${runtime_name}-${name} ${runtime_name}) | set(${runtime_name}-${name} ${runtime_name}) | ||||
set(install-${runtime_name}-${name} install-${runtime_name}) | set(install-${runtime_name}-${name} install-${runtime_name}) | ||||
set(install-${runtime_name}-${name}-stripped install-${runtime_name}-stripped) | set(install-${runtime_name}-${name}-stripped install-${runtime_name}-stripped) | ||||
list(APPEND ${name}_extra_targets ${runtime_name}-${name} install-${runtime_name}-${name} install-${runtime_name}-${name}-stripped) | list(APPEND ${name}_extra_targets ${runtime_name}-${name} install-${runtime_name}-${name} install-${runtime_name}-${name}-stripped) | ||||
if(LLVM_INCLUDE_TESTS) | if(LLVM_INCLUDE_TESTS) | ||||
set(check-${runtime_name}-${name} check-${runtime_name} ) | set(check-${runtime_name}-${name} check-${runtime_name} ) | ||||
list(APPEND ${name}_test_targets check-${runtime_name}-${name}) | list(APPEND ${name}_test_targets check-${runtime_name}-${name}) | ||||
endif() | endif() | ||||
endforeach() | endforeach() | ||||
foreach(target_name IN LISTS SUB_COMPONENTS) | foreach(component IN LISTS SUB_COMPONENTS) | ||||
set(${target_name}-${name} ${target_name}) | set(${component}-${name} ${component}) | ||||
list(APPEND ${name}_extra_targets ${target_name}-${name}) | list(APPEND ${name}_extra_targets ${component}-${name}) | ||||
endforeach() | endforeach() | ||||
foreach(target_name IN LISTS SUB_INSTALL_TARGETS) | foreach(target IN LISTS SUB_INSTALL_TARGETS) | ||||
set(${target_name}-${name} ${target_name}) | set(${target}-${name} ${target}) | ||||
set(${target_name}-${name}-stripped ${target_name}-stripped) | set(${target}-${name}-stripped ${target}-stripped) | ||||
list(APPEND ${name}_extra_targets ${target_name}-${name} ${target_name}-${name}-stripped) | list(APPEND ${name}_extra_targets ${target}-${name} ${target}-${name}-stripped) | ||||
endforeach() | endforeach() | ||||
foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS}) | foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS}) | ||||
if(NOT component IN_LIST SUB_COMPONENTS) | if(NOT component IN_LIST SUB_COMPONENTS) | ||||
set(${component}-${name} ${component}) | set(${component}-${name} ${component}) | ||||
set(install-${component}-${name} install-${component}) | set(install-${component}-${name} install-${component}) | ||||
set(install-${component}-${name}-stripped install-${component}-stripped) | set(install-${component}-${name}-stripped install-${component}-stripped) | ||||
list(APPEND ${name}_extra_targets ${component}-${name} install-${component}-${name} install-${component}-${name}-stripped) | list(APPEND ${name}_extra_targets ${component}-${name} install-${component}-${name} install-${component}-${name}-stripped) | ||||
Show All 9 Lines | if(LLVM_INCLUDE_TESTS) | ||||
set(component_check_targets) | set(component_check_targets) | ||||
foreach(component IN LISTS LLVM_RUNTIME_DISTRIBUTION_COMPONENTS) | foreach(component IN LISTS LLVM_RUNTIME_DISTRIBUTION_COMPONENTS) | ||||
if(NOT "check-${component}" IN_LIST SUB_CHECK_TARGETS) | if(NOT "check-${component}" IN_LIST SUB_CHECK_TARGETS) | ||||
list(APPEND component_check_targets "check-${component}") | list(APPEND component_check_targets "check-${component}") | ||||
endif() | endif() | ||||
endforeach() | endforeach() | ||||
foreach(target_name IN LISTS SUB_CHECK_TARGETS component_check_targets) | foreach(target IN LISTS SUB_CHECK_TARGETS component_check_targets) | ||||
set(${target_name}-${name} ${target_name}) | set(${target}-${name} ${target}) | ||||
list(APPEND ${name}_test_targets ${target_name}-${name}) | list(APPEND ${name}_test_targets ${target}-${name}) | ||||
list(APPEND test_targets ${target_name}-${name}) | list(APPEND test_targets ${target}-${name}) | ||||
endforeach() | endforeach() | ||||
set(test_targets "${test_targets}" PARENT_SCOPE) | set(test_targets "${test_targets}" PARENT_SCOPE) | ||||
endif() | endif() | ||||
set(${name}_extra_args ${ARG_CMAKE_ARGS}) | set(${name}_extra_args ${ARG_CMAKE_ARGS}) | ||||
get_cmake_property(variableNames VARIABLES) | get_cmake_property(variable_names VARIABLES) | ||||
foreach(variableName ${variableNames}) | foreach(extra_name IN ITEMS ${ARG_BASE_NAME} ${name}) | ||||
string(FIND "${variableName}" "RUNTIMES_${target}_" out) | foreach(variable_name ${variable_names}) | ||||
string(FIND "${variable_name}" "RUNTIMES_${extra_name}_" out) | |||||
if("${out}" EQUAL 0) | if("${out}" EQUAL 0) | ||||
string(REPLACE "RUNTIMES_${target}_" "" new_name ${variableName}) | string(REPLACE "RUNTIMES_${extra_name}_" "" new_name ${variable_name}) | ||||
string(REPLACE ";" "|" new_value "${${variableName}}") | string(REPLACE ";" "|" new_value "${${variable_name}}") | ||||
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}") | list(APPEND ${name}_extra_args "-D${new_name}=${new_value}") | ||||
endif() | endif() | ||||
endforeach() | endforeach() | ||||
if(NOT "${name}" STREQUAL "${target}") | |||||
foreach(variableName ${variableNames}) | |||||
string(FIND "${variableName}" "RUNTIMES_${name}_" out) | |||||
if("${out}" EQUAL 0) | |||||
string(REPLACE "RUNTIMES_${name}_" "" new_name ${variableName}) | |||||
string(REPLACE ";" "|" new_value "${${variableName}}") | |||||
list(APPEND ${name}_extra_args "-D${new_name}=${new_value}") | |||||
endif() | |||||
endforeach() | |||||
endif() | |||||
if(NOT RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES AND NOT RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES) | if(NOT RUNTIMES_${extra_name}_LLVM_ENABLE_RUNTIMES) | ||||
string(REPLACE ";" "|" LLVM_ENABLE_RUNTIMES_PASSTHROUGH "${LLVM_ENABLE_RUNTIMES}") | string(REPLACE ";" "|" LLVM_ENABLE_RUNTIMES_PASSTHROUGH "${LLVM_ENABLE_RUNTIMES}") | ||||
list(APPEND ${name}_extra_args -DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES_PASSTHROUGH}) | list(APPEND ${name}_extra_args -DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES_PASSTHROUGH}) | ||||
endif() | endif() | ||||
if(NOT RUNTIMES_${name}_LLVM_USE_LINKER AND NOT RUNTIMES_${target}_LLVM_USE_LINKER) | if(NOT RUNTIMES_${extra_name}_LLVM_USE_LINKER) | ||||
list(APPEND ${name}_extra_args -DLLVM_USE_LINKER=${LLVM_USE_LINKER}) | list(APPEND ${name}_extra_args -DLLVM_USE_LINKER=${LLVM_USE_LINKER}) | ||||
endif() | endif() | ||||
endforeach() | |||||
set_enable_per_target_runtime_dir() | set_enable_per_target_runtime_dir() | ||||
llvm_ExternalProject_Add(runtimes-${name} | llvm_ExternalProject_Add(runtimes-${name} | ||||
${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes | ${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes | ||||
DEPENDS ${${name}_deps} | DEPENDS ${ARG_DEPENDS} | ||||
# Builtins were built separately above | # Builtins were built separately above | ||||
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off | CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=OFF | ||||
-DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} | -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} | ||||
-DLLVM_DEFAULT_TARGET_TRIPLE=${target} | |||||
-DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED} | -DLLVM_ENABLE_PROJECTS_USED=${LLVM_ENABLE_PROJECTS_USED} | ||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR} | -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR} | ||||
-DCMAKE_C_COMPILER_WORKS=ON | -DCMAKE_C_COMPILER_WORKS=ON | ||||
-DCMAKE_CXX_COMPILER_WORKS=ON | -DCMAKE_CXX_COMPILER_WORKS=ON | ||||
-DCMAKE_ASM_COMPILER_WORKS=ON | -DCMAKE_ASM_COMPILER_WORKS=ON | ||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON | -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON | ||||
-DLLVM_RUNTIMES_TARGET=${name} | -DLLVM_RUNTIMES_TARGET=${name} | ||||
${COMMON_CMAKE_ARGS} | ${COMMON_CMAKE_ARGS} | ||||
${${name}_extra_args} | ${${name}_extra_args} | ||||
EXTRA_TARGETS ${${name}_extra_targets} | EXTRA_TARGETS ${${name}_extra_targets} | ||||
${${name}_test_targets} | ${${name}_test_targets} | ||||
USE_TOOLCHAIN | USE_TOOLCHAIN | ||||
TARGET_TRIPLE ${target} | ${EXTRA_ARGS} ${ARG_EXTRA_ARGS}) | ||||
${EXTRA_ARGS}) | |||||
endfunction() | endfunction() | ||||
if(runtimes) | if(runtimes) | ||||
# Create a runtimes target that uses this file as its top-level CMake file. | # Create a runtimes target that uses this file as its top-level CMake file. | ||||
# The runtimes target is a configuration of all the runtime libraries | # The runtimes target is a configuration of all the runtime libraries | ||||
# together in a single CMake invocation. | # together in a single CMake invocation. | ||||
set(extra_deps "") | set(extra_deps "") | ||||
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) | if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | else() | ||||
foreach(name ${LLVM_RUNTIME_TARGETS}) | foreach(name ${LLVM_RUNTIME_TARGETS}) | ||||
if(builtins_dep) | if(builtins_dep) | ||||
if (LLVM_BUILTIN_TARGETS) | if (LLVM_BUILTIN_TARGETS) | ||||
set(builtins_dep_name "${builtins_dep}-${name}") | set(builtins_dep_name "${builtins_dep}-${name}") | ||||
else() | else() | ||||
set(builtins_dep_name ${builtins_dep}) | set(builtins_dep_name ${builtins_dep}) | ||||
endif() | endif() | ||||
endif() | endif() | ||||
runtime_register_target(${name} ${name} | |||||
check_apple_target(${name} runtime) | |||||
runtime_register_target(${name} | |||||
DEPENDS ${builtins_dep_name} ${libc_tools} | DEPENDS ${builtins_dep_name} ${libc_tools} | ||||
CMAKE_ARGS ${libc_cmake_args}) | CMAKE_ARGS -DLLVM_DEFAULT_TARGET_TRIPLE=${name} ${libc_cmake_args}) | ||||
EXTRA_ARGS TARGET_TRIPLE ${name}) | |||||
add_dependencies(runtimes runtimes-${name}) | add_dependencies(runtimes runtimes-${name}) | ||||
add_dependencies(runtimes-configure runtimes-${name}-configure) | add_dependencies(runtimes-configure runtimes-${name}-configure) | ||||
add_dependencies(install-runtimes install-runtimes-${name}) | add_dependencies(install-runtimes install-runtimes-${name}) | ||||
add_dependencies(install-runtimes-stripped install-runtimes-${name}-stripped) | add_dependencies(install-runtimes-stripped install-runtimes-${name}-stripped) | ||||
if(LLVM_INCLUDE_TESTS) | if(LLVM_INCLUDE_TESTS) | ||||
add_dependencies(check-runtimes check-runtimes-${name}) | add_dependencies(check-runtimes check-runtimes-${name}) | ||||
add_dependencies(runtimes-test-depends runtimes-test-depends-${name}) | add_dependencies(runtimes-test-depends runtimes-test-depends-${name}) | ||||
endif() | endif() | ||||
foreach(runtime_name ${runtime_names}) | foreach(runtime_name ${runtime_names}) | ||||
add_dependencies(${runtime_name} ${runtime_name}-${name}) | add_dependencies(${runtime_name} ${runtime_name}-${name}) | ||||
add_dependencies(install-${runtime_name} install-${runtime_name}-${name}) | add_dependencies(install-${runtime_name} install-${runtime_name}-${name}) | ||||
add_dependencies(install-${runtime_name}-stripped install-${runtime_name}-${name}-stripped) | add_dependencies(install-${runtime_name}-stripped install-${runtime_name}-${name}-stripped) | ||||
endforeach() | endforeach() | ||||
foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS}) | foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS}) | ||||
add_dependencies(${component} ${component}-${name}) | add_dependencies(${component} ${component}-${name}) | ||||
add_dependencies(install-${component} install-${component}-${name}) | add_dependencies(install-${component} install-${component}-${name}) | ||||
add_dependencies(install-${component}-stripped install-${component}-${name}-stripped) | add_dependencies(install-${component}-stripped install-${component}-${name}-stripped) | ||||
endforeach() | endforeach() | ||||
endforeach() | endforeach() | ||||
foreach(multilib ${LLVM_RUNTIME_MULTILIBS}) | foreach(multilib ${LLVM_RUNTIME_MULTILIBS}) | ||||
foreach(name ${LLVM_RUNTIME_MULTILIB_${multilib}_TARGETS}) | foreach(name ${LLVM_RUNTIME_MULTILIB_${multilib}_TARGETS}) | ||||
runtime_register_target(${name}+${multilib} ${name} | runtime_register_target(${name}+${multilib} | ||||
DEPENDS runtimes-${name} | DEPENDS runtimes-${name} | ||||
CMAKE_ARGS -DLLVM_RUNTIMES_PREFIX=${name}/ | CMAKE_ARGS -DLLVM_DEFAULT_TARGET_TRIPLE=${name} | ||||
-DLLVM_RUNTIMES_LIBDIR_SUBDIR=${multilib}) | -DLLVM_RUNTIMES_PREFIX=${name}/ | ||||
-DLLVM_RUNTIMES_LIBDIR_SUBDIR=${multilib} | |||||
BASE_NAME ${name} | |||||
EXTRA_ARGS TARGET_TRIPLE ${name}) | |||||
add_dependencies(runtimes runtimes-${name}+${multilib}) | add_dependencies(runtimes runtimes-${name}+${multilib}) | ||||
add_dependencies(runtimes-configure runtimes-${name}+${multilib}-configure) | add_dependencies(runtimes-configure runtimes-${name}+${multilib}-configure) | ||||
add_dependencies(install-runtimes install-runtimes-${name}+${multilib}) | add_dependencies(install-runtimes install-runtimes-${name}+${multilib}) | ||||
add_dependencies(install-runtimes-stripped install-runtimes-${name}+${multilib}-stripped) | add_dependencies(install-runtimes-stripped install-runtimes-${name}+${multilib}-stripped) | ||||
foreach(runtime_name ${runtime_names}) | foreach(runtime_name ${runtime_names}) | ||||
add_dependencies(${runtime_name} ${runtime_name}-${name}+${multilib}) | add_dependencies(${runtime_name} ${runtime_name}-${name}+${multilib}) | ||||
add_dependencies(install-${runtime_name} install-${runtime_name}-${name}+${multilib}) | add_dependencies(install-${runtime_name} install-${runtime_name}-${name}+${multilib}) | ||||
add_dependencies(install-${runtime_name}-stripped install-${runtime_name}-${name}+${multilib}-stripped) | add_dependencies(install-${runtime_name}-stripped install-${runtime_name}-${name}+${multilib}-stripped) | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |
This part of the multilib setup has always confused me. Is there only ever going to be one extra name (as is the case in this diff)? If so, maybe something like BASE_NAME or a different name would convey the intent better?