Skip to content

feat: accept target-suffixed RUSTY_V8_ARCHIVE#1816

Open
deciduously wants to merge 1 commit intodenoland:mainfrom
tangramdotdev:rusty-v8-archive-target
Open

feat: accept target-suffixed RUSTY_V8_ARCHIVE#1816
deciduously wants to merge 1 commit intodenoland:mainfrom
tangramdotdev:rusty-v8-archive-target

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.

@nitsky nitsky force-pushed the rusty-v8-archive-target branch 2 times, most recently from e3bffd6 to 7fa9ab9 Compare December 25, 2025 17:09
@nitsky nitsky force-pushed the rusty-v8-archive-target branch from 7fa9ab9 to 63f6662 Compare February 19, 2026 19:01
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