Add a small part of the real rust std
This commit is contained in:
12
justfile
12
justfile
@@ -17,13 +17,21 @@ cp_std path:
|
||||
@echo "Copying {{ path }}"
|
||||
@mkdir {{ "crates/std/src" / parent_directory(path) }} -p
|
||||
@cp {{ rust_src / path }} {{ "crates/std/src" / path }}
|
||||
@perl -i -0777 -pe 's/^\s*#!?\[(un)?stable\(.*?\)\s*\]\n//gsm' {{ "crates/std/src" / path }}
|
||||
@perl -i -0777 -pe 's/^\s*#!?\[rustc_.*?\]\n//gsm' {{ "crates/std/src" / path }}
|
||||
@sed -i -f patches.sed {{ "crates/std/src" / path }}
|
||||
|
||||
update_std:
|
||||
@# Not copied : sys/mod.rs, io.rs
|
||||
@just cp_std "ffi/c_str.rs"
|
||||
@just cp_std "ffi/mod.rs"
|
||||
@just cp_std "ffi/os_str.rs"
|
||||
@just cp_std "ffi/os_str/tests.rs"
|
||||
@just cp_std "sys/env/mod.rs"
|
||||
@just cp_std "sys/env/unsupported.rs"
|
||||
@just cp_std "sys/os_str/mod.rs"
|
||||
@just cp_std "sys/os_str/bytes.rs"
|
||||
@just cp_std "sys/os_str/bytes/tests.rs"
|
||||
@# Copied but edited for the moment
|
||||
# @just cp_std "hash/mod.rs"
|
||||
|
||||
build_user_prog prog:
|
||||
RUSTFLAGS="-C relocation-model=pic -C link-arg=-Tuser.ld -C link-arg=-pie" cargo b {{ cargo_flags }} --package {{ prog }}
|
||||
|
||||
Reference in New Issue
Block a user