Squashed 'libs/protobuf/' content from commit fcd3b9a85
git-subtree-dir: libs/protobuf git-subtree-split: fcd3b9a85ef36e46643dc30176cea1a7ad62e02b
This commit is contained in:
28
ruby/ext/google/protobuf_c/extconf.rb
Executable file
28
ruby/ext/google/protobuf_c/extconf.rb
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/ruby
|
||||
|
||||
require 'mkmf'
|
||||
|
||||
ext_name = "google/protobuf_c"
|
||||
|
||||
dir_config(ext_name)
|
||||
|
||||
if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
|
||||
$CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
|
||||
else
|
||||
$CFLAGS += " -std=gnu99 -O3 -DNDEBUG"
|
||||
end
|
||||
|
||||
|
||||
if RUBY_PLATFORM =~ /linux/
|
||||
# Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
|
||||
$LDFLAGS += " -Wl,-wrap,memcpy"
|
||||
end
|
||||
|
||||
$VPATH << "$(srcdir)/third_party/utf8_range"
|
||||
$INCFLAGS << "$(srcdir)/third_party/utf8_range"
|
||||
|
||||
$srcs = ["protobuf.c", "convert.c", "defs.c", "message.c",
|
||||
"repeated_field.c", "map.c", "ruby-upb.c", "wrap_memcpy.c",
|
||||
"naive.c", "range2-neon.c", "range2-sse.c"]
|
||||
|
||||
create_makefile(ext_name, Dir.pwd+"/../../../../ext/google/protobuf_c")
|
||||
Reference in New Issue
Block a user