bootstrap: Move a bunch of build flags from the recipe

This commit is contained in:
bjorn3
2026-04-16 19:54:15 +02:00
parent cb34b3da67
commit c0f548f219
4 changed files with 17 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
[unstable]
build-std = ["core", "alloc", "compiler_builtins"]
build-std-features = ["compiler-builtins-mem"]
+2 -4
View File
@@ -6,10 +6,6 @@ authors = ["4lDO2 <4lDO2@protonmail.com>"]
edition = "2024"
license = "MIT"
[lib]
name = "bootstrap"
crate-type = ["staticlib"]
[dependencies]
hashbrown = { version = "0.15", default-features = false, features = [
"inline-more",
@@ -32,6 +28,8 @@ redox-rt = { git = "https://gitlab.redox-os.org/redox-os/relibc.git", default-fe
[profile.release]
panic = "abort"
lto = "fat"
opt-level = "s"
[profile.dev]
panic = "abort"
opt-level = "s"
+11
View File
@@ -0,0 +1,11 @@
use std::env;
fn main() {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
println!("cargo::rustc-link-arg=-z");
println!("cargo::rustc-link-arg=max-page-size=4096");
println!("cargo::rustc-link-arg=-T");
println!("cargo::rustc-link-arg={manifest_dir}/src/{arch}.ld");
}
@@ -1,4 +1,5 @@
#![no_std]
#![no_main]
#![allow(internal_features)]
#![feature(core_intrinsics, str_from_raw_parts, never_type)]