Skip to content

Windows host: the std module precompile of a libstdc++ base (sysroot package) gets neither its include_dirs nor -nostdinc++ #965

Closed

Description

@Sunrisepeak

Not a blocker: mcpp-platforms states the two rows' Windows builds as an exception until this is resolved.

What happens

mcpp build --target x86_64-hurd and --target x86_64-haiku work on Linux hosts and fail on a Windows host (mcpp 2026.11.18.1, LLVM 23.1.3). Both rows come from mcpp-community/mcpp-platforms#5.

Each row's base is a sysroot package (xim:x86_64-hurd-sysroot@20260314, xim:x86_64-haiku-sysroot@hrev60431) providing mcpp:c++-abi=libstdc++. Its [build] states GCC's std module sources and libstdc++'s include directories:

[build]
cxxflags          = ["-stdlib=libstdc++"]
include_dirs      = ["usr/include/c++/15", "usr/include/x86_64-gnu/c++/15", "usr/include/c++/15/backward"]
std-module        = "usr/include/c++/15/bits/std.cc"
std-compat-module = "usr/include/c++/15/bits/std.compat.cc"

On Windows the std module's precompile is given neither the include directories nor -nostdinc++:

clang++.exe -std=c++23 -x c++-module -Wno-reserved-module-identifier --target=x86_64-pc-hurd-gnu
  --sysroot="C:\...\xim-x-x86_64-hurd-sysroot\20260314"
  --precompile "C:\...\20260314\usr/include/c++/15/bits/std.cc" -o "...\std.pcm"
.../usr/include/c++/15/bits/std.cc:30:10: fatal error: 'bits/stdc++.h' file not found

bits/stdc++.h is in usr/include/x86_64-gnu/c++/15, one of the stated directories. The Haiku row fails the same way.

On Linux the same packages precompile and link: import std, an exception, arguments, status 7 in the system's image. For comparison, the Linux precompile of a libstdc++ base carries --no-default-config -nostdinc++ and the base's include directories.

The libc++ bases of the same repository (FreeBSD, OpenBSD: include_dirs = ["usr/include/c++/v1"] with std-module) build on Windows, so the gap appears specific to a libstdc++ base.

Expected

A base's include_dirs (and -nostdinc++ for a graph-supplied C++ library) reach the std module's precompile on every host, as they do on Linux.

Repeat

mcpp-community/mcpp-platforms#5, job "build x86_64-hurd on windows-2025".

Activity

  1. speak-agent commented on Nov 19, 2026

    @speak-agent
    Member

    Released in mcpp 2026.11.19.1 (#966). The words that close the clang driver's search and name a base's C++ layer (-nostdinc++, the base's directories, -stdlib=) are written on every host, so the std module of a libstdc++ base precompiles on Windows (SPEC-002 §2.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions