forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-libgcc][CMake] Refactor llvm-libgcc (llvm#65455)
There are some issues in `llvm-libgcc` before this patch: Commit c5a20b5 ([llvm-libgcc] initial commit) uses `$<TARGET_OBJECTS:unwind_static>` to get libunwind objects, which is empty. The built library is actually a shared version of libclang_rt.builtins. When configuring with `llvm/CMakeLists.txt`, target `llvm-libgcc` requires a corresponding target in `llvm-libgcc/CMakeLists.txt`. Per target installation is not handled by `llvm-libgcc`, which is not consistent with `libunwind`. This patch fixes those issues by: Reusing target `unwind_shared` in `libunwind`, linking `compiler-rt.builtins` objects into it, and applying version script. Adding target `llvm-libgcc`, creating symlinks, and utilizing cmake's dependency and component mechanism to ensure link targets will be built and installed along with symlinks. Mimicking `libunwind` to handle per target installation. It is quite hard to set necessary options without further modifying the order of runtime projects in `runtimes/CMakeLists.txt`. So though this patch reveals the possibility of co-existence of `llvm-libgcc` and `compiler-rt`/`libunwind` in `LLVM_ENABLE_RUNTIMES`, we still inhibit it to minimize influence on other projects, considering that `llvm-libgcc` is only intended for toolchain vendors, and not for casual use.
- Loading branch information
Showing
5 changed files
with
134 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters