Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable buggy LTO #320

Merged
merged 11 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Disable LTO
  • Loading branch information
Veetaha committed Nov 24, 2023
commit a91f9442a3b9f166459ce8244537ec4aee1286e9
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ resolver = "2"

[profile.release]
codegen-units = 1
lto = true
strip = false

# ⚠️ Turns there is some bug in LTO on Windows, because it leads to the
# `marker_rustc_driver` crashing with "exit code: 0xc0000005, STATUS_ACCESS_VIOLATION"
lto = true

[workspace.package]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion cargo-marker/src/backend/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fn build_driver(toolchain: &str, version: &str, mut additional_rustc_flags: Opti
// Build driver
let mut cmd = Cargo::with_toolchain(toolchain).command();
if is_local_driver() {
cmd.args(["build", "--bin", "marker_rustc_driver"]);
cmd.args(["build", "--bin", "marker_rustc_driver", "--release"]);
} else {
cmd.args(["install", "marker_rustc_driver", "--version", version, "--force"]);

Expand Down
Loading