Skip to content

Commit

Permalink
chore: add Makefile and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
arttet committed Dec 7, 2023
1 parent f0eae3c commit 1008b97
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
15 changes: 1 addition & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
rust
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
GIT_URL ?= https://github.com/rust-lang/rust.git
TARGET ?= aarch64-apple-ios,aarch64-apple-darwin

.PHONY: help
help: ## Show this help
@fgrep -h "## " $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

.PHONY: download
download: ## Download the Rust compiler
git clone --recurse-submodules -j8 ${GIT_URL}

.PHONY: configure
configure: ## Configure the config.toml
cd rust && ./configure \
--enable-verbose-tests \
--enable-codegen-tests \
--prefix=install \
--tools=cargo,rustfmt,rust-analyzer \
--target=${TARGET} \
--set llvm.download-ci-llvm=true \
--set build.verbose=3 \
--set rust.channel=dev

0 comments on commit 1008b97

Please sign in to comment.