[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 17 18:23:36 PDT 2023


yxsamliu wrote:


> 
>  You could potentially link in all the symbols and internalize them

That probably won't work. After they are internalized, they have internal linkage and cannot be used to resolve newly added call of the same function.

The purpose of internalization is to allow you to optimize those functions, e.g. changing their signatures. After internalization, there is no guarantee they behave like the original functions.


https://github.com/llvm/llvm-project/pull/69371


More information about the cfe-commits mailing list