Commit 8bfba3b
fix(teensy): derive map_path from elf_path to fix output_dir scope error (#316)
`build_link_args` was added by #313 (CMSIS-DSP auto-link refactor) but a
hold-over from #305 still referenced `output_dir.join("firmware.map")`,
which doesn't exist as a parameter of `build_link_args` (it takes
`elf_path: &Path`, not `output_dir`). The workspace failed to compile
with:
error[E0425]: cannot find value `output_dir` in this scope
--> crates/fbuild-build/src/teensy/teensy_linker.rs:93:24
Every PR opened against main since #313 has been red because of this.
Derive the map path from `elf_path.with_extension("map")`, which is
equivalent to `output_dir.join("firmware.map")` since
`elf_path = output_dir.join("firmware.elf")` at the only call site.
Adds `test_teensy_link_command_emits_linker_map_next_to_elf` so the
regression is caught locally next time.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 3cf0eed commit 8bfba3b
1 file changed
Lines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
328 | 359 | | |
329 | 360 | | |
330 | 361 | | |
| |||
0 commit comments