Add UnsignedChar API + implement for gcc
This commit is contained in:
parent
2ac3153f81
commit
ba8835fb54
@ -1336,6 +1336,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "unsignedchar",
|
||||
scope = "config",
|
||||
kind = "boolean",
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
--
|
||||
-- Field name aliases for backward compatibility
|
||||
|
@ -96,6 +96,10 @@
|
||||
},
|
||||
symbols = {
|
||||
On = "-g"
|
||||
},
|
||||
unsignedchar = {
|
||||
On = "-funsigned-char",
|
||||
Off = "-fno-unsigned-char"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -788,3 +788,23 @@
|
||||
test.contains({ "-std=gnu++17" }, gcc.getcxxflags(cfg))
|
||||
test.contains({ }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
--
|
||||
-- Test unsigned-char flags.
|
||||
--
|
||||
|
||||
function suite.sharedflags_onUnsignedChar()
|
||||
unsignedchar "On"
|
||||
|
||||
prepare()
|
||||
test.contains({ "-funsigned-char" }, gcc.getcxxflags(cfg))
|
||||
test.contains({ "-funsigned-char" }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
||||
function suite.sharedflags_onNoUnsignedChar()
|
||||
unsignedchar "Off"
|
||||
|
||||
prepare()
|
||||
test.contains({ "-fno-unsigned-char" }, gcc.getcxxflags(cfg))
|
||||
test.contains({ "-fno-unsigned-char" }, gcc.getcflags(cfg))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user