Skip to content

Commit

Permalink
Some changes to allow building rustc
Browse files Browse the repository at this point in the history
  • Loading branch information
chorman0773 committed Nov 5, 2021
1 parent 0b48535 commit cb9bcd1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build-1.54.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make RUSTCSRC
RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make -f minicargo.mk LIBS
RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make test
RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make local_tests
#RUSTC_INSTALL_BINDIR=bin RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make -f minicargo.mk output-1.54.0/rustc
#LIBGIT2_SYS_USE_PKG_CONFIG=1 RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make -f minicargo.mk output-1.54.0/cargo
#./output-1.54.0/cargo --version
RUSTC_INSTALL_BINDIR=bin RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make -f minicargo.mk output-1.54.0/rustc
LIBGIT2_SYS_USE_PKG_CONFIG=1 RUSTC_VERSION=1.54.0 MRUSTC_TARGET_VER=1.54 OUTDIR_SUF=-1.54.0 make -f minicargo.mk output-1.54.0/cargo
./output-1.54.0/cargo --version
4 changes: 3 additions & 1 deletion minicargo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ else
endif
ifeq ($(RUSTC_VERSION),1.54.0)
RUST_LIB_PREFIX := library/
RUSTC_SRC_PREFIX := compiler/rustc/
else
RUST_LIB_PREFIX := src/lib
RUSTC_SRC_PREFIX := src/rustc
endif

LLVM_CONFIG := $(RUSTCSRC)build/bin/llvm-config
Expand Down Expand Up @@ -130,7 +132,7 @@ RUSTC_ENV_VARS += RUSTC_INSTALL_BINDIR=bin

$(OUTDIR)rustc: $(MRUSTC) $(MINICARGO) LIBS $(LLVM_CONFIG)
mkdir -p $(OUTDIR)rustc-build
$(RUSTC_ENV_VARS) $(MINICARGO) $(RUSTCSRC)src/rustc --vendor-dir $(VENDOR_DIR) --output-dir $(OUTDIR)rustc-build -L $(OUTDIR) $(MINICARGO_FLAGS)
$(RUSTC_ENV_VARS) $(MINICARGO) $(RUSTCSRC)$(RUSTC_SRC_PREFIX) --vendor-dir $(VENDOR_DIR) --output-dir $(OUTDIR)rustc-build -L $(OUTDIR) $(MINICARGO_FLAGS)
test ! $(OUTDIR)rustc-build/$(RUSTC_OUT_BIN) -nt $@ || cp $(OUTDIR)rustc-build/$(RUSTC_OUT_BIN) $@
$(OUTDIR)rustc-build/librustc_driver.rlib: $(MRUSTC) $(MINICARGO) LIBS
mkdir -p $(OUTDIR)rustc-build
Expand Down
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.29.0
1.54.0

0 comments on commit cb9bcd1

Please sign in to comment.