slydiman wrote:

@labath 
The repro above shows that CPlusPlusLanguage::GetHardcodedSummaries() causes to 
link TypeSystemClang  and other dependencies. But --print-gc-sections and 
`llvm-objdump --all-headers --demangle lldb-server` shows that 
GetHardcodedSummaries is missing in the final binary. The linker removes unused 
functions like GetHardcodedSummaries, but the dependencies are linked because 
of global variables like TypeSystemClang::ID.

So, this patch solves the specific issue by breaking the dependency chain. 
Or we should refactor all global variables in all dependencies (lldb, llvm, 
clang). 
Note we have found at least 90 extra gc roots.

https://github.com/llvm/llvm-project/pull/132274
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to