Cleans library directory
This commit is contained in:
@@ -44,7 +44,7 @@ STD_FILES := "\
|
||||
sys/thread_local/no_threads.rs sys/thread_local/os.rs sys/time/mod.rs \
|
||||
sys/time/unsupported.rs sys/backtrace.rs sys/cmath.rs \
|
||||
sys/configure_builtins.rs sys/env_consts.rs sys/exit.rs sys/mod.rs thread"
|
||||
KEEP_FILES := "sys sys/pal sys/pal/survos.rs sys/alloc sys/alloc/survos.rs"
|
||||
KEEP_FILES := "survos.rs"
|
||||
|
||||
setup-std:
|
||||
@echo "🔗 Linking root directories..."
|
||||
@@ -74,8 +74,9 @@ patch-std:
|
||||
done
|
||||
|
||||
build-sysroot:
|
||||
cargo clean
|
||||
RUSTFLAGS="-Zforce-unstable-if-unmarked -C relocation-model=pic -C link-arg=-pie" \
|
||||
cargo build --package std --target ../riscv64.json --features compiler-builtins-mem
|
||||
cargo build --package std --target ../riscv64.json --features compiler-builtins-mem
|
||||
mkdir -p ../sysroot/lib/rustlib/riscv64/lib
|
||||
rm -rf ../sysroot/lib/rustlib/riscv64/lib/*
|
||||
cp target/riscv64/debug/deps/*.rlib ../sysroot/lib/rustlib/riscv64/lib
|
||||
@@ -83,11 +84,10 @@ build-sysroot:
|
||||
clean:
|
||||
cargo clean
|
||||
rm -rf ../sysroot/lib/rustlib/riscv64/lib/*
|
||||
@for item in $(find library/std/src); do \
|
||||
@for item in $(find std/src -type f); do \
|
||||
basename_item=$(basename "$item"); \
|
||||
keep=0; \
|
||||
for protected in {{ KEEP_FILES }}; do \
|
||||
echo $basename_item = $protected; \
|
||||
if [ "$basename_item" = "$protected" ]; then keep=1; break; fi; \
|
||||
done; \
|
||||
if [ "$keep" -eq 0 ]; then \
|
||||
|
||||
Reference in New Issue
Block a user