You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libshit/tools/ci_conf.arch.rb

29 lines
752 B
Ruby

step :arch_opts, after: :default_values, before: :final_opts do
x86_common = -> bits, cpu do
env.ASFLAGS.concat %W(-m#{bits})
env.LINKFLAGS.concat %W(-m#{bits})
opt.compile_flags.concat %W(-m#{bits} -march=#{cpu} -mtune=generic)
opt.triplet_vendors = %w(pc unknown w64)
end
case opt.architecture
when 'x86'
x86_common[32, 'i686']
# amd64 usually can compile for x86
opt.triplet_machines = %w(i686 i386 i486 i586 x86_64)
env.WINRCFLAGS.concat %w(-F pe-i386)
when 'amd64'
x86_common[64, 'x86-64']
opt.triplet_machines = %w(x86_64)
env.WINRCFLAGS.concat %w(-F pe-x86-64)
when 'arm'
opt.triplet_machines = %w(arm)
else
fail "Unknown architecture #{opt.architecture.inspect}"
end
end