improve macOS shared library building and use by calc

Dropped the use of Makefile variable ${SET_INSTALL_NAME}.
Under macOS it was always needed, elsewhere it was not.

Under macOS, the current version of both libcalc and
libcustcalc are set to the current calc release version.

Under macOS, to reduce dependency chains, we remove functions and
data that are unreachable by the entry point or exported symbols.
In particular, the linker is run with "-dead_strip".
This commit is contained in:
Landon Curt Noll
2023-08-14 03:27:17 -07:00
parent 6ee34e709d
commit ee900ec6ec
3 changed files with 117 additions and 185 deletions

View File

@@ -85,13 +85,3 @@
# LDFLAGS+= -Wno-invalid-command-line-argument ${FSANITIZE} -fno-omit-frame-pointer
# CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1
####
####
# To reduce dependency chains under macOS:
#
# This comment block was tested under:
#
# macOS 13.5 with clang version 14.0.3 (clang-1403.0.22.14.1)
#
# LDFLAGS+= -Wl,-dead_strip_dylibs -Wl,-dead_strip
####