Unverified Commit c6c632cf authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5325 from dearblue/c++-exc.2

`compile_as_cxx` should generate a path under` conf.build_dir`
parents 94d8dfed e0d2f4e0
......@@ -248,7 +248,7 @@ module MRuby
end
end
else
cxx_src = "#{build_dir}/#{src.relative_path})".ext << "-cxx.cxx"
cxx_src = "#{build_dir}/#{src.relative_path.to_s.remove_leading_parents}".ext << "-cxx.cxx"
obj = cxx_src.ext(@exts.object)
end
......
......@@ -18,6 +18,10 @@ class String
def relative_path
relative_path_from(Dir.pwd)
end
def remove_leading_parents
Pathname.new(".#{Pathname.new("/#{self}").cleanpath}").cleanpath.to_s
end
end
def install_D(src, dst)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment