as defined. This is done to prevent dangerous optimisations which could
remove security critical overflow checks.
Base gcc has -fno-strict-overflow by default, with clang this is
identical to -fwrapv.
Prompted by naddy@ discovering a hang with a clang compiled i386 kernel
that was resolved with -fwrapv.
ok kettenis@ pascal@
options::OPT_fno_strict_overflow)) {
if (A->getOption().matches(options::OPT_fno_strict_overflow))
CmdArgs.push_back("-fwrapv");
- }
+ } else if (getToolChain().getTriple().isOSOpenBSD())
+ CmdArgs.push_back("-fwrapv");
if (Arg *A = Args.getLastArg(options::OPT_freroll_loops,
options::OPT_fno_reroll_loops))