Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
zsliu98 committed Nov 17, 2024
1 parent 1f2a087 commit ec916d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
fail-fast: false # show all errors for each platform (vs. cancel jobs on error)
matrix:
include:
# - name: Linux
# os: ubuntu-22.04
# pluginval-binary: ./pluginval
# boost_platform_version: "22.04"
# boost_toolset: "gcc"
# plugin_os_format: "VST3"
- name: Linux
os: ubuntu-22.04
pluginval-binary: ./pluginval
boost_platform_version: "22.04"
boost_toolset: "gcc"
plugin_os_format: "VST3"
# cmake_extra_flags: -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17
- name: macOS
os: macos-15
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
- name: Configure Pluginval
shell: bash
working-directory: ./pluginval
run: cmake -B ${{ env.BUILD_DIR }} -G Ninja -D CMAKE_CXX_FLAGS="-fsanitize=address" -D CMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ matrix.cmake_extra_flags }}.
run: cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE}} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ${{ matrix.cmake_extra_flags }} -D CMAKE_CXX_FLAGS="-fsanitize=address" -D CMAKE_C_FLAGS="-fsanitize=address"
env:
PLUGIN_OS_FORMAT: ${{ matrix.plugin_os_format }}

Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ endif ()
# Configures universal binaries in CI
include(PamplejuceMacOS)

# Sanitizer support, comment out to disable
include(Sanitizer)

# Couple tweaks that IMO should be JUCE defaults
include(JUCEDefaults)

Expand Down Expand Up @@ -185,6 +182,9 @@ target_link_libraries("${PROJECT_NAME}" PRIVATE SharedCode)
# IPP support, comment out to disable
include(PamplejuceIPP)

# Sanitizer support, comment out to disable
include(Sanitizer)

# A separate target keeps the Tests target fast!
# include(Benchmarks)

Expand Down
3 changes: 3 additions & 0 deletions cmake-includes/Sanitizer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ if (DEFINED ENV{SANITIZER_FLAG})
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
message("Enable Address Sanitizer")
if (WIN32)
add_compile_definitions($<$<CONFIG:Debug>:_ITERATOR_DEBUG_LEVEL=2>)
endif ()
endif ()

0 comments on commit ec916d6

Please sign in to comment.