V3 Windows MSVC: path-valued TinyCC compiler detection returns clang for a macOS-target path

Open
#32,697 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
compilers

Research direction

Start with vlib/v/driver/environment_test.v around line 668, where test_effective_c_compiler_name_detects_path_valued_tcc asserts that effective_c_compiler_name('/opt/tcc/bin/tcc', macos target) returns 'tinyc'. Reproduce on Windows with ./v -cc msvc -silent vlib/v/driver/environment_test.v and compare the results for tcc, tcc.exe, a Windows tcc path and the macOS-target path. Done means the test passes on Windows MSVC and MinGW without changing the expectation to 'clang' or skipping it.

Written by the indexing model from the issue text.

Description

Actual executed master CI failure

On master 5e0c913e60..., Windows MSVC self-tests shard 3 completed at 2026-11-21 12:43 UTC with 1660-test shard failures, including a distinct vlib/v/driver/environment_test.v:668 regression:

fn test_effective_c_compiler_name_detects_path_valued_tcc()
expected: effective_c_compiler_name('/opt/tcc/bin/tcc', pref.target_from('macos','amd64')!) == 'tinyc'
actual: 'clang'
VFLAGS: '-cc msvc'

This is not the same root as the c_source_language_test.v nested Windows LLVM Clang (MSVC-ABI vs MinGW) failure in the same job; the latter received the focused other-actor master patch 0c6065133226 selecting MinGW-compatible GCC on Windows. This compiler name/path test remains unchanged between failing 5e0 and master as of 2026-11-21 12:08 UTC, and no exact fix was identified in that patch. A missing/host-specific path basename or a failed compiler probe is a hypothesis only. Do not change this expectation to clang or skip the test.

Targeted discrimination and repair

Run the original ./v -cc msvc -silent vlib/v/driver/environment_test.v on Windows; compare effective_c_compiler_name results for tcc, tcc.exe, C:\\tools\\tcc.exe, /opt/tcc/bin/tcc, and an actual executable file under Windows when the target is macOS. Instrument whether the classifier uses target-vs-host basename parsing, does an existence/probe check, or inherits VFLAGS. Fix the true compiler selection semantics; retain Windows/macOS cross-target and path-valued checks. Validate Windows MSVC and MinGW GCC original tests, V formatter and self-build before merging. No native Windows repro or repair is claimed yet.

[!NOTE]
You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Dominant language
V
Stars
38.1k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
682

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vlang/v

All issues in vlang/v

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.