Merge pull request #41449 from lorentey/custom-traps

[IRGen] Allow configuring a panic function to call instead of trapping
This commit is contained in:
Karoy Lorentey
2022-02-21 12:46:33 -08:00
committed by GitHub
8 changed files with 113 additions and 0 deletions

View File

@@ -1929,6 +1929,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Opts.StackPromotionSizeLimit = limit;
}
if (Args.hasArg(OPT_trap_function))
Opts.TrapFuncName = Args.getLastArgValue(OPT_trap_function).str();
Opts.FunctionSections = Args.hasArg(OPT_function_sections);
if (Args.hasArg(OPT_autolink_force_load))