Commit 8177764b authored by Jeremy Soller's avatar Jeremy Soller

Attempt to enable crt-static feature in Redox

parent fd61a8d1
This diff is collapsed.
......@@ -68,5 +68,8 @@ rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
# here
rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
# Redox patches
libc = { git = "https://gitlab.redox-os.org/redox-os/liblibc.git", branch = "redox" }
[patch."https://github.com/rust-lang/rust-clippy"]
clippy_lints = { path = "src/tools/clippy/clippy_lints" }
......@@ -27,6 +27,9 @@ pub fn opts() -> TargetOptions {
position_independent_executables: true,
relro_level: RelroLevel::Full,
has_elf_tls: true,
crt_static_allows_dylibs: true,
crt_static_default: true,
crt_static_respected: true,
.. Default::default()
}
}
......@@ -38,7 +38,7 @@ fn main() {
} else if target.contains("haiku") {
println!("cargo:rustc-link-lib=gcc_s");
} else if target.contains("redox") {
println!("cargo:rustc-link-lib=gcc_s");
// redox is handled in lib.rs
} else if target.contains("cloudabi") {
println!("cargo:rustc-link-lib=unwind");
}
......
......@@ -25,7 +25,7 @@ cfg_if! {
}
}
#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl", target_os = "redox")]
#[link(name = "unwind", kind = "static", cfg(target_feature = "crt-static"))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment