Skip to content

Conversation

@deciduously
Copy link

Support target-specific RUSTY_V8_ARCHIVE environment variables

Summary

This PR adds support for target-specific RUSTY_V8_ARCHIVE environment variables to enable cross-compilation scenarios where different archives are needed for build and target machines.

Changes

  • Added support for RUSTY_V8_ARCHIVE_{TARGET} environment variables (with hyphens replaced by underscores)
  • Modified static_lib_url() to check target-specific archive variables before falling back to the generic RUSTY_V8_ARCHIVE
  • Updated environment variable collection to include target-specific variables for proper dependency tracking

Use Case

This change allows builds that require rusty_v8 for both the build machine (e.g., build scripts) and the target machine (e.g., the final binary). Previously, there was no way to specify different archives for different targets, which could cause issues in cross-compilation scenarios.

Behavior

The environment variable lookup now follows this priority order:

  1. RUSTY_V8_ARCHIVE_{TARGET} (target-specific, with hyphens replaced by underscores)
  2. RUSTY_V8_ARCHIVE (generic fallback)
  3. Default archive URL

For example, when targeting x86_64-unknown-linux-gnu, the build will first check for RUSTY_V8_ARCHIVE_x86_64_unknown_linux_gnu before falling back to RUSTY_V8_ARCHIVE.

Testing

This change is backward compatible - existing builds using RUSTY_V8_ARCHIVE will continue to work unchanged.

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nitsky nitsky force-pushed the rusty-v8-archive-target branch from 9765cbf to e3bffd6 Compare December 25, 2025 16:14
@nitsky nitsky force-pushed the rusty-v8-archive-target branch from e3bffd6 to 7fa9ab9 Compare December 25, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants