bootstrap: Move a bunch of build flags from the recipe
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[unstable]
|
||||
build-std = ["core", "alloc", "compiler_builtins"]
|
||||
build-std-features = ["compiler-builtins-mem"]
|
||||
@@ -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"
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user