<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62114>62114</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[compiler-rt] Using compiler-rt in LLVM_ENABLE_RUNTIMES does install libclang_rt.builtins-x86_64.a compiler-rt builtins.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ampandey-AMD
</td>
</tr>
</table>
<pre>
Hi everyone,
I am testing compiler-rt in LLVM_ENABLE_RUNTIMES along with libcxx and libcxxabi. I am coming across certain problems regarding install step of compiler-rt builtins.
Previously with compiler-rt in LLVM_ENABLE_PROJECTS we used to get the libclang_rt.builtins-x86_64.a in the folder **clang/16.0.0/lib/linux**. We get both the libclang_rt.builtins.a and libclang_rt.builtins-x86_64.a in the same folder clang/16.0.0/lib/linux.
Now when I am trying to use compiler-rt in LLVM_ENABLE_RUNTIMES along with libcxx & libcxxabi the install step actually installs only the libclang_rt.builtins.a in folder **clang/16.0.0/lib/x86_64-unkown-linux-gnu** but not libclang_rt.builtins-x86_64.a in the same folder. I am assuming that libclang_rt.builtins-x86_64.a will architecturally be the same as libclang_rt.builtins.a and so libraries should adapt to link to this rather than libclang_rt.builtins-x86_64.a.
Since we had shipped the library which links with the libclang_rt.builtins-x86_64.a, I would like to have this library always installed in the installed path of clang/16.0.0/lib/x86_64-unknown-linux-gnu folder but the problem is using compiler-rt in LLVM_ENABLE_RUNTIMES seldom installs the libclang_rt.builtins-x86_64.a and some other -x86_64.a builtins also.
Any information or help regarding how to resolve this thing?
**CMake Configuration**
`cmake '-DCMAKE_PREFIX_PATH=/opt/rocm-5.6.0-11915/llvm\;/opt/rocm-5.6.0-11915' -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DCPACK_GENERATOR=DEB '-DCMAKE_INSTALL_RPATH=\$ORIGIN:\$ORIGIN/../lib:\$ORIGIN/../lib64:/opt/rocm-5.6.0-539/lib:/opt/rocm-5.6.0-539/lib64:/opt/rocm/lib:/opt/rocm/lib64:\$ORIGIN/../llvm/lib' -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE -DROCM_PATCH_VERSION=50600 -DCMAKE_INSTALL_PREFIX=/opt/rocm-5.6.0-11915 -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rocm-5.6.0-11915 -GNinja -DCMAKE_INSTALL_PREFIX=/opt/rocm-5.6.0-11915/llvm '-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86' '-DLLVM_ENABLE_PROJECTS=clang;lld;clang-tools-extra' '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;compiler-rt' -DLIBCXX_ENABLE_SHARED=OFF -DLIBCXX_ENABLE_STATIC=ON -DLIBCXX_INSTALL_LIBRARY=OFF -DLIBCXX_INSTALL_HEADERS=OFF -DLIBCXXABI_ENABLE_SHARED=OFF -DLIBCXXABI_ENABLE_STATIC=ON -DLIBCXXABI_INSTALL_STATIC_LIBRARY=OFF -DLIBCXX_USE_COMPILER_RT=YES -DLIBCXXABI_USE_COMPILER_RT=YES -DLLVM_BUILD_DOCS=ON -DLLVM_ENABLE_SPHINX=ON -DSPHINX_WARNINGS_AS_ERRORS=OFF -DSPHINX_OUTPUT_MAN=ON '-DCMAKE_INSTALL_RPATH=$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib64:/opt/rocm-5.6.0-539/lib:/opt/rocm-5.6.0-539/lib64:/opt/rocm/lib:/opt/rocm/lib64:$ORIGIN/../llvm/lib' -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_ENABLE_Z3_SOLVER=OFF -DLLVM_ENABLE_ZLIB=ON -DLLVM_AMDGPU_ALLOW_NPI_TARGETS=ON '-DCLANG_REPOSITORY_STRING=ssh://gerritgit/lightning/ec/llvm-project 23153' -DCLANG_DEFAULT_PIE_ON_LINUX=0 -DCLANG_DEFAULT_LINKER=lld -DCLANG_DEFAULT_RTLIB=compiler-rt -DCLANG_DEFAULT_UNWINDLIB=libgcc -DCLANG_ENABLE_AMDCLANG=ON -DSANITIZER_AMDGPU= -DPACKAGE_VENDOR=AMD -DSANITIZER_HSA_INCLUDE_PATH= -DSANITIZER_COMGR_INCLUDE_PATH= -DLLVM_BUILD_LLVM_DYLIB=OFF -DLLVM_LINK_LLVM_DYLIB=OFF -DLLVM_ENABLE_LIBCXX=OFF /jenkins/workspace/compiler-psdb-amd-mainline-open/repos/external/llvm-project/llvm`
[Install.log](https://github.com/llvm/llvm-project/files/11221456/Install.log)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMV1t3ojwX_jXpTZYuDsrYCy9Q0PINggtwpn1vWAFSyTQmLhLG-u-_FRDFHuzMe_Xe2MKzsw_Ps7MTkBBkyzCegvEMjJ07VMuSV1O02yNW4OPAXjl3GS-O0wcC8W9cHTnDwJgDzQGa3f56EO2gxEIStoU53-0JxdWgkpAw6Ps_Vqkb2DPfTaNNkHgrN4aIcraFByJLSEmWv75CxIrTvygjQ9h4zPlOOUR5xYWAOa4kIgzuK55RvBOwwltUFcqCMCERpVBIvIf8-SqFrCZUEiaG_YTXFf5NeC3osU3iRs7rKPyfO09ieMCwFriAksMtllCWuEmYIrZNKzns4gxeJ1ZqjYZIOVJGz5wWuILAsIFhN-bAWOjWUBtqwFhQkjW_rH5tLYbwJ24CZFyWn0YZojNjXyYg0O6cxa34VwwF_AAPJWatErI6Kp4lVxT8S4WBYV0UbhK7kg3lskaUHru3AnJGj7cIIOyPuG3pGNTshR_YoKl0sGV1uwbCrJaQcfnXVJ56FAlRN10qS_SVkwOhFKIqL4nEuayrptwMXzwjcUtswRVaoYpgAUXJa1pAVKC9VLpQwl7UX1kSASskS1yplNjtlK4kjwnLsWrzEhVQlGS_V93e8l-h6ggPJcnLJpJolf1yDwBjDj14aFKl5AWrDEv0G7dpdn4RPaCj6ITHRcf25cUeybLZ2F9JzK407vpDaaw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