@@ -88,6 +88,7 @@ set(LLVM_TOOLS_DIR "${LLVM_BINARY_DIR}/bin")
88
88
# Determine build and install paths.
89
89
# The build path is absolute, but the install dir is relative, CMake's install
90
90
# command has to apply CMAKE_INSTALL_PREFIX itself.
91
+ get_toolchain_library_subdir (toolchain_lib_subdir )
91
92
if (LLVM_TREE_AVAILABLE )
92
93
# In a bootstrap build emit the libraries into a default search path in the
93
94
# build directory of the just-built compiler. This allows using the
@@ -98,6 +99,8 @@ if (LLVM_TREE_AVAILABLE)
98
99
include (GetClangResourceDir )
99
100
get_clang_resource_dir (FLANG_RT_OUTPUT_RESOURCE_DIR PREFIX "${LLVM_LIBRARY_OUTPUT_INTDIR} /.." )
100
101
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} " )
101
104
else ()
102
105
# In a standalone runtimes build, do not write into LLVM_BINARY_DIR. It may be
103
106
# read-only and/or shared by multiple runtimes with different build
@@ -108,14 +111,12 @@ else ()
108
111
# between bootstrap and standalone runtimes builds.
109
112
set (FLANG_RT_OUTPUT_RESOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR} " )
110
113
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} " )
111
116
endif ()
117
+ extend_path (FLANG_RT_INSTALL_RESOURCE_LIB_PATH "${FLANG_RT_INSTALL_RESOURCE_PATH} " "${toolchain_lib_subdir} " )
112
118
cmake_path (NORMAL_PATH FLANG_RT_OUTPUT_RESOURCE_DIR )
113
119
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} " )
119
120
cmake_path (NORMAL_PATH FLANG_RT_OUTPUT_RESOURCE_LIB_DIR )
120
121
cmake_path (NORMAL_PATH FLANG_RT_INSTALL_RESOURCE_LIB_PATH )
121
122
0 commit comments