rust-lang/rust

change `internalize_symbols` to work per-CGU

Closed this issue · 2 comments

Right now internalize_symbols() walks over all of the generated LLVM IR to decide what is internal. This only happens in non-incremental mode. However, it is a blocker to moving to a pipelined setup, because it requires all of the modules to be in a big array. Ideally, we would refactor things so that we figure out during trans item collection what may be marked internal or not (though in incremental mode we may prefer to mark everything public so as to have more reuse). However, another alternative would be to hack something up so that we disable pipelining when not in incremental mode.

cc @michaelwoerister

Implemented in #43183.