CI: Windows MSVC V3 cross-bootstrap emits unexpected <features.h> include

Open
#32,758 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
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
build-system

Research direction

Start with the failing assertion in vlib/v/gen/c/headerless_program_test.v around line 280, inside assert_self_c_compiler_owned_includes, and the portable branch of test_self_c_keeps_only_the_compiler_owned_guard_include. Regenerate the C with generate_headerless_self_c using the -cross flag to see where the unexpected features.h include comes from. Done means the portable cross variant emits only the compiler-owned track_heap_checks.h include on Windows, without disabling the guard or adding a skip.

Written by the indexing model from the issue text.

Description

Genuinely executed historical master 593657221cd2ef2063d41979a7b827e8cb12ecd5, Windows MSVC shard 2 job 137340664775, finished 2026-11-22 21:38:57 UTC after 452 other VLIB passes / 164 skips, with one failure: vlib/v/gen/c/headerless_program_test.v:280 in assert_self_c_compiler_owned_includes. Actual #include <features.h> vs expected sole compiler-owned #include "D:/a/v/v/vlib/builtin/track_heap_checks.h". The failing path is portable snapshot branch of test_self_c_keeps_only_the_compiler_owned_guard_include, which calls generate_headerless_self_c(c_file, ['-cross']) on Windows and later libc_variant_source(portable,true). The native host include check is deliberately guarded $if !windows, but portable cross variant still asserts headerless correctness; do not disable that guard or add a skip. Source at failing 593 and current 44bb is identical, with upstream #32745 V1 fallback removal changing compiler routing. Need retain generated C (-nocache -cross -o ... cmd/v) and inspect who emits <features.h> and target macros; reduce to one generated-C headerless regression, compare GCC/TCC/Clang and original Windows MSVC. This is an actual compiler-test contract failure, not SDK provisioning, timeout, or job cancellation. Possibly related in area to prior R372 Windows headerless host exclusion, but not proven the same root. Status investigating, still source-applicable; native V not available locally.

[!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 Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.