Skip to content

Need ability to specify optimization level or release mode for specific dependencies #10074

@JetForMe

Description

@JetForMe

Description

It is currently not possible to compile a dependency in release mode, or with optimizations turned on, without doing so for the entire project. Some dependencies are performance-sensitive, and having them run unoptimized during development can really slow things down. In my case, I'm using Whisper.cpp to transcribe speech. But another use case is plug-ins, which aren't dependencies per se, but get compiled and run frequently during development.

Here are several forum topics on the matter:

SPM needs a means of changing the build mode or specifying optimization flags for dependencies, and it needs to work whether the module is Swift or C or any other language.

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

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