Skip to content

Commit 1129b2c

Browse files
committed
Fix passing -O1 to build from cargo test
In 9e03087 we started setting `opt-level` only on profile.test and not profile.dev. When that commit was authored I tested only that rustc was being called with opt-level set in its flags, not that the resulted run ran at the speed I expected. It seems profile.test isn't applied properly to dependencies or so, resulting in tests running much slower than they do at profile.dev.opt-level=1.
1 parent 45a558b commit 1129b2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ 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 seems to not be
10+
# used in testing, only profile.dev impacts the optimization level.
1211
[profile.dev]
1312
panic = "abort"
13+
opt-level = 1
1414

1515
[profile.release]
1616
opt-level = 3

0 commit comments

Comments
 (0)