Description
Previous ID | SR-11898 |
Radar | rdar://problem/57711772 |
Original Reporter | dylansturg (JIRA User) |
Type | New Feature |
Additional Detail from JIRA
Votes | 0 |
Component/s | LLDB for Swift |
Labels | New Feature |
Assignee | @adrian-prantl |
Priority | Medium |
md5: 929fb7170a494f3fcbbc8113125d3b16
Issue Description:
Background
LLDB supports a global setting `target.swift-extra-clang-flags` to feeds additional flags from the compiler invocation into each SwiftASTContext created during the debugging session. These flags appear to be applied to every Swift module that's loaded during the debugging session.
In order to stop serializing debugging options (e.g. absolute search paths), @Adrian_Prantl suggested passing `-no-serialize-debugging-options` to the Swift compiler and passing the necessary Clang flags to LLDB using the `target.swift-extra-clang-flags` setting. https://forums.swift.org/t/improving-path-remappings-for-extraclangargs-swiftastcontext/26886/3
Feature Request
It would be nice to have a way to specify `target.swift-extra-clang-flags` on a per module basis. Each module might have separate Clang flags, and the project's Clang flags don't need to be used at all for system libraries (e.g. UIKit, Foundation, etc.).
Can LLDB support a setting similar to `target.swift-extra-clang-flags` that allows specifying Clang flags per-module? Perhaps a setting that's a per module map of a module name/identifier to a list of Clang flags like what is used for the existing `target.swift-extra-clang-flags` setting.