Skip to content

fix(cargo-oxide): resolve standalone LTO artifact paths - #1559

Draft
tpn wants to merge 1 commit into
NVIDIA:mainfrom
tpn:codex/coop-interop-package-identity
Draft

tpn wants to merge 1 commit into
NVIDIA:mainfrom
tpn:codex/coop-interop-package-identity

Conversation

@tpn

@tpn tpn commented Oct 20, 2026

Copy link
Copy Markdown

Summary

cargo oxide emit-ltoir could compile successfully and then read the wrong .ll file when a directory differed from its Cargo target name or the command ran from a workspace member. Resolve the standalone target from Cargo metadata and use the same intermediate directory for compilation and reading.

Changes

  • Prefer a package-named target, otherwise a sole binary/library target; diagnose ambiguous selections.
  • Honor CUDA_OXIDE_PTX_DIR for both writer and reader, including workspace-relative overrides. Refresh that target's generated files there before reading fresh IR.
  • Document target selection, output placement and override precedence.

Testing

  • 271 cargo-oxide tests pass serially; fmt, clippy with warnings denied, and build pass.
  • 14 native artifact checks cover standalone/custom targets, workspace members, overrides and existing explicit selection; four additional warm-cache member runs pass.
  • The initial parallel run encountered two failures in unchanged temporary-executable tests; the complete serial rerun passes. Full just check was not run.

Checklist

  • All commits signed off.
  • Existing source headers preserved; no new source files.

Use Cargo target names for standalone emit-ltoir artifacts. Bind the
compiler and reader to the same intermediate directory when invoked
from a Cargo workspace member.

Signed-off-by: Trent Nelson <trent@trent.me>
@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book cargo-oxide The `cargo oxide` subcommand and build automation bug Something isn't working interop Interop with external compilers / frontends labels Oct 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cargo-oxide The `cargo oxide` subcommand and build automation cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book interop Interop with external compilers / frontends

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants