Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
b26ca1b5
Commit
b26ca1b5
authored
Apr 07, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2025 from take-cheeze/cxx_abi_fix
Fix C++ files detection for automatic C++ ABI enabling.
parents
c5c87424
66e0df34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
tasks/mrbgem_spec.rake
tasks/mrbgem_spec.rake
+0
-7
tasks/mruby_build_gem.rake
tasks/mruby_build_gem.rake
+5
-2
No files found.
tasks/mrbgem_spec.rake
View file @
b26ca1b5
...
...
@@ -40,7 +40,6 @@ module MRuby
@name
=
name
@initializer
=
block
@version
=
"0.0.0"
@cxx_abi_enabled
=
false
MRuby
::
Gem
.
current
=
self
end
...
...
@@ -48,10 +47,6 @@ module MRuby
not
test_preload
.
nil?
or
not
test_objs
.
empty?
end
def
cxx_abi_enabled?
@cxx_abi_enabled
end
def
setup
MRuby
::
Gem
.
current
=
self
@build
.
compilers
.
each
do
|
compiler
|
...
...
@@ -64,14 +59,12 @@ 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'
...
...
tasks/mruby_build_gem.rake
View file @
b26ca1b5
...
...
@@ -30,12 +30,15 @@ module MRuby
load
gemrake
return
nil
unless
Gem
.
current
enable_cxx_abi
if
Gem
.
current
.
cxx_abi_enabled?
Gem
.
current
.
dir
=
gemdir
Gem
.
current
.
build
=
MRuby
::
Build
.
current
Gem
.
current
.
build_config_initializer
=
block
gems
<<
Gem
.
current
cxx_srcs
=
Dir
.
glob
(
"
#{
Gem
.
current
.
dir
}
/src/*.{cpp,cxx}"
)
cxx_srcs
+=
Dir
.
glob
(
"
#{
Gem
.
current
.
dir
}
/test/*.{cpp,cxx}"
)
enable_cxx_abi
unless
cxx_srcs
.
empty?
Gem
.
current
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment