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
66e0df34
Commit
66e0df34
authored
Apr 07, 2014
by
take_cheeze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix C++ files detection for automatic C++ ABI enabling.
parent
c5c87424
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 @
66e0df34
...
@@ -40,7 +40,6 @@ module MRuby
...
@@ -40,7 +40,6 @@ module MRuby
@name
=
name
@name
=
name
@initializer
=
block
@initializer
=
block
@version
=
"0.0.0"
@version
=
"0.0.0"
@cxx_abi_enabled
=
false
MRuby
::
Gem
.
current
=
self
MRuby
::
Gem
.
current
=
self
end
end
...
@@ -48,10 +47,6 @@ module MRuby
...
@@ -48,10 +47,6 @@ module MRuby
not
test_preload
.
nil?
or
not
test_objs
.
empty?
not
test_preload
.
nil?
or
not
test_objs
.
empty?
end
end
def
cxx_abi_enabled?
@cxx_abi_enabled
end
def
setup
def
setup
MRuby
::
Gem
.
current
=
self
MRuby
::
Gem
.
current
=
self
@build
.
compilers
.
each
do
|
compiler
|
@build
.
compilers
.
each
do
|
compiler
|
...
@@ -64,14 +59,12 @@ module MRuby
...
@@ -64,14 +59,12 @@ module MRuby
@rbfiles
=
Dir
.
glob
(
"
#{
dir
}
/mrblib/*.rb"
).
sort
@rbfiles
=
Dir
.
glob
(
"
#{
dir
}
/mrblib/*.rb"
).
sort
@objs
=
Dir
.
glob
(
"
#{
dir
}
/src/*.{c,cpp,cxx,m,asm,S}"
).
map
do
|
f
|
@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"
))
objfile
(
f
.
relative_path_from
(
@dir
).
to_s
.
pathmap
(
"
#{
build_dir
}
/%X"
))
end
end
@objs
<<
objfile
(
"
#{
build_dir
}
/gem_init"
)
@objs
<<
objfile
(
"
#{
build_dir
}
/gem_init"
)
@test_rbfiles
=
Dir
.
glob
(
"
#{
dir
}
/test/*.rb"
)
@test_rbfiles
=
Dir
.
glob
(
"
#{
dir
}
/test/*.rb"
)
@test_objs
=
Dir
.
glob
(
"
#{
dir
}
/test/*.{c,cpp,cxx,m,asm,S}"
).
map
do
|
f
|
@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"
))
objfile
(
f
.
relative_path_from
(
dir
).
to_s
.
pathmap
(
"
#{
build_dir
}
/%X"
))
end
end
@test_preload
=
nil
# 'test/assert.rb'
@test_preload
=
nil
# 'test/assert.rb'
...
...
tasks/mruby_build_gem.rake
View file @
66e0df34
...
@@ -30,12 +30,15 @@ module MRuby
...
@@ -30,12 +30,15 @@ module MRuby
load
gemrake
load
gemrake
return
nil
unless
Gem
.
current
return
nil
unless
Gem
.
current
enable_cxx_abi
if
Gem
.
current
.
cxx_abi_enabled?
Gem
.
current
.
dir
=
gemdir
Gem
.
current
.
dir
=
gemdir
Gem
.
current
.
build
=
MRuby
::
Build
.
current
Gem
.
current
.
build
=
MRuby
::
Build
.
current
Gem
.
current
.
build_config_initializer
=
block
Gem
.
current
.
build_config_initializer
=
block
gems
<<
Gem
.
current
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
Gem
.
current
end
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