diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2023-04-21 20:01:10 -0700 |
---|---|---|
committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2023-05-15 16:20:19 -0700 |
commit | f649599ea93301bd0d0a2b8e450d1f77425ea92e (patch) | |
tree | ebe6ae52b4d878fdfa77de6ac53ccb4bc1212044 /llvm/CMakeLists.txt | |
parent | 7d2b7be28d903a74f3ca10b2d5f97d69e006df62 (diff) | |
download | llvm-f649599ea93301bd0d0a2b8e450d1f77425ea92e.zip llvm-f649599ea93301bd0d0a2b8e450d1f77425ea92e.tar.gz llvm-f649599ea93301bd0d0a2b8e450d1f77425ea92e.tar.bz2 |
[CMake] Use LLVM own tools in extract_symbols.py
As for now, 'extract_symbols.py' can use several tools to extract
symbols from object files and libraries and to guess if the target is
32-bit Windows. The tools are being found via PATH, so in most cases,
they are just system tools. This approach has a number of limitations,
in particular:
* System tools may not be able to handle the target format in case of
cross-platform builds,
* They cannot read symbols from LLVM bitcode files, so the staged LTO
build with plugins is not supported,
* The auto-selected tools may be suboptimal (see D113557),
* Support for multiple tools for a single task increases the complexity
of the script code.
The patch proposes using LLVM's own tools to solve these issues.
Specifically, 'llvm-readobj' detects the target platform, and 'llvm-nm'
reads symbols from all supported formats, including bitcode files. The
tools can be built in Release mode for the host platform or overridden
using CMake settings 'LLVM_READOBJ' and 'LLVM_NM' respectively. The
implementation also supports using precompiled tools via
'LLVM_NATIVE_TOOL_DIR'.
Differential Revision: https://reviews.llvm.org/D149119
Diffstat (limited to 'llvm/CMakeLists.txt')
-rw-r--r-- | llvm/CMakeLists.txt | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 5e2f08f..dfe81ad 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -1129,11 +1129,6 @@ endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) # use export_executable_symbols(target). set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") -set(LLVM_EXTRACT_SYMBOLS_FLAGS "" - CACHE STRING "Additional options to pass to llvm/utils/extract_symbols.py. - These cannot override the options set by cmake, but can add extra options - such as --tools.") - include(AddLLVM) include(TableGen) |