tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073)

This commit is contained in:
Daniel Hahler 2019-09-22 14:57:44 +02:00 committed by GitHub
parent bb90e41ee2
commit ed11721b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,10 @@ local Gcc = {
get_defines_extra_flags = {'-std=c99', '-dM', '-E'},
get_declarations_extra_flags = {'-std=c99', '-P', '-E'},
}
if ffi.abi("32bit") then
table.insert(Gcc.get_defines_extra_flags, '-m32')
table.insert(Gcc.get_declarations_extra_flags, '-m32')
end
function Gcc:define(name, args, val)
local define = '-D' .. name