aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2018-04-25 14:16:13 -0700
committerGitHub <noreply@github.com>2018-04-25 14:16:13 -0700
commita21f225824e994ebd35e8447382ea4e0cd165b3c (patch)
tree5495aefbba40354a121fa048c3c8f90b255593e9
parent8417871a715bad6cbc97eaf0c64957ffe204aeb5 (diff)
parent9972e1608e83ca8489d7415d6f55e67fb4a079ca (diff)
downloadprotobuf-a21f225824e994ebd35e8447382ea4e0cd165b3c.tar.gz
protobuf-a21f225824e994ebd35e8447382ea4e0cd165b3c.tar.bz2
protobuf-a21f225824e994ebd35e8447382ea4e0cd165b3c.zip
Merge pull request #4553 from pherl/ruby
Set ext.no_native = true for non mac platform
-rw-r--r--ruby/Rakefile6
1 files changed, 6 insertions, 0 deletions
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