2022-11-28 21:48:14 +00:00
|
|
|
MRuby::CrossBuild.new ENV.fetch 'BUILD_NAME' do |conf|
|
2022-11-27 11:21:26 +00:00
|
|
|
conf.toolchain :gcc
|
|
|
|
|
2022-11-28 20:52:05 +00:00
|
|
|
conf.gem core: 'mruby-compiler'
|
2022-11-29 13:01:07 +00:00
|
|
|
conf.gembox 'stdlib'
|
2022-11-28 20:52:05 +00:00
|
|
|
|
2022-11-27 11:21:26 +00:00
|
|
|
conf.cc.flags <<
|
|
|
|
'-Wall' <<
|
|
|
|
'-Wextra' <<
|
|
|
|
'-ffreestanding' <<
|
|
|
|
'-nostdlib' <<
|
|
|
|
'-fno-pic' <<
|
|
|
|
'-fno-stack-protector'
|
|
|
|
|
2022-11-28 21:48:14 +00:00
|
|
|
ENV.fetch('FLAGS').split.map do |flag|
|
|
|
|
m = /\A-D(MRB_.*)\z/.match flag
|
|
|
|
conf.cc.defines << m[1] if m
|
|
|
|
end
|
|
|
|
|
|
|
|
conf.cc.include_paths << ENV.fetch('INCLUDE_DIR')
|
|
|
|
conf.linker.library_paths << ENV.fetch('LIB_DIR')
|
2022-11-27 11:21:26 +00:00
|
|
|
|
2022-11-28 21:48:14 +00:00
|
|
|
conf.archiver.command = ENV.fetch 'CROSS_AR'
|
|
|
|
conf.cc.command = ENV.fetch 'CROSS_CC'
|
|
|
|
conf.linker.command = ENV.fetch 'CROSS_LD'
|
2022-11-27 11:21:26 +00:00
|
|
|
end
|