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
38486599
Unverified
Commit
38486599
authored
Mar 22, 2021
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: provide global defines by `build.defines`.
parent
fbc629c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
lib/mruby/build.rb
lib/mruby/build.rb
+2
-1
lib/mruby/build/command.rb
lib/mruby/build/command.rb
+1
-1
tasks/mrbgems.rake
tasks/mrbgems.rake
+1
-1
No files found.
lib/mruby/build.rb
View file @
38486599
...
...
@@ -71,7 +71,7 @@ module MRuby
include
Rake
::
DSL
include
LoadGems
attr_accessor
:name
,
:bins
,
:exts
,
:file_separator
,
:build_dir
,
:gem_clone_dir
attr_accessor
:name
,
:bins
,
:exts
,
:file_separator
,
:build_dir
,
:gem_clone_dir
,
:defines
attr_reader
:products
,
:libmruby_core_objs
,
:libmruby_objs
,
:gems
,
:toolchains
,
:presym
,
:mrbc_build
,
:gem_dir_to_repo_url
alias
libmruby
libmruby_objs
...
...
@@ -97,6 +97,7 @@ module MRuby
@file_separator
=
'/'
@build_dir
=
"
#{
build_dir
}
/
#{
@name
}
"
@gem_clone_dir
=
"
#{
build_dir
}
/repos/
#{
@name
}
"
@defines
=
[]
@cc
=
Command
::
Compiler
.
new
(
self
,
%w(.c)
,
label:
"CC"
)
@cxx
=
Command
::
Compiler
.
new
(
self
,
%w(.cc .cxx .cpp)
,
label:
"CXX"
)
@objc
=
Command
::
Compiler
.
new
(
self
,
%w(.m)
,
label:
"OBJC"
)
...
...
lib/mruby/build/command.rb
View file @
38486599
...
...
@@ -77,7 +77,7 @@ module MRuby
end
def
all_flags
(
_defines
=
[],
_include_paths
=
[],
_flags
=
[])
define_flags
=
[
defines
,
_defines
].
flatten
.
map
{
|
d
|
option_define
%
d
}
define_flags
=
[
defines
,
_defines
,
build
.
defines
].
flatten
.
map
{
|
d
|
option_define
%
d
}
include_path_flags
=
[
include_paths
,
_include_paths
].
flatten
.
map
do
|
f
|
option_include_path
%
filename
(
f
)
end
...
...
tasks/mrbgems.rake
View file @
38486599
...
...
@@ -37,7 +37,7 @@ MRuby.each_target do
f
.
puts
%Q[]
f
.
write
gem_func_decls
unless
gem_final_calls
.
empty?
f
.
puts
%Q[]
f
.
puts
%Q[]
f
.
puts
%Q[static void]
f
.
puts
%Q[mrb_final_mrbgems(mrb_state *mrb) {]
f
.
write
gem_final_calls
...
...
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