Skip to content

[target.'cfg(all(target_arch="x86_64", not(debug_assertions)))'] in .cargo/config doesn't seem to work #5777

Open
@Boscop

Description

@Boscop

I have this in my .cargo/config:

[target.'cfg(all(target_arch="x86_64", not(debug_assertions)))'] 
rustflags = ["-Ctarget-feature=+crt-static", "-Ctarget-cpu=haswell"]

But when I do a release build and check the .exe with Dependency Walker, it STILL linked dynamically to vcruntime140.dll, so the cfg doesn't seem to work, why?

Here, someone is using both of these cfg variables in a .cargo/config file, too..

EDIT: It also doesn't work when I do cargo build --release --target=x86_64-pc-windows-msvc

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cfg-exprArea: Platform cfg expressionsA-configurationArea: cargo config files and env varsA-target-dependenciesArea: [target.'cfg(foo)'.dependencies]S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions