aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/protobuf/3.4.0/ruby/ext/google/protobuf_c/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/protobuf/3.4.0/ruby/ext/google/protobuf_c/extconf.rb')
-rw-r--r--third_party/protobuf/3.4.0/ruby/ext/google/protobuf_c/extconf.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/third_party/protobuf/3.4.0/ruby/ext/google/protobuf_c/extconf.rb b/third_party/protobuf/3.4.0/ruby/ext/google/protobuf_c/extconf.rb
new file mode 100644
index 0000000000..0886e60708
--- /dev/null
+++ b/third_party/protobuf/3.4.0/ruby/ext/google/protobuf_c/extconf.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/ruby
+
+require 'mkmf'
+
+$CFLAGS += " -std=c99 -O3 -DNDEBUG"
+
+
+if RUBY_PLATFORM =~ /linux/
+ # Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
+ $LDFLAGS += " -Wl,-wrap,memcpy"
+end
+
+$objs = ["protobuf.o", "defs.o", "storage.o", "message.o",
+ "repeated_field.o", "map.o", "encode_decode.o", "upb.o",
+ "wrap_memcpy.o"]
+
+create_makefile("google/protobuf_c")