From 9972e1608e83ca8489d7415d6f55e67fb4a079ca Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Wed, 25 Apr 2018 09:52:30 -0700 Subject: Set ext.no_native = true for non mac platform From: https://github.com/rake-compiler/rake-compiler/issues/146#issuecomment-368539245 --- ruby/Rakefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ruby') diff --git a/ruby/Rakefile b/ruby/Rakefile index 7aecfe85..ff09cebb 100644 --- a/ruby/Rakefile +++ b/ruby/Rakefile @@ -52,6 +52,12 @@ if RUBY_PLATFORM == "java" end else Rake::ExtensionTask.new("protobuf_c", spec) do |ext| + unless RUBY_PLATFORM =~ /darwin/ + # TODO: also set "no_native to true" for mac if possible. As is, + # "no_native" can only be set if the RUBY_PLATFORM doing + # cross-compilation is contained in the "ext.cross_platform" array. + ext.no_native = true + end ext.ext_dir = "ext/google/protobuf_c" ext.lib_dir = "lib/google" ext.cross_compile = true -- cgit v1.2.3