diff --git a/.github/workflows/test_cpp.yml b/.github/workflows/test_cpp.yml index ea93d403bd..ce33686202 100644 --- a/.github/workflows/test_cpp.yml +++ b/.github/workflows/test_cpp.yml @@ -20,6 +20,7 @@ jobs: - { name: MSAN, flags: --config=kokoro-msan } - { name: TSAN, flags: --config=tsan } - { name: UBSAN, flags: --config=ubsan } + - { name: No-RTTI, flags: --cxxopt=-fno-rtti } include: # Set defaults - image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:dbd2f15fb69734d72c3fd10cb819bbe2ce4890acf49e9a2f9403983fe48e8807 diff --git a/src/google/protobuf/compiler/cpp/unittest.inc b/src/google/protobuf/compiler/cpp/unittest.inc index 8e782772df..b29cd2d79b 100644 --- a/src/google/protobuf/compiler/cpp/unittest.inc +++ b/src/google/protobuf/compiler/cpp/unittest.inc @@ -1331,7 +1331,7 @@ TEST_F(GENERATED_SERVICE_TEST_NAME, CallMethod) { TEST_F(GENERATED_SERVICE_TEST_NAME, CallMethodTypeFailure) { // Verify death if we call Foo() with Bar's message types. -#if GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet +#if PROTOBUF_RTTI && GTEST_HAS_DEATH_TEST // death tests do not work on Windows yet EXPECT_DEBUG_DEATH( mock_service_.CallMethod(foo_, &mock_controller_, &foo_request_, &bar_response_, done_.get()),