[compiler-rt] r249199 - [CMake] [darwin] [builtins] Add INSTALL_DIR to darwin_lipo_libs

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 15:14:25 PDT 2015


Author: cbieneman
Date: Fri Oct  2 17:14:25 2015
New Revision: 249199

URL: http://llvm.org/viewvc/llvm-project?rev=249199&view=rev
Log:
[CMake] [darwin] [builtins] Add INSTALL_DIR to darwin_lipo_libs

The darwin and macho_embedded libraries get installed to different locations, so we need to feed through an INSTALL_PATH.

Modified:
    compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake

Modified: compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake?rev=249199&r1=249198&r2=249199&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake Fri Oct  2 17:14:25 2015
@@ -183,7 +183,7 @@ endmacro()
 function(darwin_lipo_libs name)
   cmake_parse_arguments(LIB
     ""
-    "PARENT_TARGET;OUTPUT_DIR"
+    "PARENT_TARGET;OUTPUT_DIR;INSTALL_DIR"
     "LIPO_FLAGS;DEPENDS"
     ${ARGN})
   add_custom_command(OUTPUT ${LIB_OUTPUT_DIR}/lib${name}.a
@@ -197,7 +197,8 @@ function(darwin_lipo_libs name)
     DEPENDS ${LIB_OUTPUT_DIR}/lib${name}.a)
   add_dependencies(${LIB_PARENT_TARGET} ${name})
   install(FILES ${LIB_OUTPUT_DIR}/lib${name}.a
-    DESTINATION ${COMPILER_RT_INSTALL_PATH})
+    DESTINATION ${LIB_INSTALL_DIR})
+  message("LIB_INSTALL_DIR: ${LIB_INSTALL_DIR}")
 endfunction()
 
 # Filter out generic versions of routines that are re-implemented in
@@ -297,7 +298,8 @@ macro(darwin_add_builtin_libraries)
                       PARENT_TARGET builtins
                       LIPO_FLAGS ${${os}_cc_kext_lipo_flags}
                       DEPENDS ${${os}_cc_kext_libs}
-                      OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+                      OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+                      INSTALL_DIR ${COMPILER_RT_LIBRARY_INSTALL_DIR})
     endif()
   endforeach()
 
@@ -308,7 +310,8 @@ macro(darwin_add_builtin_libraries)
                         PARENT_TARGET builtins
                         LIPO_FLAGS ${${os}_builtins_lipo_flags} ${${os}sim_builtins_lipo_flags}
                         DEPENDS ${${os}_builtins_libs} ${${os}sim_builtins_libs}
-                        OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR})
+                        OUTPUT_DIR ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+                        INSTALL_DIR ${COMPILER_RT_LIBRARY_INSTALL_DIR})
     endif()
   endforeach()
   darwin_add_embedded_builtin_libraries()
@@ -339,6 +342,8 @@ function(darwin_add_embedded_builtin_lib
 
   set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
     ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+  set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
+    ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
     
   set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
   set(CFLAGS_armv7em "-target thumbv7-apple-darwin-eabi")
@@ -400,7 +405,8 @@ function(darwin_add_embedded_builtin_lib
                     PARENT_TARGET builtins
                     LIPO_FLAGS ${macho_embedded_${lib_suffix}_lipo_flags}
                     DEPENDS ${macho_embedded_${lib_suffix}_libs}
-                    OUTPUT_DIR ${DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR})
+                    OUTPUT_DIR ${DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR}
+                    INSTALL_DIR ${DARWIN_macho_embedded_LIBRARY_INSTALL_DIR})
     endforeach()
   endforeach()
 endfunction()




More information about the llvm-commits mailing list