[all-commits] [llvm/llvm-project] f06abb: LLVM Driver Multicall tool
Chris B via All-commits
all-commits at lists.llvm.org
Sun Jun 5 21:28:18 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f06abbb393800b0d466c88e283c06f75561c432c
https://github.com/llvm/llvm-project/commit/f06abbb393800b0d466c88e283c06f75561c432c
Author: Chris Bieneman <chris.bieneman at me.com>
Date: 2022-06-06 (Mon, 06 Jun 2022)
Changed paths:
M clang/cmake/modules/AddClang.cmake
M clang/tools/driver/CMakeLists.txt
M clang/tools/driver/driver.cpp
M llvm/CMakeLists.txt
A llvm/cmake/driver-template.cpp.in
M llvm/cmake/modules/AddLLVM.cmake
M llvm/lib/Support/Path.cpp
M llvm/lib/Support/Unix/Path.inc
M llvm/lib/Support/Windows/Path.inc
M llvm/test/CMakeLists.txt
M llvm/test/lit.cfg.py
M llvm/test/lit.site.cfg.py.in
A llvm/test/tools/llvm-driver/help-passthrough.test
A llvm/test/tools/llvm-driver/help.test
A llvm/test/tools/llvm-driver/symlink-call.test
M llvm/tools/CMakeLists.txt
M llvm/tools/dsymutil/CMakeLists.txt
M llvm/tools/dsymutil/dsymutil.cpp
M llvm/tools/llvm-ar/CMakeLists.txt
M llvm/tools/llvm-ar/llvm-ar.cpp
M llvm/tools/llvm-cxxfilt/CMakeLists.txt
M llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
A llvm/tools/llvm-driver/CMakeLists.txt
A llvm/tools/llvm-driver/llvm-driver.cpp
M llvm/tools/llvm-objcopy/CMakeLists.txt
M llvm/tools/llvm-objcopy/llvm-objcopy.cpp
M utils/bazel/llvm-project-overlay/clang/BUILD.bazel
M utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Log Message:
-----------
LLVM Driver Multicall tool
This patch adds an llvm-driver multicall tool that can combine multiple
LLVM-based tools. The build infrastructure is enabled for a tool by
adding the GENERATE_DRIVER option to the add_llvm_executable CMake
call, and changing the tool's main function to a canonicalized
tool_name_main format (i.e. llvm_ar_main, clang_main, etc...).
As currently implemented llvm-driver contains dsymutil, llvm-ar,
llvm-cxxfilt, llvm-objcopy, and clang (if clang is included in the
build).
llvm-driver can be enabled from builds by setting
LLVM_TOOL_LLVM_DRIVER_BUILD=On.
There are several limitations in the current implementation, which can
be addressed in subsequent patches:
(1) the multicall binary cannot currently properly handle
multi-dispatch tools. This means symlinking llvm-ranlib to llvm-driver
will not properly result in llvm-ar's main being called.
(2) the multicall binary cannot be comprised of tools containing
conflicting cl::opt options as the global cl::opt option list cannot
contain duplicates.
These limitations can be addressed in subsequent patches.
Differential revision: https://reviews.llvm.org/D109977
More information about the All-commits
mailing list