From 8ab6e85edf83947c74264ad7f5ff4e106e4f0464 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Mon, 14 Sep 2026 12:21:48 +0200 Subject: [PATCH 1/2] docs: document Windows GNU target requirement Building/testing this crate on Windows requires the x86_64-pc-windows-gnu Rust target, not the MSVC host rustup defaults to. MSVC's link.exe can't consume the raw Windows link directives this crate's SIMICS build dependencies emit, so a default cargo build/test silently targets MSVC and fails to link (or, with cargo check/clippy, appears to work without proving a real build would). This was previously only discoverable via a comment in .github/workflows/ci.yml's build_windows job; add a compact note to README.md so it's obvious up front. Keep this out of CONTRIBUTING.md -- it's a build requirement, not a contribution-process note. Co-Authored-By: Claude Sonnet 5 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 562b6138..24789ac5 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,13 @@ Then, run the provided example target and fuzzing configuration: Documentation for setup & usage of this project lives online at [intel.github.io/tsffs](https://intel.github.io/tsffs). +**Windows:** building and testing requires the `x86_64-pc-windows-gnu` Rust target, not +the MSVC host `rustup` defaults to -- MSVC's `link.exe` can't consume the Windows link +directives this crate's SIMICS build dependencies emit, so a default build/test silently +targets MSVC and fails to link. Install with `rustup target add x86_64-pc-windows-gnu` +plus MinGW-w64, then build/test with `--target x86_64-pc-windows-gnu` (see the +`build_windows` job in [`ci.yml`](.github/workflows/ci.yml) for the exact setup CI uses). + ## Capabilities This fuzzer is built using [LibAFL](https://github.com/AFLplusplus/LibAFL) and SIMICS From 71ec39c7ad1a0770a5e3e45cc2c16ecef8b2fb2b Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Wed, 16 Sep 2026 16:07:53 +0200 Subject: [PATCH 2/2] docs: move Windows GNU-target note from README to setup guide The README note was too specific for a project overview -- move the detail into docs/src/setup/windows.md's Troubleshooting section, next to the existing MinGW troubleshooting entry, since that's where anyone actually working through Windows setup will look. Co-Authored-By: Claude Sonnet 5 --- README.md | 7 ------- docs/src/setup/windows.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 24789ac5..562b6138 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,6 @@ Then, run the provided example target and fuzzing configuration: Documentation for setup & usage of this project lives online at [intel.github.io/tsffs](https://intel.github.io/tsffs). -**Windows:** building and testing requires the `x86_64-pc-windows-gnu` Rust target, not -the MSVC host `rustup` defaults to -- MSVC's `link.exe` can't consume the Windows link -directives this crate's SIMICS build dependencies emit, so a default build/test silently -targets MSVC and fails to link. Install with `rustup target add x86_64-pc-windows-gnu` -plus MinGW-w64, then build/test with `--target x86_64-pc-windows-gnu` (see the -`build_windows` job in [`ci.yml`](.github/workflows/ci.yml) for the exact setup CI uses). - ## Capabilities This fuzzer is built using [LibAFL](https://github.com/AFLplusplus/LibAFL) and SIMICS diff --git a/docs/src/setup/windows.md b/docs/src/setup/windows.md index 66d05767..84a4793b 100644 --- a/docs/src/setup/windows.md +++ b/docs/src/setup/windows.md @@ -17,6 +17,7 @@ should be run in PowerShell (the default shell on recent Windows versions). - [Set Up For Local Development](#set-up-for-local-development) - [Troubleshooting](#troubleshooting) - [I Already Have A MinGW Installation](#i-already-have-a-mingw-installation) + - [I Already Have A Rust Installation](#i-already-have-a-rust-installation) - [Command is Unrecognized](#command-is-unrecognized) ## Install System Dependencies @@ -322,6 +323,30 @@ it to `C:\MinGW`, edit `compiler.mk` and point `CC=` and `CXX=` at your MinGW `g and `g++.exe` binaries, respectively, or change the location passed with the `--mingw-dir` option in [the build step](#build-tsffs). +### I Already Have A Rust Installation + +`rustup`'s default host on Windows is the `x86_64-pc-windows-msvc` toolchain, not the +`x86_64-pc-windows-gnu` one this guide installs. If you already had Rust installed before +following this guide, your default host is likely still MSVC. Building/testing TSFFS +with the MSVC host fails at the link step (`LNK1107: invalid or corrupt file`) because +MSVC's `link.exe` can't consume the raw Windows link directives TSFFS's SIMICS build +dependencies emit -- only `x86_64-pc-windows-gnu`'s linker can. `cargo check`/`cargo +clippy` will still succeed either way (they don't link), which can hide the problem until +a real `cargo build`/`cargo test`. + +Check your default host with `rustup show`. If it says `x86_64-pc-windows-msvc`, either +install the `x86_64-pc-windows-gnu` toolchain and set a repo-local override: + +```powershell +rustup toolchain install stable-x86_64-pc-windows-gnu +rustup override set stable-x86_64-pc-windows-gnu +``` + +or pass `--target x86_64-pc-windows-gnu` explicitly on each `cargo`/`cargo simics-build` +invocation. See the `build_windows` job in +[`ci.yml`](https://github.com/intel/tsffs/blob/main/.github/workflows/ci.yml) for the +exact setup CI uses. + ### Command is Unrecognized If PowerShell complains that any command above is not recognized, take the following