aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2023-11-28 17:44:32 -0800
committerGitHub <noreply@github.com>2023-11-28 17:44:32 -0800
commit83305faeb54cf254d133e39ddac7f2fee36972cc (patch)
tree7b0a7b2768388ccc672ea460c9440ef742404930 /clang/lib
parent5d57041d39461d0262fcef71bd9cfa0ee20c6576 (diff)
downloadllvm-83305faeb54cf254d133e39ddac7f2fee36972cc.zip
llvm-83305faeb54cf254d133e39ddac7f2fee36972cc.tar.gz
llvm-83305faeb54cf254d133e39ddac7f2fee36972cc.tar.bz2
[lld][WebAssembly] Fix bitcode LTO order in archive parsing (#73095)
When doing LTO on multiple archives, the order with which bitcodes are linked to the LTO module is hard to control, given that processing undefined symbols can lead to parsing of an object file, which in turn lead to parsing of another object file before finishing parsing of the previous file. This can result in encountering a non-prevailing comdat first when linking, which can make the the symbol undefined, and the real definition is added later with an additional prefix to avoid duplication (e.g. `__cxx_global_var_init` and `__cxx_global_var_init.2`) So this one-line fix ensures we compile bitcodes in the order that we process comdats, so that when multiple archived bitcode files have the same variable with the same comdat, we make sure that the prevailing comdat will be linked first in the LTO. Fixes #62243.
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions