Skip to content

Commit 2d96feb

Browse files
committed
use one codegen unit when compiling in dev mode
Work around for the recent change in the number of default codegen units. A proper fix requires patching the linker script.
1 parent 251aab0 commit 2d96feb

File tree

10 files changed

+30
-0
lines changed

10 files changed

+30
-0
lines changed

src/05-led-roulette/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ pg = { path = "pg" }
88

99
[profile.release]
1010
lto = true
11+
12+
[profile.dev]
13+
codegen-units = 1

src/06-hello-world/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ pg = { path = "pg" }
88

99
[profile.release]
1010
lto = true
11+
12+
[profile.dev]
13+
codegen-units = 1

src/07-registers/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ pg = { path = "pg" }
88

99
[profile.release]
1010
lto = true
11+
12+
[profile.dev]
13+
codegen-units = 1

src/08-leds-again/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ pg = { path = "pg" }
88

99
[profile.release]
1010
lto = true
11+
12+
[profile.dev]
13+
codegen-units = 1

src/09-clocks-and-timers/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ pg = { path = "pg" }
88

99
[profile.release]
1010
lto = true
11+
12+
[profile.dev]
13+
codegen-units = 1

src/11-usart/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ pg = { path = "pg" }
99

1010
[profile.release]
1111
lto = true
12+
13+
[profile.dev]
14+
codegen-units = 1

src/14-i2c/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ pg = { path = "pg" }
88

99
[profile.release]
1010
lto = true
11+
12+
[profile.dev]
13+
codegen-units = 1

src/15-led-compass/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ pg = { path = "pg" }
99

1010
[profile.release]
1111
lto = true
12+
13+
[profile.dev]
14+
codegen-units = 1

src/16-punch-o-meter/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ pg = { path = "pg" }
99

1010
[profile.release]
1111
lto = true
12+
13+
[profile.dev]
14+
codegen-units = 1

src/17-async-io-the-future/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ pg = { path = "pg" }
99

1010
[profile.release]
1111
lto = true
12+
13+
[profile.dev]
14+
codegen-units = 1

0 commit comments

Comments
 (0)