[clang] Reapply "[Driver][OHOS] Fix lld link issue for OHOS (#118192)" (PR #120159)
Peng Huang via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 3 05:34:52 PST 2025
phuang wrote:
> We can disable the test on -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF layouts, but I don't find a lit feature that.
It cannot work, becasue in the failed case, llvm runtime `x86_64-unknown-linux-gnu` target is built with `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF`, but at same time runtime `x86_64-unknown-linux-ohos` is built with `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON`. In this case, the `ohos.c` test case will be run, but it will failed becasuse runtime `x86_64-unknown-linux-gnu` will install the `libclang_rt.builtin-x86_64.a` with the old layout. It will cause the test failure. So adding a suffix `-ohos` can fix the problem. Or instead of reusing `ToolChain::getCompilerRT()` in OHOS, we can copy `ToolChain::getCompilerRT()` into `OHOS::getCompilerRT()` and not search libraries in the old layout.
https://github.com/llvm/llvm-project/pull/120159
More information about the cfe-commits
mailing list