3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-09 18:40:51 +00:00

Apply headerpad fix to build systems (Python and CMake) and fix validation test paths

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-08 17:23:04 +00:00
parent 406e99b0d2
commit af76ac69d6
6 changed files with 20 additions and 3 deletions

View file

@ -151,6 +151,11 @@ endif()
# so that if those are also shared libraries they are referenced by `libz3.so`.
target_link_libraries(libz3 PRIVATE ${Z3_DEPENDENT_LIBS})
# On macOS, add headerpad for install_name_tool compatibility
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND BUILD_LIBZ3_SHARED)
target_link_options(libz3 PRIVATE "-Wl,-headerpad_max_install_names")
endif()
################################################################################
# Create include directory with headers for easier developer integration
################################################################################

View file

@ -50,6 +50,11 @@ target_include_directories(z3java PRIVATE
)
# FIXME: Should this library have SONAME and VERSION set?
# On macOS, add headerpad for install_name_tool compatibility
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_options(z3java PRIVATE "-Wl,-headerpad_max_install_names")
endif()
# This prevents CMake from automatically defining ``z3java_EXPORTS``
set_property(TARGET z3java PROPERTY DEFINE_SYMBOL "")

View file

@ -35,6 +35,11 @@ target_include_directories(z3jl PRIVATE
"${PROJECT_SOURCE_DIR}/src/api/c++"
)
# On macOS, add headerpad for install_name_tool compatibility
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_options(z3jl PRIVATE "-Wl,-headerpad_max_install_names")
endif()
option(Z3_INSTALL_JULIA_BINDINGS "Install Julia bindings when invoking install target" ON)
if(Z3_INSTALL_JULIA_BINDINGS)
install(TARGETS z3jl

View file

@ -159,6 +159,8 @@ endif()
if( APPLE )
# set(ocaml_rpath "@executable_path/../libz3${so_ext}")
# Add headerpad for install_name_tool compatibility on macOS
list(APPEND c_lib_deps "-Wl,-headerpad_max_install_names")
elseif( UNIX )
set(ocaml_rpath "\\$ORIGIN/../libz3${so_ext}")
list(APPEND c_lib_deps "-dllpath" ${ocaml_rpath})