Skip to content

Commit e9a9611

Browse files
author
Maxim Egorushkin
committed
sanitize options updated.
1 parent ec946bc commit e9a9611

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,23 @@ AR := $(call toolset_exe,ar,ar)
4747

4848
cxxflags.gcc.debug := -Og -f{stack-protector-all,no-omit-frame-pointer} # -D_GLIBCXX_DEBUG
4949
cxxflags.gcc.release := -O3 -mtune=native -falign-{functions,loops}=64 -DNDEBUG
50-
cxxflags.gcc.sanitize := ${cxxflags.gcc.debug} -fsanitize=thread
51-
cxxflags.gcc.sanitize2 := ${cxxflags.gcc.debug} -fsanitize=undefined,address
50+
cxxflags.gcc.sanitize := ${cxxflags.gcc.release} -fsanitize=thread
51+
cxxflags.gcc.sanitize2 := ${cxxflags.gcc.release} -fsanitize=undefined,address
5252
cxxflags.gcc := -march=native -f{no-plt,no-math-errno,finite-math-only,message-length=0} -W{all,extra,error,no-{array-bounds,maybe-uninitialized,unused-variable,unused-function,unused-local-typedefs}} ${cxxflags.gcc.${BUILD}}
53-
ldflags.gcc.sanitize := ${ldflags.gcc.debug} -fsanitize=thread -static-libtsan
54-
ldflags.gcc.sanitize2 := ${ldflags.gcc.debug} -fsanitize=undefined,address -static-lib{a,l,ub}san
53+
ldflags.gcc.sanitize := ${ldflags.gcc.release} -fsanitize=thread -static-libtsan
54+
ldflags.gcc.sanitize2 := ${ldflags.gcc.release} -fsanitize=undefined,address -static-lib{a,l,ub}san
5555
ldflags.gcc := -fuse-ld=gold ${ldflags.gcc.${BUILD}}
5656

5757
# clang-14 for arm doesn't support -march=native.
5858
has_native := $(if $(and $(findstring clang,${CXX}), $(findstring aarch64,$(shell uname -m)), $(shell ${CXX} -march=native -c -xc++ -o/dev/null /dev/null 2>&1)),,1)
5959
cxxflags.clang.debug := -O0 -fstack-protector-all $(and ${has_native},-march=native)
6060
cxxflags.clang.release := -O3 -falign-functions=64 -DNDEBUG $(and ${has_native},-march=native -mtune=native)
61-
cxxflags.clang.sanitize := ${cxxflags.clang.debug} -fsanitize=thread
62-
cxxflags.clang.sanitize2 := ${cxxflags.clang.debug} -fsanitize=undefined,address
61+
cxxflags.clang.sanitize := ${cxxflags.clang.release} -fsanitize=thread
62+
cxxflags.clang.sanitize2 := ${cxxflags.clang.release} -fsanitize=undefined,address
6363
cxxflags.clang := -stdlib=libstdc++ -f{no-plt,no-math-errno,finite-math-only,message-length=0} -W{all,extra,error,no-{unused-variable,unused-function,unused-local-typedefs}} ${cxxflags.clang.${BUILD}}
6464
ldflags.clang.debug := -latomic # A work-around for clang bug.
65-
ldflags.clang.sanitize := ${ldflags.clang.debug} -fsanitize=thread
66-
ldflags.clang.sanitize2 := ${ldflags.clang.debug} -fsanitize=undefined,address -static-libasan
65+
ldflags.clang.sanitize := ${ldflags.clang.release} -fsanitize=thread
66+
ldflags.clang.sanitize2 := ${ldflags.clang.release} -fsanitize=undefined,address -static-libasan
6767
ldflags.clang := -stdlib=libstdc++ ${ldflags.clang.${BUILD}}
6868

6969
# Additional CPPFLAGS, CXXFLAGS, LDLIBS, LDFLAGS can come from the command line, e.g. make CPPFLAGS='-I<my-include-dir>', or from environment variables.

0 commit comments

Comments
 (0)