mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #5325 from dearblue/c++-exc.2
`compile_as_cxx` should generate a path under` conf.build_dir`
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user