Skip to content

Commit

Permalink
Merge pull request kokkos#7338 from dalg24/no_rtti
Browse files Browse the repository at this point in the history
Attempt to compile all benchmarks, examples, and test with RTTI disabled
  • Loading branch information
crtrott authored Sep 16, 2024
2 parents 2e5c565 + 232d74b commit af8df13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
stdcxx: '17'
- distro: 'ubuntu:intel'
cxx: 'icpx'
cxx_extra_flags: '-fp-model=precise -Wno-pass-failed -fsanitize=address,undefined -fno-sanitize=function -fno-sanitize-recover=all'
extra_linker_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize-recover=all'
cxx_extra_flags: '-fp-model=precise -Wno-pass-failed -fsanitize=address,undefined -fno-sanitize=function -fno-sanitize=vptr -fno-sanitize-recover=all'
extra_linker_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize=vptr -fno-sanitize-recover=all'
cmake_build_type: 'Release'
backend: 'OPENMP'
stdcxx: '17'
Expand All @@ -55,16 +55,16 @@ jobs:
stdcxx: '20'
- distro: 'ubuntu:latest'
cxx: 'clang++'
cxx_extra_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize-recover=all'
extra_linker_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize-recover=all'
cxx_extra_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize=vptr -fno-sanitize-recover=all'
extra_linker_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize=vptr -fno-sanitize-recover=all'
cmake_build_type: 'RelWithDebInfo'
backend: 'THREADS'
clang-tidy: '-DCMAKE_CXX_CLANG_TIDY="clang-tidy;-warnings-as-errors=*"'
stdcxx: '23'
- distro: 'ubuntu:latest'
cxx: 'clang++'
cxx_extra_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize-recover=all'
extra_linker_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize-recover=all'
cxx_extra_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize=vptr -fno-sanitize-recover=all'
extra_linker_flags: '-fsanitize=address,undefined -fno-sanitize=function -fno-sanitize=vptr -fno-sanitize-recover=all'
cmake_build_type: 'RelWithDebInfo'
backend: 'SERIAL'
stdcxx: '20'
Expand Down
10 changes: 10 additions & 0 deletions cmake/kokkos_tribits.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ FUNCTION(KOKKOS_ADD_EXECUTABLE_AND_TEST ROOT_NAME)
SET_PROPERTY(TARGET ${PACKAGE_NAME}_${ROOT_NAME} PROPERTY VISIBILITY_INLINES_HIDDEN ON)
SET_PROPERTY(TARGET ${PACKAGE_NAME}_${ROOT_NAME} PROPERTY CXX_VISIBILITY_PRESET hidden)
ENDIF()
IF(NOT (Kokkos_INSTALL_TESTING OR Kokkos_ENABLE_SYCL OR Kokkos_ENABLE_HPX
OR (KOKKOS_CXX_COMPILER_ID STREQUAL "Intel" AND KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 2021.2.0)
OR (KOKKOS_CXX_COMPILER_ID STREQUAL "NVIDIA" AND KOKKOS_CXX_COMPILER_VERSION VERSION_LESS 11.3.0)
OR (KOKKOS_CXX_COMPILER_ID STREQUAL "NVIDIA" AND KOKKOS_CXX_HOST_COMPILER_ID STREQUAL "MSVC")))
IF(MSVC)
target_compile_options(${PACKAGE_NAME}_${ROOT_NAME} PRIVATE "/GR-")
ELSE()
target_compile_options(${PACKAGE_NAME}_${ROOT_NAME} PRIVATE "-fno-rtti")
ENDIF()
ENDIF()
ENDFUNCTION()

FUNCTION(KOKKOS_SET_EXE_PROPERTY ROOT_NAME)
Expand Down

0 comments on commit af8df13

Please sign in to comment.