You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: exports -- one neutral statement of the symbol surface, three renderings
Stage two of the general build-infrastructure design.
Both platforms already publish everything: ELF gives symbols default
visibility, and PE gets an auto-generated .def listing every symbol
(mcpp.build.coff_exports, WINDOWS_EXPORT_ALL_SYMBOLS semantics). What was
missing is the other direction.
A runtime with a stable ABI publishes a reviewed set so that what is outside it
stays free to change; a plugin loaded beside its rivals must not collide -- a
Vulkan ICD that exports its internals collides with the loader and with the
other ICDs in the process. This repository has the symptom on file: mcpp's own
duplicate-symbol check on the SYCL example reports 68 _Unwind_* symbols,
because one image holds two C++ runtimes and both export them.
exports takes a file of symbol patterns or an inline list, and the backend
renders it per platform -- version script, -exported_symbols_list, or the .def
that replaces the all-exports one. One statement, three renderings, which is
the shape [runtime] already established and the reason this is a manifest key
rather than three platform-specific flag lists.
IT DOES NOT IMPLY HIDDEN VISIBILITY, and that CORRECTS the design doc, which
said it should. The narrowing is a link-time property on all three formats, so
implying a compile-time one would give a single key two effects -- and the
second effect also changes how this library's own translation units see each
other, which is a separate decision with a separate reason.
-fvisibility=hidden stays available through [build] cxxflags for the code
generation it buys.
The export list is read at manifest load rather than at plan time, so every
later stage sees one representation; origin's parent is the package root and
that holds for the root, a path dependency and a store dependency alike, which
is the "same decision in N places" this would otherwise become.
e2e 621 builds one source twice and requires the two readings to DIFFER.
Asserting only that the public symbol is present passes for a library that
exports everything, which is the state before this change; asserting only that
the internal one is absent cannot distinguish "correctly hidden" from "never
linked at all".
0 commit comments