Skip to content

Disable path mapping for Rust linking actions - #35

Open
tamird wants to merge 1 commit into
hermeticbuild:mainfrom
tamird:fix/hermetic-rustc-linker-path-mapping
Open

Disable path mapping for Rust linking actions#35
tamird wants to merge 1 commit into
hermeticbuild:mainfrom
tamird:fix/hermetic-rustc-linker-path-mapping

Conversation

@tamird

@tamird tamird commented Aug 1, 2026

Copy link
Copy Markdown

C/C++ toolchain APIs flatten selected linker paths and feature-expanded
arguments into strings. With path mapping enabled, generated linker,
library-search, resource, and CRT paths retain their real configuration
while the execution sandbox uses mapped paths, causing native links to
fail.

Do not advertise path mapping for actions that link native artifacts,
including WebAssembly links with native dependencies. Retain mapping
for Rust libraries, metadata-only actions, ordinary documentation, and
WebAssembly links without native dependencies.

Use configuration-independent substitution tokens for generated-file
paths in compiler environment files. Resolve each token from its File
in the consuming action so shared environment files remain valid for
both mapped and unmapped layouts.

Assisted-by: Codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c08ae67e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from 4c08ae6 to 4124305 Compare August 1, 2026 02:14
Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch 2 times, most recently from 93ec56d to e97bf8d Compare August 1, 2026 11:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e97bf8da8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from e97bf8d to 3e75f66 Compare August 1, 2026 11:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e75f669cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl Outdated
Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from 3e75f66 to 4375a78 Compare August 1, 2026 14:42
@tamird tamird changed the title Fix path mapping for generated linker paths Disable path mapping for Rust linking actions Aug 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4375a78002

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from 4375a78 to ef81b5e Compare August 1, 2026 15:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef81b5e720

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl Outdated
Comment thread rust/private/rustc.bzl Outdated
Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from ef81b5e to 3a602af Compare August 1, 2026 15:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a602afd1d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl
Comment thread rust/private/rustc.bzl Outdated
Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from 3a602af to 6b44bed Compare August 1, 2026 15:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b44bed29b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/rust_analyzer/env_file.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from 6b44bed to a8e3ca4 Compare August 1, 2026 16:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8e3ca40b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from a8e3ca4 to d0a1d67 Compare August 1, 2026 16:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0a1d6703c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust/private/rustc.bzl
Comment thread tools/rust_analyzer/env_file.bzl Outdated
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch 2 times, most recently from 43555c8 to c5b87ad Compare August 1, 2026 16:23

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5b87ad1c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/rust_analyzer/env_file.bzl
C/C++ toolchain APIs flatten selected linker paths and feature-expanded
arguments into strings. With path mapping enabled, generated linker,
library-search, resource, and CRT paths retain their real configuration
while the execution sandbox uses mapped paths, causing native links to
fail.

Do not advertise path mapping for actions that link native artifacts,
including WebAssembly native dependencies. Retain mapping for Rust
libraries, metadata, and ordinary documentation.

Represent generated-file paths in compiler environment files as
substitution tokens. Resolve each token from its File in the consuming
action so shared environment files remain valid for both mapped and
unmapped layouts.

Assisted-by: Codex
@tamird
tamird force-pushed the fix/hermetic-rustc-linker-path-mapping branch from c5b87ad to 6a5fbda Compare August 1, 2026 16:51
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