Skip to content

Commit

Permalink
Always use -Wl,--warn-unresolved-symbols in MSAN builds (#48835)
Browse files Browse the repository at this point in the history
* Always use `-Wl,--warn-unresolved-symbols` in MSAN builds

* Use `-Wl,--warn-unresolved-symbols` only on Linux and FreeBSD

(cherry picked from commit a07f512)
  • Loading branch information
giordano authored and KristofferC committed Mar 3, 2023
1 parent 8ba214d commit b710bd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,10 @@ SANITIZE_LDFLAGS :=
ifeq ($(SANITIZE_MEMORY),1)
SANITIZE_OPTS += -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer
SANITIZE_LDFLAGS += $(SANITIZE_OPTS)
endif
ifneq ($(findstring $(OS),Linux FreeBSD),)
SANITIZE_LDFLAGS += -Wl,--warn-unresolved-symbols
endif # OS Linux or FreeBSD
endif # SANITIZE_MEMORY=1
ifeq ($(SANITIZE_ADDRESS),1)
SANITIZE_OPTS += -fsanitize=address
SANITIZE_LDFLAGS += -fsanitize=address
Expand Down
2 changes: 1 addition & 1 deletion deps/libsuitesparse.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LIBSUITESPARSE_MFLAGS := CC="$(CC) $(SANITIZE_OPTS)" CXX="$(CXX) $(SANITIZE_OPTS
AR="$(AR)" RANLIB="$(RANLIB)" \
BLAS="-L$(build_shlibdir) -lblastrampoline" \
LAPACK="-L$(build_shlibdir) -lblastrampoline" \
LDFLAGS="$(SUITESPARSE_LIB) $(SANITIZE_LDFLAGS) -Wl,--warn-unresolved-symbols" CFOPENMP="" CUDA=no CUDA_PATH="" \
LDFLAGS="$(SUITESPARSE_LIB) $(SANITIZE_LDFLAGS)" CFOPENMP="" CUDA=no CUDA_PATH="" \
UMFPACK_CONFIG="$(UMFPACK_CONFIG)" \
CHOLMOD_CONFIG="$(CHOLMOD_CONFIG)" \
SPQR_CONFIG="$(SPQR_CONFIG)"
Expand Down

0 comments on commit b710bd2

Please sign in to comment.