Skip to content

Commit 9972e16

Browse files
committed
Set ext.no_native = true for non mac platform
From: rake-compiler/rake-compiler#146 (comment)
1 parent 8417871 commit 9972e16

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ruby/Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ if RUBY_PLATFORM == "java"
5252
end
5353
else
5454
Rake::ExtensionTask.new("protobuf_c", spec) do |ext|
55+
unless RUBY_PLATFORM =~ /darwin/
56+
# TODO: also set "no_native to true" for mac if possible. As is,
57+
# "no_native" can only be set if the RUBY_PLATFORM doing
58+
# cross-compilation is contained in the "ext.cross_platform" array.
59+
ext.no_native = true
60+
end
5561
ext.ext_dir = "ext/google/protobuf_c"
5662
ext.lib_dir = "lib/google"
5763
ext.cross_compile = true

0 commit comments

Comments
 (0)