Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $(STATLIB):

export CARGO_HOME=$(CARGOTMP) && \
export PATH="$(PATH):$(HOME)/.cargo/bin" && \
@PANIC_EXPORTS@RUSTFLAGS="$(RUSTFLAGS) --print=native-static-libs" cargo build @CRAN_FLAGS@ --lib @PROFILE@ --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) @TARGET@
@SKIP_GENERATE@@PANIC_EXPORTS@RUSTFLAGS="$(RUSTFLAGS) --print=native-static-libs" cargo build @CRAN_FLAGS@ --lib @PROFILE@ --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) @TARGET@

# Always clean up CARGOTMP
rm -Rf $(CARGOTMP);
Expand Down
2 changes: 1 addition & 1 deletion src/Makevars.win.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(STATLIB):
export CARGO_HOME=$(CARGOTMP) && \
export LIBRARY_PATH="$(LIBRARY_PATH);$(CURDIR)/$(TARGET_DIR)/libgcc_mock" && \
. rust/build-env-win.sh && \
RUSTFLAGS="$(RUSTFLAGS) --print=native-static-libs" cargo build @CRAN_FLAGS@ --target=$(TARGET) --lib @PROFILE@ --manifest-path=rust/Cargo.toml --target-dir=$(TARGET_DIR)
@SKIP_GENERATE@RUSTFLAGS="$(RUSTFLAGS) --print=native-static-libs" cargo build @CRAN_FLAGS@ --target=$(TARGET) --lib @PROFILE@ --manifest-path=rust/Cargo.toml --target-dir=$(TARGET_DIR)

# Always clean up CARGOTMP
rm -Rf $(CARGOTMP);
Expand Down
13 changes: 8 additions & 5 deletions tools/config.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ if (!is_not_cran) {

# we set cran flags only if NOT_CRAN is empty and if
# the vendored crates are present.
.cran_flags <- ifelse(
!is_not_cran && vendor_exists,
"-j 2 --offline",
""
)
is_cran_build <- !is_not_cran && vendor_exists

.cran_flags <- ifelse(is_cran_build, "-j 2 --offline", "")

# The vendored tree-sitter-ggsql crate includes a pre-generated parser.c,
# so we skip running `tree-sitter generate` (which requires tree-sitter-cli).
.skip_generate <- ifelse(is_cran_build, "GGSQL_SKIP_GENERATE=1 ", "")

# when DEBUG env var is present we use `--debug` build
.profile <- ifelse(is_debug, "", "--release")
Expand Down Expand Up @@ -123,6 +125,7 @@ new_txt <- gsub("@CRAN_FLAGS@", .cran_flags, mv_txt) |>
gsub("@CLEAN_TARGET@", .clean_targets, x = _) |>
gsub("@LIBDIR@", .libdir, x = _) |>
gsub("@TARGET@", .target, x = _) |>
gsub("@SKIP_GENERATE@", .skip_generate, x = _) |>
gsub("@PANIC_EXPORTS@", .panic_exports, x = _) |>
gsub("@ODBC_LIBS@", .odbc_libs, x = _)

Expand Down
Loading