解决设置rust workspace带来的“工具链不一致”的问题 (#345)

更改workflow
This commit is contained in:
LoGin
2023-08-26 21:36:13 +08:00
committed by GitHub
parent 9a367aa7eb
commit e92d022810
11 changed files with 46 additions and 22 deletions

View File

@ -95,7 +95,7 @@ sys_api_lib: sys_api_lib_stage_1
mkdir -p $(ROOT_PATH)/bin/tmp/user/sys_api_lib_build_tmp
mkdir -p $(OLD_LIBC_INSTALL_PATH)/include
mkdir -p $(OLD_LIBC_INSTALL_PATH)/lib
$(AR) x $(ROOT_PATH)/target/x86_64-unknown-none/release/liblibc.a --output=$(ROOT_PATH)/bin/tmp/user/sys_api_lib_build_tmp
$(AR) x libs/libc/target/x86_64-unknown-none/release/liblibc.a --output=$(ROOT_PATH)/bin/tmp/user/sys_api_lib_build_tmp
$(AR) crvs $(OLD_LIBC_INSTALL_PATH)/lib/libc.a $(shell find ./libs/* -name "*.o") $(shell find $(ROOT_PATH)/bin/tmp/user/sys_api_lib_build_tmp/* -name "*.o")
rm -rf $(ROOT_PATH)/bin/tmp/user/sys_api_lib_build_tmp
# $(shell find ./libs/* -name "*.o" | xargs -I {} cp {} $(ROOT_PATH)/bin/sysroot/usr/lib/)
@ -112,4 +112,8 @@ clean:
cd $$subdir && $(MAKE) clean;\
cd .. ;\
done
.PHONY: fmt
fmt:
FMT_CHECK=$(FMT_CHECK) $(MAKE) -C libs
FMT_CHECK=$(FMT_CHECK) $(MAKE) -C apps

View File

@ -9,4 +9,7 @@ $(user_apps_sub_dirs): ECHO
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" tmp_output_dir="$(tmp_output_dir)" output_dir="$(output_dir)" sys_libs_dir="$(sys_libs_dir)"
all: $(user_apps_sub_dirs)
.PHONY: clean
fmt:
@echo "格式化代码: user/apps"

View File

@ -16,4 +16,9 @@ clean:
echo "Clean in dir: $$subdir";\
cd $$subdir && $(MAKE) clean;\
cd .. ;\
done
done
.PHONY: clean
fmt:
@echo "格式化代码: user/libs"
FMT_CHECK=$(FMT_CHECK) $(MAKE) -C libc fmt

View File

@ -4,4 +4,8 @@ all:
clean:
rm -f Cargo.lock
$(MAKE) -C src clean
$(MAKE) -C src clean
.PHONY: fmt
fmt:
cargo fmt --all $(FMT_CHECK)