Issue 52934
Summary Make codesign of compiler-rt dylibs optional [macOS]
Labels enhancement, cmake, compiler-rt
Assignees
Reporter JohanEngelen
    To be able to rename the compiler-rt dylibs (to ensure our compiler uses the correct libs), the dylibs must not be codesigned.
I want to make codesigning of the dylibs optional in the cmake configuration (default = ON, same as current behavior).
Any concerns before I work on this? Thanks for your comments.

The patch can be something like this (+ defining the configuration option somewhere):

```diff
Index: cmake/Modules/AddCompilerRT.cmake
===================================================================
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake	(revision 342374)
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake	(working copy)
@@ -290,14 +290,6 @@
         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
       endif()
-     if(APPLE)
+     if(APPLE AND COMPILER_RT_CODESIGN_DYLIBS)
       # Ad-hoc sign the dylibs
       add_custom_command(TARGET ${libname}
         POST_BUILD  
         COMMAND codesign --sign - $<TARGET_FILE:${libname}>
         WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
       )
     endif()
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to