Skip to content

Commit

Permalink
chore: use -j2 instead of CARGO_BUILD_JOBS=2
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Aug 13, 2023
1 parent 6d86132 commit dce79f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ $(STATLIB):
# therefore is only used if cargo is absent from the user's PATH.
if [ "$(NOT_CRAN)" != "true" ]; then \
export CARGO_HOME=$(CARGOTMP); \
export CARGO_BUILD_JOBS=2; \
export _CARGO_CRAN_OPTIONS="-j 2"; \
fi && \
export PATH="$(PATH):$(HOME)/.cargo/bin" && \
cargo build --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)
cargo build $(_CARGO_CRAN_OPTIONS) --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)
if [ "$(NOT_CRAN)" != "true" ]; then \
rm -Rf $(CARGOTMP) $(VENDOR_DIR) $(LIBDIR)/build; \
fi
Expand Down
4 changes: 2 additions & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ $(STATLIB):
# CARGO_LINKER is provided in Makevars.ucrt for R >= 4.2
if [ "$(NOT_CRAN)" != "true" ]; then \
export CARGO_HOME=$(CARGOTMP); \
export CARGO_BUILD_JOBS=2; \
export _CARGO_CRAN_OPTIONS="-j 2"; \
fi && \
export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$(CARGO_LINKER)" && \
export LIBRARY_PATH="$${LIBRARY_PATH};$(CURDIR)/$(TARGET_DIR)/libgcc_mock" && \
cargo build --target=$(TARGET) --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)
cargo build $(_CARGO_CRAN_OPTIONS) --target=$(TARGET) --lib --release --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR)
if [ "$(NOT_CRAN)" != "true" ]; then \
rm -Rf $(CARGOTMP) $(VENDOR_DIR) $(LIBDIR)/build; \
fi
Expand Down

0 comments on commit dce79f9

Please sign in to comment.