Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fails with non-integer opt-level #23

@kozik47

Description

@kozik47

In my Cargo.toml:

[profile.release]
opt-level = "z"

Running cargo sysroot yields:

Error: ./Cargo.toml

Caused by:
    0: Parse(Error { inner: ErrorInner { kind: Custom, line: Some(17), col: 12, at: Some(307), message: "invalid type: string \"z\", expected i64", key: ["profile", "release", "opt-level"] } })
    1: invalid type: string "z", expected i64 for key `profile.release.opt-level` at line 18 column 13

My current workaround is:

  • set opt-level = 0 in my Cargo.toml
  • run cargo sysroot
  • set opt-level = "z" in target/sysroot/Cargo.toml
  • run cargo build inside target/sysroot to get the sysroot rebuilt with my desired opt-level

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions