File: serenity.rb

package info (click to toggle)
mruby 3.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,584 kB
  • sloc: ansic: 51,933; ruby: 29,510; yacc: 7,077; cpp: 517; makefile: 51; sh: 42
file content (26 lines) | stat: -rw-r--r-- 954 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Cross compiling configuration for SerenityOS
# Graphical Unix-like operating system for x86 computers.
# https://github.com/SerenityOS/serenity
#
# Should be built using the SerenityOS Ports system
# https://github.com/SerenityOS/serenity/tree/master/Ports
#
# As of 2021/08/20, SERENITY_ARCH is defined in the SerenityOS Ports
# build script to always be either "i686" or "x86_64"

MRuby::CrossBuild.new('serenity') do |conf|
  conf.toolchain :gcc

  conf.archiver.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-ar"
  conf.linker.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-g++"

  conf.cxx.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-g++"
  conf.cxx.defines << (ENV['SERENITY_ARCH'].include?('64') ? 'MRB_64BIT' : 'MRB_32BIT')

  conf.cc.command = "#{ENV['SERENITY_ARCH']}-pc-serenity-gcc"
  conf.cc.defines << (ENV['SERENITY_ARCH'].include?('64') ? 'MRB_64BIT' : 'MRB_32BIT')

  conf.gembox 'full-core'

  conf.test_runner.command = 'env'
end