Turn off NDEBUG to see if anything fails.
diff --git a/ruby/ext/google/protobuf_c/BUILD.bazel b/ruby/ext/google/protobuf_c/BUILD.bazel index 391edaa..9230a76 100644 --- a/ruby/ext/google/protobuf_c/BUILD.bazel +++ b/ruby/ext/google/protobuf_c/BUILD.bazel
@@ -100,9 +100,9 @@ "-Wno-declaration-after-statement", ], linkstatic = True, - local_defines = [ - "NDEBUG", - ], + # local_defines = [ + # "NDEBUG", + # ], target_compatible_with = select({ "//ruby:ffi_disabled": ["@platforms//:incompatible"], "//conditions:default": [],
diff --git a/ruby/ext/google/protobuf_c/extconf.rb b/ruby/ext/google/protobuf_c/extconf.rb index ed812c9..6b60f66 100755 --- a/ruby/ext/google/protobuf_c/extconf.rb +++ b/ruby/ext/google/protobuf_c/extconf.rb
@@ -7,9 +7,11 @@ dir_config(ext_name) if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /freebsd/ - $CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement" + # $CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement" + $CFLAGS += " -std=gnu99 -O3 -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement" else - $CFLAGS += " -std=gnu99 -O3 -DNDEBUG" + # $CFLAGS += " -std=gnu99 -O3 -DNDEBUG" + $CFLAGS += " -std=gnu99 -O3" end if RUBY_PLATFORM =~ /linux/
diff --git a/ruby/lib/google/tasks/ffi.rake b/ruby/lib/google/tasks/ffi.rake index 5de10a7..f761c7c 100644 --- a/ruby/lib/google/tasks/ffi.rake +++ b/ruby/lib/google/tasks/ffi.rake
@@ -9,7 +9,7 @@ end task.add_include_path third_party_path - task.add_define 'NDEBUG' + # task.add_define 'NDEBUG' task.cflags << "-std=gnu99 -O3" [ :convert, :defs, :map, :message, :protobuf, :repeated_field, :wrap_memcpy