mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
The mangled name of the global init function is the same for all files in a package, so giving it external linkage results in link errors if more than one file in a package has global initializers. We never need to refer to it from outside the file, so give it internal linkage. This also requires that we stop eagerly emitting a declaration of it -- if it's empty, we don't emit a definition, and LLVM doesn't allow us to emit an undefined declaration of an internal linkage symbol.