mirror of
https://github.com/Z3Prover/z3
synced 2026-02-10 11:00:52 +00:00
Add -headerpad_max_install_names flag for macOS dylib builds
This fixes the install_name_tool issue on macOS where the tool fails with "larger updated load commands do not fit". The linker flag -Wl,-headerpad_max_install_names ensures sufficient header padding in the Mach-O binary for install_name_tool to modify install names. Changes made: - CMake: Added flag to libz3, z3java, z3jl shared libraries on Darwin - Python build: Changed flag from ML-only to all macOS builds - OCaml CMake: Added flag to OCaml stublib build on APPLE Fixes #7623 (regression in 4.15.5) Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
f988e76da6
commit
a08e8a99f9
5 changed files with 18 additions and 1 deletions
|
|
@ -48,6 +48,10 @@ target_include_directories(z3java PRIVATE
|
|||
"${PROJECT_BINARY_DIR}/src/api"
|
||||
${JNI_INCLUDE_DIRS}
|
||||
)
|
||||
# Add header padding for macOS to allow install_name_tool to modify the dylib
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
target_link_options(z3java PRIVATE "-Wl,-headerpad_max_install_names")
|
||||
endif()
|
||||
# FIXME: Should this library have SONAME and VERSION set?
|
||||
|
||||
# This prevents CMake from automatically defining ``z3java_EXPORTS``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue