mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Make the DWARF version emitted by the Swift compiler configurable.
Previously it was hardcoded to version 4 on all platforms. This patch introduces a driver and frontend option -dwarf-version to configure it if needed.
This commit is contained in:
@@ -2240,6 +2240,10 @@ int swift::performFrontend(ArrayRef<const char *> Args,
|
||||
trace.emplace(*buffer);
|
||||
});
|
||||
|
||||
// Setting DWARF Version based on frontend options.
|
||||
IRGenOptions &IRGenOpts = Invocation.getIRGenOptions();
|
||||
IRGenOpts.DWARFVersion = IRGenOpts.DWARFVersion;
|
||||
|
||||
// The compiler invocation is now fully configured; notify our observer.
|
||||
if (observer) {
|
||||
observer->parsedArgs(Invocation);
|
||||
|
||||
Reference in New Issue
Block a user