extconf.rb 403 B

1234567891011121314151617
  1. #!/usr/bin/ruby
  2. require 'mkmf'
  3. $CFLAGS += " -std=c99 -O3 -DNDEBUG"
  4. if RUBY_PLATFORM =~ /linux/
  5. # Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
  6. $LDFLAGS += " -Wl,-wrap,memcpy"
  7. end
  8. $objs = ["protobuf.o", "defs.o", "storage.o", "message.o",
  9. "repeated_field.o", "map.o", "encode_decode.o", "upb.o",
  10. "wrap_memcpy.o"]
  11. create_makefile("google/protobuf_c")