linfeng 7c28051e8c
chore: update toolchain version to 2024-11-05 (#1031)
* chore: update toolchain version to 2024-11-05

* update dragon reach to e945c217b3

* update dog to 6f2c0c8f12

---------

Co-authored-by: longjin <longjin@DragonOS.org>
2024-11-11 21:29:15 +08:00

42 lines
1.1 KiB
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# The toolchain we use.
# You can get it by running DragonOS' `tools/bootstrap.sh`
TOOLCHAIN="+nightly-2024-11-05-x86_64-unknown-linux-gnu"
RUSTFLAGS+="-C target-feature=+crt-static -C link-arg=-no-pie"
# 如果是在dadk中编译那么安装到dadk的安装目录中
INSTALL_DIR?=$(DADK_CURRENT_BUILD_DIR)
# 如果是在本地编译那么安装到当前目录下的install目录中
INSTALL_DIR?=./install
run:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run
build:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build
clean:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean
test:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) test
doc:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) doc
run-release:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run --release
build-release:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build --release
clean-release:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean --release
test-release:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) test --release
.PHONY: install
install:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) install --path . --no-track --root $(INSTALL_DIR) --force