Skip to content

Commit

Permalink
refactor: move cargo/rustc flags to Cargo config.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaralice committed Aug 7, 2024
1 parent d3ecca2 commit fe19754
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ debug = true
incremental = false
opt-level = 0
rustflags = [
"-Cembed-bitcode=no",
"-Crelocation-model=pie",
"-Cdebuginfo=2",
"-Zmacro-backtrace",
"-Cembed-bitcode=no",
"-Crelocation-model=pie",
"-Cdebuginfo=2",
"-Zmacro-backtrace",
]

[profile.release.build-override]
opt-level=3
opt-level = 3

[unstable]
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "compiler_builtins", "alloc"]

[build]
target = "x86_64-boss-uefi.json"
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bosbaima:
profile := "release" # "dev" or "release"
profile_dir := "release" # "debug" or "release"
features := ","
cargo_flags := "--target x86_64-boss-uefi.json -Zbuild-std=core,compiler_builtins,alloc -Zbuild-std-features=compiler-builtins-mem --profile " + profile + " --features " + features
cargo_flags := "--profile " + profile + " --features " + features
magic_section_offset := "0x141000000"
reloc_section_offset := "0x141001000"
# EFI executable
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[toolchain]
channel = "nightly-2024-07-25"
targets = [ "x86_64-unknown-uefi" ]
components = [ "rust-src" ]

0 comments on commit fe19754

Please sign in to comment.