Skip to content

feat: accept target-suffixed RUSTY_V8_ARCHIVE #1816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
All committers have signed the CLA.

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.

2 participants