Skip to content

Turning off whole-module optimization not (fully) supported? #903

@dabrahams

Description

@dabrahams

My project is blocked by an apparent whole-module optimization buh. I am unable to work around it by turning off whole-module optimization because swift-llbuild complains of a missing dependencies file.

Reproducer:

  • swift package init --type executable
  • add swiftSettings: [.unsafeFlags(["-no-whole-module-optimization"])] to the executable target
  • swift build -c release

This problem could be worked around in the compiler, in swift-llbuild, or in the driver by separately issuing the build command without -no-whole-module-optimization included, which generates the needed dependencies file. I am filing issues against all three projects in the hopes that the maintainers can agree on a possible solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions