Skip to content

Commit

Permalink
Merge pull request #629 from wasmx/ci_sanitizers
Browse files Browse the repository at this point in the history
ci: Use libc++ for sanitizers-clang job
  • Loading branch information
chfast authored Nov 2, 2020
2 parents 06ef9f0 + 583a077 commit ec36ae8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
endif()
endif()

if(SANITIZE MATCHES address)
# Enables ASan-powered checks in std::vector in libstdc++.
# For sanity, this may be applied for libstdc++ builds, but it is not easy to detect
# what standard library implementation is being used.
add_compile_definitions(_GLIBCXX_SANITIZE_VECTOR)
endif()

# An option to enable assertions in non-Debug build types.
# Disabling assertions in Debug build type has no effect (assertions are still enabled).
option(ENABLE_ASSERTIONS "Enable NDEBUG based assertions" OFF)
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ jobs:
- checkout
- build:
build_type: RelWithDebInfo
cmake_options: -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
cmake_options: -DCMAKE_TOOLCHAIN_FILE=~/project/cmake/toolchains/libc++.cmake -DENABLE_ASSERTIONS=ON -DSANITIZE=address,undefined,nullability,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation
- test
- benchmark:
min_time: "0.01"
Expand Down
1 change: 0 additions & 1 deletion cmake/ProjectWabt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ endif()
if(SANITIZE MATCHES address)
# Instrument WABT with ASan - required for container-overflow checks.
set(CPPFLAGS "-fsanitize=address ${CPPFLAGS}")
set(CXXFLAGS "-D_GLIBCXX_SANITIZE_VECTOR ${CXXFLAGS}")
endif()

set(CXXFLAGS "${CPPFLAGS} ${CXXFLAGS}")
Expand Down

0 comments on commit ec36ae8

Please sign in to comment.