build error //build/toolchain/win: GN error "Assignment had no effect" for rustc_wrapper_inputs on windows 11

115 views
Skip to first unread message

Emre TEKE

unread,
Apr 14, 2026, 1:50:24 PM (3 days ago) Apr 14
to Chromium-dev
Hi everyone,

I’m hitting a GN blocking error on Windows while trying to generate build files for Chromium. This appears to be a regression in the toolchain logic, specifically affecting builds where the system toolchain is used.

Environment & Steps Taken:

* Source: Freshly rebased to the latest origin/main and updated (git rebase-update).
* Sync: Executed `gclient sync`.
* Toolchain: Visual Studio 2026 (installed at `C:\Program Files\Microsoft Visual Studio\18\Community`).
* Configuration: `set DEPOT_TOOLS_WIN_TOOLCHAIN=0`.

The Error:

When running `gn gen out\Default`, GN fails with the following message:

```text
ERROR at //build/toolchain/win/toolchain.gni:394:18: Assignment had no effect.
        inputs = rustc_wrapper_inputs
                 ^-------------------
You set the variable "inputs" here and it was unused before it went out of scope.
```

Context:
The error is triggered during the `msvc_toolchain("x86")` invocation. It seems that while `rustc_wrapper_inputs` is being assigned to `inputs` within the template, the variable is never consumed by any subsequent tool or action in this specific scope, causing GN’s strictness check to fail.

Since I am using the local toolchain (`DEPOT_TOOLS_WIN_TOOLCHAIN=0`), it seems the logic for Rust integration in `toolchain.gni` doesn't properly account for cases where these inputs might be idle.

Is this a known issue with the recent Rust-related changes in the build system, or is there a missing GN arg I should be aware of to bypass this unused variable check?

Args used:
`is_component_build = true is_debug = true blink_symbol_level = 2 v8_symbol_level = 0`

Best regards,

Emre.



Nico Weber

unread,
Apr 15, 2026, 10:35:48 AM (2 days ago) Apr 15
to emrete...@gmail.com, Chromium-dev
Hi,

I happened to hit this locally too. In my case, it was caused by my accidentally using an old GN binary. If you manually run `gn gen out/Default`, does that work?

If not, what's the output of `grep -A4 'rule gn' out/Default/build.ninja`?

Nico

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/7f3be2cb-1a0d-4d24-bc8d-03d6950d7517n%40chromium.org.

Lei Zhang

unread,
Apr 15, 2026, 12:15:28 PM (2 days ago) Apr 15
to emrete...@gmail.com, Chromium-dev, tha...@chromium.org

Nico Weber

unread,
Apr 15, 2026, 12:21:38 PM (2 days ago) Apr 15
to Lei Zhang, emrete...@gmail.com, Chromium-dev
On Wed, Apr 15, 2026 at 12:10 PM Lei Zhang <the...@chromium.org> wrote:
To clarify: GN autoupdates in chromium checkouts. Normally you don't have to do anything. Just `gn` should resolve against `buildtools/$platform/gn`, which is updated via DEPS. Most people shouldn't have to do anything.

S͓̽u͓̽s͓̽h͓̽i͓̽l͓̽ ͓̽P͓̽o͓̽k͓̽h͓̽a͓̽r͓̽e͓̽l͓̽

unread,
Apr 16, 2026, 10:37:18 AM (21 hours ago) Apr 16
to tha...@chromium.org, Lei Zhang, emrete...@gmail.com, Chromium-dev
Dear Nico,

Thank you for the update. It appears that updating GN to include the fix from the provided link is the necessary step to resolve the "Assignment had no effect" error for rustc_wrapper_inputs.

I will update my GN binary and confirm if this resolves the build error.

Best regards,

Sushil Pokharel


Reply all
Reply to author
Forward
0 new messages