Skip to content

Pass cxxCompiler extraCLIFlags to swiftc once supported #6491

Open
@rauhul

Description

@rauhul

Description

SwiftPM currently passes cCompiler extraCLIFlags to swiftc when building a swift target by prefixing the arguments with -Xcc. This is useful as it ensures the clang-importer and clang itself to build C targets with the same set of flags.

A similar need exists for the clang-importer and clang++. They should use the same set of flags. This however is not yet possible as swiftc does have a -Xcxx flag which could prefix the cxxCompiler extraCLIFlags. The -Xcc prefix also cannot be used as c++ flags cannot all safely be passed to clang (in C mode).

Once swiftc supports -Xcxx spm should adopt it and pass cxxCompiler extraCLIFlags to swiftc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions