Skip to content
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

修复由于设置RUSTFLAGS引起的page fault #37

Closed
wants to merge 1 commit into from
Closed
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
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# The toolchain we use.
# You can get it by running DragonOS' `tools/bootstrap.sh`
TOOLCHAIN="+nightly-2023-08-15-x86_64-unknown-linux-gnu"
RUSTFLAGS+="-C target-feature=+crt-static -C link-arg=-no-pie"

ifdef DADK_CURRENT_BUILD_DIR
# 如果是在dadk中编译,那么安装到dadk的安装目录中
Expand All @@ -22,29 +21,29 @@ else
endif

build:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build --target $(RUST_TARGET)
cargo $(TOOLCHAIN) build --target $(RUST_TARGET)

run-dragonreach:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run --target $(RUST_TARGET) --bin DragonReach
cargo $(TOOLCHAIN) run --target $(RUST_TARGET) --bin DragonReach

clean:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean
cargo $(TOOLCHAIN) clean

build-release:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build --target $(RUST_TARGET) --release
cargo $(TOOLCHAIN) build --target $(RUST_TARGET) --release

clean-release:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean --target $(RUST_TARGET) --release
cargo $(TOOLCHAIN) clean --target $(RUST_TARGET) --release

fmt:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) fmt
cargo $(TOOLCHAIN) fmt

fmt-check:
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) fmt --check
cargo $(TOOLCHAIN) fmt --check

.PHONY: install
install:
mkdir -p $(INSTALL_DIR)/etc/reach/system
mkdir -p $(INSTALL_DIR)/etc/reach/ipc
cp ./parse_test/shell.service $(INSTALL_DIR)/etc/reach/system/shell.service
RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) install --target $(RUST_TARGET) --path . --no-track --root $(INSTALL_DIR) --force
cargo $(TOOLCHAIN) install --target $(RUST_TARGET) --path . --no-track --root $(INSTALL_DIR) --force
Loading