mirror of
https://github.com/tailix/mrubyvisor.git
synced 2024-11-11 13:50:47 -05:00
26 lines
679 B
Ruby
26 lines
679 B
Ruby
MRuby::CrossBuild.new ENV.fetch 'BUILD_NAME' do |conf|
|
|
conf.toolchain :gcc
|
|
|
|
conf.gem core: 'mruby-compiler'
|
|
conf.gembox 'stdlib'
|
|
|
|
conf.cc.flags <<
|
|
'-Wall' <<
|
|
'-Wextra' <<
|
|
'-ffreestanding' <<
|
|
'-nostdlib' <<
|
|
'-fno-pic' <<
|
|
'-fno-stack-protector'
|
|
|
|
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')
|
|
|
|
conf.archiver.command = ENV.fetch 'CROSS_AR'
|
|
conf.cc.command = ENV.fetch 'CROSS_CC'
|
|
conf.linker.command = ENV.fetch 'CROSS_LD'
|
|
end
|