Skip to content

set fixed compiler builtins version #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: horizon
Choose a base branch
from
Open
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
144 changes: 76 additions & 68 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libc
2 changes: 0 additions & 2 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ def fix_executable(fname):

if not os.path.exists("/etc/NIXOS"):
return
if os.path.exists("/lib"):
return

# At this point we're pretty sure the user is running NixOS
nix_os_msg = "info: you seem to be running NixOS. Attempting to patch"
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ path = "lib.rs"

[dependencies]
core = { path = "../libcore" }
compiler_builtins = { version = "0.1.10", features = ['rustc-dep-of-std'] }
compiler_builtins = { version = "=0.1.27", features = ['rustc-dep-of-std'] }

[dev-dependencies]
rand = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion src/libpanic_abort/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ doc = false
[dependencies]
core = { path = "../libcore" }
libc = { version = "0.2", default-features = false }
compiler_builtins = "0.1.0"
compiler_builtins = "=0.1.27"
2 changes: 1 addition & 1 deletion src/libpanic_unwind/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ alloc = { path = "../liballoc" }
core = { path = "../libcore" }
libc = { version = "0.2", default-features = false }
unwind = { path = "../libunwind" }
compiler_builtins = "0.1.0"
compiler_builtins = "=0.1.27"
cfg-if = "0.1.8"
2 changes: 1 addition & 1 deletion src/libprofiler_builtins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ doc = false

[dependencies]
core = { path = "../libcore" }
compiler_builtins = { version = "0.1.0", features = ['rustc-dep-of-std'] }
compiler_builtins = { version = "=0.1.27", features = ['rustc-dep-of-std'] }

[build-dependencies]
cc = "1.0.1"
2 changes: 1 addition & 1 deletion src/librustc_session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "rustc_session"
path = "lib.rs"

[dependencies]
getopts = "0.2"
getopts = "*"
log = "0.4"
rustc_errors = { path = "../librustc_errors" }
rustc_feature = { path = "../librustc_feature" }
Expand Down
35 changes: 35 additions & 0 deletions src/librustc_target/spec/aarch64_unknown_horizon_libnx.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use super::{LinkerFlavor, PanicStrategy, Target, TargetOptions};

pub fn target() -> Result<Target, String> {
let opts = TargetOptions {
linker: Some("aarch64-none-elf-gcc".to_owned()),
features: "+a53,+strict-align,+crc".to_string(),
executables: true,
relocation_model: "pic".to_string(),
disable_redzone: true,
linker_is_gnu: true,
max_atomic_width: Some(128),
panic_strategy: PanicStrategy::Unwind,
abi_blacklist: super::arm_base::abi_blacklist(),
target_family: Some("unix".to_string()),
position_independent_executables: true,
has_elf_tls: false,
trap_unreachable: true,
emit_debug_gdb_scripts: true,
requires_uwtable: true,
..Default::default()
};
Ok(Target {
llvm_target: "aarch64-unknown-none".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "64".to_string(),
target_c_int_width: "32".to_string(),
target_os: "horizon".to_string(),
target_env: "newlib".to_string(),
target_vendor: "libnx".to_string(),
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
arch: "aarch64".to_string(),
linker_flavor: LinkerFlavor::Gcc,
options: opts,
})
}
2 changes: 2 additions & 0 deletions src/librustc_target/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ supported_targets! {
("powerpc-wrs-vxworks", powerpc_wrs_vxworks),
("powerpc-wrs-vxworks-spe", powerpc_wrs_vxworks_spe),
("powerpc64-wrs-vxworks", powerpc64_wrs_vxworks),

("aarch64-unknown-horizon-libnx", aarch64_unknown_horizon_libnx),
}

/// Everything `rustc` knows about how to compile for a specific target.
Expand Down
8 changes: 5 additions & 3 deletions src/libstd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ cfg-if = { version = "0.1.8", features = ['rustc-dep-of-std'] }
panic_unwind = { path = "../libpanic_unwind", optional = true }
panic_abort = { path = "../libpanic_abort" }
core = { path = "../libcore" }
libc = { version = "0.2.51", default-features = false, features = ['rustc-dep-of-std'] }
compiler_builtins = { version = "0.1.16" }
#libc = { version = "0.2.51", default-features = false, features = ['rustc-dep-of-std'] }
libc = { git = "https://github.com/leo60228/libc.git", branch = "bindgen-newlib", default-features = false, features = ['rustc-dep-of-std'] }
compiler_builtins = { version = "=0.1.27" }
profiler_builtins = { path = "../libprofiler_builtins", optional = true }
unwind = { path = "../libunwind" }
hashbrown = { version = "0.6.2", default-features = false, features = ['rustc-dep-of-std'] }

[dependencies.backtrace_rs]
package = "backtrace"
version = "0.3.46"
git = "https://github.com/Tarnadas/backtrace-rs.git"
branch = "horizon"
default-features = false # without the libstd `backtrace` feature, stub out everything
features = [ "rustc-dep-of-std" ] # enable build support for integrating into libstd

Expand Down
Loading