Skip to content

Commit df778b6

Browse files
authored
Merge pull request #738 from TheBlueMatt/2020-10-opt-test
Fix passing -O1 to build from `cargo test`
2 parents 04dbf1f + e808d50 commit df778b6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ members = [
55
"lightning-net-tokio",
66
]
77

8-
# Our tests do actual crypo and lots of work, the tradeoff for -O1 is well worth it
9-
[profile.test]
10-
opt-level = 1
11-
8+
# Our tests do actual crypo and lots of work, the tradeoff for -O1 is well worth it.
9+
# Ideally we would only do this in profile.test, but profile.test only applies to
10+
# the test binary, not dependencies, which means most of the critical code still
11+
# gets compiled as -O0. See
12+
# https://doc.rust-lang.org/cargo/reference/profiles.html#profile-selection
1213
[profile.dev]
14+
opt-level = 1
1315
panic = "abort"
1416

1517
[profile.release]

0 commit comments

Comments
 (0)