Skip to content

Commit 362890d

Browse files
committed
Always set ext.no_native=true in the container
1 parent fd89914 commit 362890d

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ It is intended to be used in conjunction with [rake-compiler's](https://github.c
3535
Your Rakefile should enable cross compilation like so:
3636

3737
exttask = Rake::ExtensionTask.new('my_extension', my_gem_spec) do |ext|
38-
ext.no_native = ENV.key?("RCD_HOST_RUBY_PLATFORM") # Disable native builds within the container
3938
ext.cross_compile = true
4039
ext.cross_platform = %w[x86-mingw32 x64-mingw32 x86-linux x86_64-linux]
4140
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 15f630adc4325f9cafb762e15a051c2ec8bd21e2 Mon Sep 17 00:00:00 2001
2+
From: Sutou Kouhei <kou@clear-code.com>
3+
Date: Mon, 21 Dec 2020 04:30:44 +0900
4+
Subject: [PATCH] Use RAKE_EXTENSION_TASK_NO_NATIVE env var as the default
5+
value
6+
7+
---
8+
lib/rake/extensiontask.rb | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb
12+
index b0ab88e..49d59da 100644
13+
--- a/lib/rake/extensiontask.rb
14+
+++ b/lib/rake/extensiontask.rb
15+
@@ -23,7 +23,7 @@ module Rake
16+
@cross_compile = false
17+
@cross_config_options = []
18+
@cross_compiling = nil
19+
- @no_native = false
20+
+ @no_native = (ENV["RAKE_EXTENSION_TASK_NO_NATIVE"] == "true")
21+
@config_includes = []
22+
@ruby_versions_per_platform = {}
23+
@make = nil
24+
--
25+
2.27.0
26+

build/runas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ chown "$USER" "$HOME"/.gem
1111

1212
sudo -u "$USER" --set-home \
1313
BASH_ENV=/etc/rubybashrc \
14+
RAKE_EXTENSION_TASK_NO_NATIVE=true \
1415
-- "$@"

0 commit comments

Comments
 (0)