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
2bb84f1f
Unverified
Commit
2bb84f1f
authored
Aug 26, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update build process for both host and cross compile.
parent
850e200e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
lib/mruby/build.rb
lib/mruby/build.rb
+9
-8
lib/mruby/build/load_gems.rb
lib/mruby/build/load_gems.rb
+7
-6
lib/mruby/gem.rb
lib/mruby/gem.rb
+3
-2
No files found.
lib/mruby/build.rb
View file @
2bb84f1f
...
...
@@ -81,7 +81,8 @@ module MRuby
@mrbc
=
Command
::
Mrbc
.
new
(
self
)
@bins
=
[]
@gems
,
@libmruby_objs
=
MRuby
::
Gem
::
List
.
new
,
[]
@gems
=
MRuby
::
Gem
::
List
.
new
@libmruby_objs
=
[]
@build_mrbtest_lib_only
=
false
@cxx_exception_enabled
=
false
@cxx_exception_disabled
=
false
...
...
@@ -95,11 +96,10 @@ module MRuby
MRuby
.
targets
[
@name
]
=
self
end
MRuby
::
Build
.
current
=
MRuby
.
targets
[
@name
]
MRuby
.
targets
[
@name
].
instance_eval
(
&
block
)
build_mrbc_exec
if
name
==
'host'
build_mrbtest
if
test_enabled?
current
=
MRuby
.
targets
[
@name
]
MRuby
::
Build
.
current
=
current
current
.
instance_eval
(
&
block
)
current
.
build_mrbtest
if
current
.
test_enabled?
end
def
debug_enabled?
...
...
@@ -247,8 +247,9 @@ EOS
def
mrbcfile
return
@mrbcfile
if
@mrbcfile
unless
gems
.
detect
{
|
v
|
v
.
name
==
'mruby-bin-mrbc'
}
gem
:core
=>
"mruby-bin-mrbc"
unless
gems
.
detect
{
|
v
|
v
.
name
==
'mruby-bin-mrbc'
}
build_mrbc_exec
gems
.
detect
{
|
v
|
v
.
name
==
'mruby-bin-mrbc'
}.
setup
end
@mrbcfile
=
self
.
exefile
(
"
#{
self
.
build_dir
}
/bin/mrbc"
)
end
...
...
lib/mruby/build/load_gems.rb
View file @
2bb84f1f
...
...
@@ -28,18 +28,19 @@ module MRuby
Gem
.
current
=
nil
load
gemrake
return
nil
unless
Gem
.
current
current
=
Gem
.
current
Gem
.
current
.
dir
=
gemdir
Gem
.
current
.
build
=
self
.
is_a?
(
MRuby
::
Build
)
?
self
:
MRuby
::
Build
.
current
Gem
.
current
.
build_config_initializer
=
block
gems
<<
Gem
.
current
current
.
dir
=
gemdir
current
.
build
=
self
.
is_a?
(
MRuby
::
Build
)
?
self
:
MRuby
::
Build
.
current
current
.
build_config_initializer
=
block
gems
<<
current
cxx_srcs
=
[
'src'
,
'test'
,
'tools'
].
map
do
|
subdir
|
Dir
.
glob
(
"
#{
Gem
.
current
.
dir
}
/
#{
subdir
}
/*.{cpp,cxx,cc}"
)
Dir
.
glob
(
"
#{
current
.
dir
}
/
#{
subdir
}
/*.{cpp,cxx,cc}"
)
end
.
flatten
enable_cxx_exception
unless
cxx_srcs
.
empty?
Gem
.
current
current
end
def
load_special_path_gem
(
params
)
...
...
lib/mruby/gem.rb
View file @
2bb84f1f
...
...
@@ -47,12 +47,14 @@ module MRuby
@version
=
"0.0.0"
@mrblib_dir
=
"mrblib"
@objs_dir
=
"src"
@dependencies
=
[]
@conflicts
=
[]
MRuby
::
Gem
.
current
=
self
end
def
setup
return
if
defined?
(
@linker
)
# return if already set up
MRuby
::
Gem
.
current
=
self
MRuby
::
Build
::
COMMANDS
.
each
do
|
command
|
instance_variable_set
(
"@
#{
command
}
"
,
@build
.
send
(
command
).
clone
)
...
...
@@ -75,7 +77,6 @@ module MRuby
@bins
=
[]
@requirements
=
[]
@dependencies
,
@conflicts
=
[],
[]
@export_include_paths
=
[]
@export_include_paths
<<
"
#{
dir
}
/include"
if
File
.
directory?
"
#{
dir
}
/include"
...
...
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