[libc-commits] [PATCH] D158895: [libc] Fix the libc header installation path

Petr Hosek via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Aug 25 14:27:02 PDT 2023


phosek created this revision.
phosek added reviewers: michaelrj, sivachandra.
Herald added projects: libc-project, All.
Herald added a subscriber: libc-commits.
phosek requested review of this revision.

This results in headers being installed in the wrong location.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158895

Files:
  libc/include/CMakeLists.txt


Index: libc/include/CMakeLists.txt
===================================================================
--- libc/include/CMakeLists.txt
+++ libc/include/CMakeLists.txt
@@ -540,7 +540,7 @@
     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 @@
       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})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158895.553627.patch
Type: text/x-patch
Size: 1084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230825/b573d284/attachment.bin>


More information about the libc-commits mailing list