diff options
Diffstat (limited to 'lld/wasm/LTO.cpp')
-rw-r--r-- | lld/wasm/LTO.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/wasm/LTO.cpp b/lld/wasm/LTO.cpp index 58f32aaf244..dd66c67e39f 100644 --- a/lld/wasm/LTO.cpp +++ b/lld/wasm/LTO.cpp @@ -95,7 +95,8 @@ void BitcodeCompiler::add(BitcodeFile &F) { // Once IRObjectFile is fixed to report only one symbol this hack can // be removed. R.Prevailing = !ObjSym.isUndefined() && Sym->getFile() == &F; - R.VisibleToRegularObj = Config->Relocatable || Sym->IsUsedInRegularObj; + R.VisibleToRegularObj = Config->Relocatable || Sym->IsUsedInRegularObj || + (R.Prevailing && Sym->isExported()); if (R.Prevailing) undefine(Sym); } |