A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/protocolbuffers/protobuf/commit/59e1f0f6bdb85e93b60f7d9e36985be2c290578b below:

Add support for a protobuf debug build (#21060) · protocolbuffers/protobuf@59e1f0f · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+14

-2

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+14

-2

lines changed Original file line number Diff line number Diff line change

@@ -89,6 +89,14 @@ Then build the Gem:

89 89

$ rake clobber_package gem

90 90

$ gem install `ls pkg/google-protobuf-*.gem`

91 91 92 +

If you intend to debug the protobuf_c Ruby bindings with `gdb`, you can also

93 +

build a version with debug symbols enabled by setting the `PROTOBUF_CONFIG`

94 +

enviroment variable when you build the native extension:

95 + 96 +

```

97 +

$ PROTOBUF_CONFIG=dbg rake

98 +

```

99 + 92 100

To run the specs:

93 101 94 102

$ rake test

Original file line number Diff line number Diff line change

@@ -18,10 +18,14 @@

18 18

RbConfig::CONFIG["LD"] = RbConfig::MAKEFILE_CONFIG["LD"] = ENV["LD"]

19 19

end

20 20 21 +

debug_enabled = ENV["PROTOBUF_CONFIG"] == "dbg"

22 + 23 +

additional_c_flags = debug_enabled ? "-O0 -fno-omit-frame-pointer -fvisibility=default -g" : "-O3 -DNDEBUG -fvisibility=hidden"

24 + 21 25

if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /freebsd/

22 -

$CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"

26 +

$CFLAGS += " -std=gnu99 -Wall -Wsign-compare -Wno-declaration-after-statement #{additional_c_flags}"

23 27

else

24 -

$CFLAGS += " -std=gnu99 -O3 -DNDEBUG"

28 +

$CFLAGS += " -std=gnu99 #{additional_c_flags}"

25 29

end

26 30 27 31

if RUBY_PLATFORM =~ /linux/

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4