[Bug c++/124268] `import std` initializer symbol is not shipped in `libstdc++`

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 26 21:33:26 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124268

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libstdc++                   |c++

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It can't be part of libstdc++ though. Since you only compiled the module here:
```
"$homebrew_prefix/bin/g++-15" -Drsize_t=ssize_t -std=gnu++26 -fmodule-only
-fmodules-ts -x c++ -o std.bmi -c "$homebrew_prefix/include/c++/15/bits/std.cc"
```

So this sounds like an issue with how cmake handles std modules.

>If `std.o` is deferred to the consuming executable, that is a very leaky situation. 

I am not sure. this sounds more like a leaky in how cmake handles std modules.

Shouldn't the std module be handled as a seperate library rather than part of
the application/library that cmake is compiling?


More information about the Gcc-bugs mailing list