Add 'OSXCROSS_ENABLE_WERROR_IMPLICIT_FUNCTION_DECLARATION' env variable to emulate Xcode 12's behavior

This commit is contained in:
Thomas Pöchtrager 2021-03-20 15:05:51 +01:00
parent 035cc17033
commit 4ec572e392

View File

@ -886,6 +886,8 @@ bool Target::setup() {
if (wliblto == -1)
fargs.push_back("-Wno-liblto");
}
if (getenv("OSXCROSS_ENABLE_WERROR_IMPLICIT_FUNCTION_DECLARATION"))
fargs.push_back("-Werror=implicit-function-declaration");
} else if (isGCC()) {
if (args.empty() || (args.size() == 1 && args[0] == "-v")) {
//