summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-17 01:42:30 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-17 01:42:30 +0000
commit2b894084eff60a010b0f606c5c9731094358b041 (patch)
treeb3d2910b68f0b05b73047ba9ebb510a5ee5bbd08 /test
parent077a15c829f36357b2452d54adaf95ff5c7698f8 (diff)
test/mkmf/base.rb: use CC_WRAPPER same as the toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/mkmf/base.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/mkmf/base.rb b/test/mkmf/base.rb
index 3ba3e03387..80dec1421a 100644
--- a/test/mkmf/base.rb
+++ b/test/mkmf/base.rb
@@ -1,5 +1,13 @@
# frozen_string_literal: false
$extmk = true
+require 'rbconfig'
+RbConfig.fire_update!("top_srcdir", File.expand_path("../..", __dir__))
+File.foreach(RbConfig::CONFIG["topdir"]+"/Makefile") do |line|
+ if /^CC_WRAPPER\s*=\s*/ =~ line
+ RbConfig.fire_update!('CC_WRAPPER', $'.strip)
+ break
+ end
+end
require 'test/unit'
require 'mkmf'