diff --git a/src/Makevars b/src/Makevars index b2b4c0a3..470fdd52 100644 --- a/src/Makevars +++ b/src/Makevars @@ -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 diff --git a/src/Makevars.win b/src/Makevars.win index 0888a24f..62e3a271 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -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