summaryrefslogtreecommitdiff
path: root/test/mkmf
diff options
context:
space:
mode:
Diffstat (limited to 'test/mkmf')
-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'