Skip to content

Commit 19294cb

Browse files
committed
Output into lib/
1 parent 74f3797 commit 19294cb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

flang-rt/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ set(LLVM_TOOLS_DIR "${LLVM_BINARY_DIR}/bin")
8888
# Determine build and install paths.
8989
# The build path is absolute, but the install dir is relative, CMake's install
9090
# command has to apply CMAKE_INSTALL_PREFIX itself.
91+
get_toolchain_library_subdir(toolchain_lib_subdir)
9192
if (LLVM_TREE_AVAILABLE)
9293
# In a bootstrap build emit the libraries into a default search path in the
9394
# build directory of the just-built compiler. This allows using the
@@ -98,6 +99,8 @@ if (LLVM_TREE_AVAILABLE)
9899
include(GetClangResourceDir)
99100
get_clang_resource_dir(FLANG_RT_OUTPUT_RESOURCE_DIR PREFIX "${LLVM_LIBRARY_OUTPUT_INTDIR}/..")
100101
get_clang_resource_dir(FLANG_RT_INSTALL_RESOURCE_PATH)
102+
103+
extend_path(FLANG_RT_OUTPUT_RESOURCE_LIB_DIR "${FLANG_RT_OUTPUT_RESOURCE_DIR}" "${toolchain_lib_subdir}")
101104
else ()
102105
# In a standalone runtimes build, do not write into LLVM_BINARY_DIR. It may be
103106
# read-only and/or shared by multiple runtimes with different build
@@ -108,14 +111,12 @@ else ()
108111
# between bootstrap and standalone runtimes builds.
109112
set(FLANG_RT_OUTPUT_RESOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
110113
set(FLANG_RT_INSTALL_RESOURCE_PATH "${CMAKE_INSTALL_LIBDIR}/clang/${LLVM_VERSION_MAJOR}")
114+
115+
extend_path(FLANG_RT_OUTPUT_RESOURCE_LIB_DIR "${FLANG_RT_OUTPUT_RESOURCE_DIR}" "${CMAKE_INSTALL_LIBDIR}")
111116
endif ()
117+
extend_path(FLANG_RT_INSTALL_RESOURCE_LIB_PATH "${FLANG_RT_INSTALL_RESOURCE_PATH}" "${toolchain_lib_subdir}")
112118
cmake_path(NORMAL_PATH FLANG_RT_OUTPUT_RESOURCE_DIR)
113119
cmake_path(NORMAL_PATH FLANG_RT_INSTALL_RESOURCE_PATH)
114-
115-
# Determine subdirectories for build output and install destinations.
116-
get_toolchain_library_subdir(toolchain_lib_subdir)
117-
extend_path(FLANG_RT_OUTPUT_RESOURCE_LIB_DIR "${FLANG_RT_OUTPUT_RESOURCE_DIR}" "${toolchain_lib_subdir}")
118-
extend_path(FLANG_RT_INSTALL_RESOURCE_LIB_PATH "${FLANG_RT_INSTALL_RESOURCE_PATH}" "${toolchain_lib_subdir}")
119120
cmake_path(NORMAL_PATH FLANG_RT_OUTPUT_RESOURCE_LIB_DIR)
120121
cmake_path(NORMAL_PATH FLANG_RT_INSTALL_RESOURCE_LIB_PATH)
121122

0 commit comments

Comments
 (0)