qa.sh: Fix incomplete link flags for Address Sanitizer
Prefix "-Wc," is fot libtool, see https://www.gnu.org/software/libtool/manual/libtool.html#Stripped-link-flags
This commit is contained in:
parent
dc27db3ea0
commit
1d24a9dc61
@ -16,6 +16,7 @@ set -o nounset
|
||||
: ${MAKE:=make}
|
||||
|
||||
: ${BASE_COMPILE_FLAGS:="-pipe -Wall -Wextra -pedantic -Wno-overlength-strings -Wno-long-long"}
|
||||
: ${BASE_LINK_FLAGS:=}
|
||||
|
||||
ANNOUNCE() {
|
||||
local open='\e[1m'
|
||||
@ -44,6 +45,7 @@ main() {
|
||||
local CC="${CLANG_CC}"
|
||||
local CXX="${CLANG_CXX}"
|
||||
BASE_COMPILE_FLAGS+=" -g -fsanitize=address -fno-omit-frame-pointer"
|
||||
BASE_LINK_FLAGS+=" -g -Wc,-fsanitize=address" # "-Wc," is for libtool
|
||||
;;
|
||||
coverage | lib-coverage | app-coverage)
|
||||
local CC="${GCC_CC}"
|
||||
@ -78,6 +80,7 @@ main() {
|
||||
|
||||
local CFLAGS="-std=c89 ${BASE_COMPILE_FLAGS} ${CFLAGS:-}"
|
||||
local CXXFLAGS="-std=c++98 ${BASE_COMPILE_FLAGS} ${CXXFLAGS:-}"
|
||||
local LDFLAGS="${BASE_LINK_FLAGS} ${LDFLAGS:-}"
|
||||
|
||||
(
|
||||
set -e
|
||||
@ -85,7 +88,7 @@ main() {
|
||||
RUN CC="${CC}" CFLAGS="${CFLAGS}" \
|
||||
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
|
||||
AR="${AR}" \
|
||||
LD="${LD}" \
|
||||
LD="${LD}" LDFLAGS="${LDFLAGS}" \
|
||||
./configure "$@"
|
||||
|
||||
RUN "${MAKE}" \
|
||||
|
Loading…
Reference in New Issue
Block a user