Bit of a funny question (as usual for me!)
I’m building and compiling my own standard library, not using ninja to do it.
ninja swift To build the compiler then use it to build my stdlib. It’s mostly working (now the avr back end is more stable).
My missing piece is the metadata for builtins.
docs/Runtime.rst there’s a section about “Standard metadata” that says
“The Swift runtime exports standard metadata objects for
Builtin types as well as standard value witness tables that can be freely adopted by types with common layout attributes.”
Unless I’m being dumb, there’s no code in
stdlib/public/runtime to create these metadata structures. So I’m assuming that during some point in the standard build process, while the standard library module and binaries are being constructed, somehow swift is “told” to emit metadata for builtin types?
Can someone please tell me how this is done? Is there a command line something like:
swiftc —emit-metadata “Builtin.Object”?
I couldn’t see how it’s being done. And I can’t decide the intricacies of the cmake files driving it or grep through to find the commands used.
Thanks for any advice you can give as ever!