Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/jemalloc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if test "$has_jemalloc" != "no"; then
if test "$jemalloc_base_dir" != "/usr"; then
TS_ADDTO(CPPFLAGS, [-I${jemalloc_include}])
TS_ADDTO(LDFLAGS, [-L${jemalloc_ldflags}])
TS_ADDTO(LDFLAGS, [-Wl,--add-needed -L${jemalloc_ldflags} -Wl,-rpath,${jemalloc_ldflags} -Wl,--no-as-needed])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duke8253 is this typo of --as-needed option? Because this line has --no-as-needed option at the end and it restores the default behavior.

If we really need --add-needed option here, --copy-dt-needed-entries is the replacement, but lld doesn't have it either.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a typo because I remember coming back to this and thought it was a typo, but changing it broke stuff. Though I can't remember exactly what was it now, vaguely recall that something about the order of specifying those options made a difference.

TS_ADDTO(LDFLAGS, [-Wl,--as-needed -L${jemalloc_ldflags} -Wl,-rpath,${jemalloc_ldflags} -Wl,--no-as-needed])
TS_ADDTO_RPATH(${jemalloc_ldflags})
fi
# On Darwin, jemalloc symbols are prefixed with je_. Search for that first, then fall back
Expand Down
2 changes: 1 addition & 1 deletion build/mimalloc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if test "$has_mimalloc" != "no"; then
if test "$mimalloc_base_dir" != "/usr"; then
TS_ADDTO(CPPFLAGS, [-I${mimalloc_include}])
TS_ADDTO(LDFLAGS, [-L${mimalloc_ldflags}])
TS_ADDTO(LDFLAGS, [-Wl,--add-needed -L${mimalloc_ldflags} -Wl,-rpath,${mimalloc_ldflags} -Wl,--no-as-needed])
TS_ADDTO(LDFLAGS, [-Wl,--as-needed -L${mimalloc_ldflags} -Wl,-rpath,${mimalloc_ldflags} -Wl,--no-as-needed])
TS_ADDTO_RPATH(${mimalloc_ldflags})
fi
AC_SEARCH_LIBS([mi_malloc], [mimalloc], [mimalloc_has_libs=1])
Expand Down