Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .sync/Files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ group:
- files:
- source: .sync/rust/config.toml
dest: .cargo/config.toml
template:
include_uefi_target_rules: false
repos: |
OpenDevicePartnership/patina
OpenDevicePartnership/patina-apps
Expand Down
72 changes: 60 additions & 12 deletions .sync/rust/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,71 @@
# - Patina DevOps Repo: https://github.com/OpenDevicePartnership/patina-devops
# - File Sync Settings: https://github.com/OpenDevicePartnership/patina-devops/blob/main/.sync/Files.yml

[net]
git-fetch-with-cli = true
[env]
PATINA_CONFIG_VERSION = "1"

[profile.dev]
# optimize for size
opt-level = "s"
# generate all debug info
debug = true
# retain all debug info
strip = "none"
# assert on debug_assert
debug-assertions = true
# all addition/subtraction can cause panics with overflow/underflow
overflow-checks = true
# do fat LTO
lto = true
# do incremental builds for better compile times
incremental = true

[profile.release]
# optimize for size
opt-level = "s"
# no debug info generated
debug = false
# do fat LTO
lto = true
# do not assert on debug_assert
debug-assertions = false
# no panic on overflow/underflow
overflow-checks = false
# do incremental builds for better compile times
incremental = true

[profile.test]
# no optimizations
opt-level = 0
# generate all debug info
debug = true
# retain all debug info
strip = "none"
# test with debug assertions off so we are testing the release case
debug-assertions = false
# keep the overflow checks to catch these in tests
overflow-checks = true
# disable LTO
lto = false
# do incremental builds for better compile times
incremental = true

{% if include_uefi_target_rules %}
[target.x86_64-unknown-uefi]
rustflags = [
"-C", "link-arg=/base:0x0",
"-C", "link-arg=/subsystem:{{ subsystem_type | default("efi_boot_service_driver") }}",
"-C", "force-unwind-tables", # Generates .pdata section for stack tracing
"-C", "link-arg=/PDBALTPATH:{{ x86_64_pdb_name | default("x86_64_bin.pdb") }}",
# The Patina binary is a boot service driver
"-C", "link-arg=/subsystem:efi_boot_service_driver",
# Forcing frame pointers allows for better stack walking
"-C", "force-frame-pointers",
# Preserve stack unwind info
"-C", "force-unwind-tables",
]

[target.aarch64-unknown-uefi]
rustflags = [
"-C", "link-arg=/base:0x0",
"-C", "link-arg=/subsystem:{{ subsystem_type | default("efi_boot_service_driver") }}",
"-C", "force-unwind-tables", # Generates .pdata section for stack tracing
"-C", "link-arg=/PDBALTPATH:{{ aarch64_pdb_name | default("aarch64_bin.pdb") }}",
# The Patina binary is a boot service driver
"-C", "link-arg=/subsystem:efi_boot_service_driver",
# Forcing frame pointers allows for better stack walking
"-C", "force-frame-pointers",
# Preserve stack unwind info
"-C", "force-unwind-tables",
]
{% endif %}