diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1cea2f0..a39c488d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -296,7 +296,7 @@ jobs: run: ls -R mini*zip | tar -czvf minizip-ng-${{ matrix.deploy-name }}.tar.gz -T - - name: Upload release (Ubuntu/macOS) - uses: svenstaro/upload-release-action@2.11.3 + uses: svenstaro/upload-release-action@2.11.4 if: (runner.os == 'Linux' || runner.os == 'macOS') && matrix.deploy && startsWith(github.ref, 'refs/tags/') && env.GITHUB_TOKEN != '' with: asset_name: minizip-ng-${{ matrix.deploy-name }}.tar.gz @@ -312,7 +312,7 @@ jobs: run: 7z a -tzip minizip-ng-${{ matrix.deploy-name }}.zip ./Release/mini*zip.exe - name: Upload release (Windows) - uses: svenstaro/upload-release-action@2.11.3 + uses: svenstaro/upload-release-action@2.11.4 if: runner.os == 'Windows' && matrix.deploy && startsWith(github.ref, 'refs/tags/') && env.GITHUB_TOKEN != '' with: asset_name: minizip-ng-${{ matrix.deploy-name }}.zip diff --git a/cmake/detect-sanitizer.cmake b/cmake/detect-sanitizer.cmake index ecb8b80f..b71c1a37 100644 --- a/cmake/detect-sanitizer.cmake +++ b/cmake/detect-sanitizer.cmake @@ -5,16 +5,16 @@ macro(add_common_sanitizer_flags) if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") add_compile_options(-g3) endif() - # check_c_compiler_flag(-fno-omit-frame-pointer HAVE_NO_OMIT_FRAME_POINTER) - # if(HAVE_NO_OMIT_FRAME_POINTER) + check_c_compiler_flag(-fno-omit-frame-pointer HAVE_NO_OMIT_FRAME_POINTER) + if(HAVE_NO_OMIT_FRAME_POINTER) add_compile_options(-fno-omit-frame-pointer) add_link_options(-fno-omit-frame-pointer) - # endif() - # check_c_compiler_flag(-fno-optimize-sibling-calls HAVE_NO_OPTIMIZE_SIBLING_CALLS) - # if(HAVE_NO_OPTIMIZE_SIBLING_CALLS) + endif() + check_c_compiler_flag(-fno-optimize-sibling-calls HAVE_NO_OPTIMIZE_SIBLING_CALLS) + if(HAVE_NO_OPTIMIZE_SIBLING_CALLS) add_compile_options(-fno-optimize-sibling-calls) add_link_options(-fno-optimize-sibling-calls) - # endif() + endif() endmacro() macro(check_sanitizer_support known_checks supported_checks) @@ -111,6 +111,7 @@ endmacro() macro(add_undefined_sanitizer) set(known_checks + alignment array-bounds bool bounds @@ -137,10 +138,6 @@ macro(add_undefined_sanitizer) vptr ) - # Only check for alignment sanitizer flag if unaligned access is not supported - if(NOT WITH_UNALIGNED) - list(APPEND known_checks alignment) - endif() # Object size sanitizer has no effect at -O0 and produces compiler warning if enabled if(NOT CMAKE_C_FLAGS MATCHES "-O0") list(APPEND known_checks object-size) @@ -153,14 +150,8 @@ macro(add_undefined_sanitizer) add_compile_options(-fsanitize=${supported_checks}) add_link_options(-fsanitize=${supported_checks}) - # Group sanitizer flag -fsanitize=undefined will automatically add alignment, even if - # it is not in our sanitize flag list, so we need to explicitly disable alignment sanitizing. - if(WITH_UNALIGNED) - add_compile_options(-fno-sanitize=alignment) - endif() - add_common_sanitizer_flags() else() message(STATUS "Undefined behavior sanitizer is not supported") endif() -endmacro() \ No newline at end of file +endmacro()