linux: add -Wl,--no-undefined shared object link flag

Helps to avoid stupid situation where something was referenced
but wasn't added in the build.
This commit is contained in:
Alibek Omarov 2024-08-31 02:40:41 +03:00
parent edbae22970
commit 783b54dfe2

View file

@ -54,9 +54,9 @@ endif
SHLIBEXT=so
SHLIBCFLAGS=
ifeq "$(CFG)" "release"
SHLIBLDFLAGS="-shared -Wl,-Map,$@_map.txt"
SHLIBLDFLAGS="-shared -Wl,-Map,$@_map.txt -Wl,--no-undefined"
else
SHLIBLDFLAGS="-shared -gdwarf-2 -g2 -Wl,-Map,$@_map.txt"
SHLIBLDFLAGS="-shared -gdwarf-2 -g2 -Wl,-Map,$@_map.txt -Wl,--no-undefined"
endif
AR=ar