Make rustc directly invoke the linker
This commit is contained in:
@@ -4,11 +4,6 @@ version = "0.4.1"
|
||||
build = "build.rs"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "kernel"
|
||||
path = "src/lib.rs"
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0.3"
|
||||
rustc-cfg = "0.3.0"
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#![feature(slice_ptr_get, slice_ptr_len)]
|
||||
#![feature(sync_unsafe_cell)]
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
pub extern crate x86;
|
||||
@@ -8,14 +8,15 @@
|
||||
"os": "none",
|
||||
"env": "",
|
||||
"vendor": "unknown",
|
||||
"linker-flavor": "gcc",
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "gnu-lld",
|
||||
"target-family": "redox",
|
||||
"pre-link-args": {
|
||||
"gcc": ["-m64", "-nostdlib", "-static"]
|
||||
"gnu-lld": ["-z", "max-page-size=0x1000"]
|
||||
},
|
||||
"features": "+strict-align,-neon,-fp-armv8,+tpidr-el1",
|
||||
"dynamic-linking": false,
|
||||
"executables": false,
|
||||
"executables": true,
|
||||
"relocation-model": "pic",
|
||||
"disable-redzone": true,
|
||||
"frame-pointer": "always",
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
"os": "none",
|
||||
"env": "",
|
||||
"vendor": "unknown",
|
||||
"linker-flavor": "gcc",
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "gnu-lld",
|
||||
"target-family": "redox",
|
||||
"pre-link-args": {
|
||||
"gcc": ["-m32", "-nostdlib", "-static"]
|
||||
"gnu-lld": ["-z", "max-page-size=0x1000"]
|
||||
},
|
||||
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
|
||||
"dynamic-linking": false,
|
||||
"executables": false,
|
||||
"executables": true,
|
||||
"relocation-model": "static",
|
||||
"code-model": "kernel",
|
||||
"disable-redzone": true,
|
||||
|
||||
@@ -8,14 +8,15 @@
|
||||
"os": "none",
|
||||
"env": "",
|
||||
"vendor": "unknown",
|
||||
"linker-flavor": "gcc",
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "gnu-lld",
|
||||
"target-family": "redox",
|
||||
"pre-link-args": {
|
||||
"gcc": ["-m64", "-nostdlib", "-static"]
|
||||
"gnu-lld": ["-z", "max-page-size=0x1000"]
|
||||
},
|
||||
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
|
||||
"dynamic-linking": false,
|
||||
"executables": false,
|
||||
"executables": true,
|
||||
"relocation-model": "static",
|
||||
"code-model": "kernel",
|
||||
"disable-redzone": true,
|
||||
|
||||
Reference in New Issue
Block a user