summaryrefslogtreecommitdiffhomepage
path: root/tasks/mrbgem_spec.rake
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/mrbgem_spec.rake')
-rw-r--r--tasks/mrbgem_spec.rake7
1 files changed, 7 insertions, 0 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake
index 6af28694e..8cde1c12d 100644
--- a/tasks/mrbgem_spec.rake
+++ b/tasks/mrbgem_spec.rake
@@ -39,9 +39,14 @@ module MRuby
@name = name
@initializer = block
@version = "0.0.0"
+ @cxx_abi_enabled = false
MRuby::Gem.current = self
end
+ def cxx_abi_enabled?
+ @cxx_abi_enabled
+ end
+
def setup
MRuby::Gem.current = self
@build.compilers.each do |compiler|
@@ -54,12 +59,14 @@ module MRuby
@rbfiles = Dir.glob("#{dir}/mrblib/*.rb").sort
@objs = Dir.glob("#{dir}/src/*.{c,cpp,cxx,m,asm,S}").map do |f|
+ @cxx_abi_enabled = true if f =~ /(cxx|cpp)$/
objfile(f.relative_path_from(@dir).to_s.pathmap("#{build_dir}/%X"))
end
@objs << objfile("#{build_dir}/gem_init")
@test_rbfiles = Dir.glob("#{dir}/test/*.rb")
@test_objs = Dir.glob("#{dir}/test/*.{c,cpp,cxx,m,asm,S}").map do |f|
+ @cxx_abi_enabled = true if f =~ /(cxx|cpp)$/
objfile(f.relative_path_from(dir).to_s.pathmap("#{build_dir}/%X"))
end
@test_preload = nil # 'test/assert.rb'