Uploaded image for project: 'Swift'
  1. Swift
  2. SR-11898

Per module version of `target.swift-extra-clang-flags` setting

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: LLDB for Swift
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            Assignee:
            aprantl Adrian Prantl
            Reporter:
            dylansturg Dylan Sturgeon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: