[compiler-rt] 345b058 - [memprof] Respect COMPILER_RT_BUILD_MEMPROF when install memprof headers

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 18:35:46 PDT 2022


Author: Enna1
Date: 2022-10-25T09:35:22+08:00
New Revision: 345b0587a3556e4039f47b4f49ddac45f53fad0b

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

LOG: [memprof] Respect COMPILER_RT_BUILD_MEMPROF when install memprof headers

When COMPILER_RT_BUILD_MEMPROF is disabled, the memprof headers should not be installed.

Reviewed By: mgorny, tejohnson

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

Added: 
    

Modified: 
    compiler-rt/include/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/include/CMakeLists.txt b/compiler-rt/include/CMakeLists.txt
index 9fb8b0d8db970..78427beedb3cc 100644
--- a/compiler-rt/include/CMakeLists.txt
+++ b/compiler-rt/include/CMakeLists.txt
@@ -84,10 +84,12 @@ install(FILES ${FUZZER_HEADERS}
   PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
   DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/fuzzer)
 # Install memprof headers.
-install(FILES sanitizer/memprof_interface.h
-  COMPONENT compiler-rt-headers
-  PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-  DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
+if (COMPILER_RT_BUILD_MEMPROF)
+  install(FILES sanitizer/memprof_interface.h
+    COMPONENT compiler-rt-headers
+    PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+    DESTINATION ${COMPILER_RT_INSTALL_INCLUDE_DIR}/sanitizer)
+endif(COMPILER_RT_BUILD_MEMPROF)
 # Install xray headers.
 install(FILES ${XRAY_HEADERS}
   COMPONENT compiler-rt-headers


        


More information about the llvm-commits mailing list