mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add flag -swift-async-framepointer=auto,never,always to
control swift extended frame information emission On linux we default to disable the extended frame info (since the system libraries don't support it). On darwin the default is to automatically choose based on the deployment target. The Concurrency library explicitly forces extended frame information and the back deployment library explicitly disables it.
This commit is contained in:
@@ -1908,6 +1908,24 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
|
||||
Opts.VirtualFunctionElimination = true;
|
||||
}
|
||||
|
||||
// Default to disabling swift async extended frame info on linux.
|
||||
if (Triple.getOS() == llvm::Triple::Linux) {
|
||||
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Never;
|
||||
}
|
||||
if (const Arg *A = Args.getLastArg(OPT_swift_async_frame_pointer_EQ)) {
|
||||
StringRef mode(A->getValue());
|
||||
if (mode == "auto")
|
||||
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Auto;
|
||||
else if (mode == "always")
|
||||
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Always;
|
||||
else if (mode == "never")
|
||||
Opts.SwiftAsyncFramePointer = SwiftAsyncFramePointerKind::Never;
|
||||
else {
|
||||
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
|
||||
A->getAsString(Args), A->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user