-
Notifications
You must be signed in to change notification settings - Fork 746
Migrate build to be entirely cargo-based, with make as integration tool #4075
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
bf9e88a
Start compile via .cargo/config.toml
alevy 76b58de
Rebase with 4382e5572340d1b0486fa1df3e05f696e4fafa4b
alevy 26c6fbf
sma_q3 cargo config and probe-rs
alevy 8382753
.cargo/ for all boards
alevy a75c5d2
Merge .cargo/config.toml from top-level and boards
alevy 02ec372
Add licenses to .cargo/config.toml files
alevy aaa25f7
Remove extraneous RUSTFLAGS from Makefile.common
alevy 8877c4d
Dedup opentitan .cargo/config.toml
alevy 786bfb5
LTO in debug mode too!
alevy 6d314b8
boards: cargo config: add cargo config folder
bradjc 14b3d39
boards: add includes in cargo/config.toml
bradjc 9b61d88
boards: config.toml: include optimize_for_size
bradjc 19c5e9e
boards: config: include riscv include
bradjc 190d4fb
boards: hail: manually include flags due to stable
bradjc e2f372c
boards: build.rs: comment on -T flag
bradjc 5ecb199
boards: tock_flags.toml: add link to mangling default
bradjc 8e711f3
boards: hail: config comment
bradjc f0de849
boards: cargo: create virtual-function-elimination
bradjc 2c5321b
boards: cargo: add panic-abort-tests
bradjc 24a511a
boards: build.rs: comment the -L flag
bradjc 83e2084
Move rustdoc flags to cargo config
alevy 60fdc34
Move nordic .cargo/ to each board
alevy 4366e06
Update boards/cargo/tock_flags.toml
alevy ec9c4d3
Move cargo/.configs to board folders
alevy 01b36bb
Remove RUSTFLAGS et al from Makefile.common rules
alevy 9041fdf
boards: make: remove bloat target
bradjc b7316ab
boards: use trim-paths rather than remap-prefix
bradjc 836e1d3
boards: make: autodiscover TARGET and PLATFORM
bradjc 76f7ac0
boards: make: no need to create target dir
bradjc bcce85a
boards: make: set sentinel in config.toml
bradjc 19fbd07
boards: make: add back verbose to cargo build
bradjc e3b44e4
boards: re-add RUST_FLAGS to build using cargo
alevy a7190c4
boards: remove CARGO_FLAGS in Makefile.common
alevy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Licensed under the Apache License, Version 2.0 or the MIT License. | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
# Copyright Tock Contributors 2024. | ||
|
||
include = [ | ||
"../../cargo/tock_flags.toml", | ||
"../../cargo/unstable_flags.toml", | ||
] | ||
|
||
[build] | ||
target = "thumbv7em-none-eabi" | ||
|
||
[unstable] | ||
config-include = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# Licensed under the Apache License, Version 2.0 or the MIT License. | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
# Copyright Tock Contributors 2022. | ||
# Copyright Tock Contributors 2024. | ||
|
||
include = [ | ||
"../../../cargo/tock_flags.toml", | ||
"../../../cargo/unstable_flags.toml", | ||
] | ||
|
||
[build] | ||
10000 | target = "thumbv7em-none-eabi" | |
|
||
[target.'cfg(target_arch = "arm")'] | ||
runner = "./run.sh" | ||
|
||
[unstable] | ||
config-include = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
# Licensed under the Apache License, Version 2.0 or the MIT License. | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
# Copyright Tock Contributors 2022. | ||
# Copyright Tock Contributors 2024. | ||
|
||
include = [ | ||
"../../../cargo/tock_flags.toml", | ||
"../../../cargo/unstable_flags.toml", | ||
] | ||
|
||
[build] | ||
target = "thumbv7em-none-eabi" | ||
|
||
[target.'cfg(target_arch = "arm")'] | ||
runner = "./run.sh" | ||
|
||
[unstable] | ||
config-include = true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, cargo does not do this automatically,
rustup
does it iff the target is included inrust-toolschain.toml
. I'm not a fan of any of this setup being in the Makefile to begin with (we needed to add a hack to be able to get around this on NixOS et al where this totally doesn't work), but I don't see this as a related change to this PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. Bad commit message on my part. I'm happy to rename this PR "refactor build system and review makefile".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not important, I was just noting as I read through.