mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
add -dead_strip_dylibs by default to the macOS linker
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" and with "-dead_strip_dylibs".
This commit is contained in:
@@ -165,14 +165,7 @@ LIBCUSTCALC_SHLIB= -dynamiclib -undefined dynamic_lookup \
|
||||
# To reduce dependency chains under macOS, we remove functions and
|
||||
# data that are unreachable by the entry point or exported symbols.
|
||||
#
|
||||
LDFLAGS+= -Wl,-dead_strip
|
||||
|
||||
# NOTE: Do not use: LDFLAGS+= -Wl,-dead_strip_dylibs
|
||||
#
|
||||
# This option should not be used when linking against a dylib which is
|
||||
# required at runtime for some indirect reason such as the dylib has an
|
||||
# important initializer. The libcalc and libcustcalc have
|
||||
# important initializers, and so this option should not be used.
|
||||
LDFLAGS+= -Wl,-dead_strip -Wl,-dead_strip_dylibs
|
||||
|
||||
# static library option
|
||||
#
|
||||
|
Reference in New Issue
Block a user