-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Use target.json to control linking
Right now we use Cargo files to strip the binary and remove panic-based stack unwinding. However, these are necessary due to the nature of our _target_, so the target file should set these options. Signed-off-by: Joe Richey <[email protected]>
- Loading branch information
Showing
4 changed files
with
6 additions
and
7 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -4,14 +4,14 @@ version = "0.1.0" | |
authors = ["Rob Bradford <[email protected]>"] | ||
edition = "2018" | ||
|
||
# the profile used for `cargo build` | ||
# Despite "panic-strategy": "abort" being set in target.json, panic = "abort" is | ||
# needed here to make "cargo check" and "cargo clippy" run without errors. | ||
[profile.dev] | ||
panic = "abort" # disable stack unwinding on panic | ||
panic = "abort" | ||
lto = true | ||
|
||
# the profile used for `cargo build --release` | ||
[profile.release] | ||
panic = "abort" # disable stack unwinding on panic | ||
panic = "abort" | ||
lto = true | ||
|
||
[dependencies] | ||
|
This file contains 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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
"features": "-mmx,-sse,+soft-float", | ||
"pre-link-args": { | ||
"ld.lld": [ | ||
"-s", | ||
"--script=layout.ld" | ||
] | ||
} | ||
|