[libc-commits] [libc] dd07039 - [libc] Fix the libc header installation path

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Mon Aug 28 22:21:43 PDT 2023


Author: Petr Hosek
Date: 2023-08-29T05:21:14Z
New Revision: dd070394a3106217e0e4cdcf589f131c4946096c

URL: https://github.com/llvm/llvm-project/commit/dd070394a3106217e0e4cdcf589f131c4946096c
DIFF: https://github.com/llvm/llvm-project/commit/dd070394a3106217e0e4cdcf589f131c4946096c.diff

LOG: [libc] Fix the libc header installation path

This results in headers being installed in the wrong location.

Differential Revision: https://reviews.llvm.org/D158895

Added: 
    

Modified: 
    libc/include/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index ab04b8d2e5ca8c..2e57275e10bc4c 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -540,7 +540,7 @@ foreach(target IN LISTS all_install_header_targets)
     message(FATAL_ERROR "Installable header file '${target}' does not have the "
                         "HEADER_FILE_PATH property set.")
   endif()
-  file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_BINARY_DIR} ${header_file})
+  file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${header_file})
   get_filename_component(nested_dir ${relative_path} DIRECTORY)
   install(FILES ${header_file}
           DESTINATION ${LIBC_INSTALL_INCLUDE_DIR}/${nested_dir}
@@ -554,7 +554,7 @@ foreach(target IN LISTS all_install_header_targets)
       continue()
     endif()
     get_clang_resource_dir(resource_dir SUBDIR include)
-    file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_BINARY_DIR} ${decls_file})
+    file(RELATIVE_PATH relative_path ${LIBC_INCLUDE_DIR} ${decls_file})
     get_filename_component(nested_dir ${relative_path} DIRECTORY)
     set(install_dir
         ${CMAKE_INSTALL_PREFIX}/${resource_dir}/llvm_libc_wrappers/${nested_dir})


        


More information about the libc-commits mailing list