Skip to content

Commit 3f52eef

Browse files
authored
[llvm-driver] Remove llvm-profdata from the driver (#162191)
llvm-profdata uses cl tool for command line parsing which declares global options which clash in a multicall driver build. As a result operations such as `llvm-profdata --help` prints options which are unrelated to llvm-profdata when built in multicall mode.
1 parent e706a30 commit 3f52eef

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

llvm/tools/llvm-profdata/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ add_llvm_tool(llvm-profdata
1010

1111
DEPENDS
1212
intrinsics_gen
13-
GENERATE_DRIVER
1413
)
1514

16-
if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
17-
target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod)
18-
endif()
15+
target_link_libraries(llvm-profdata PRIVATE LLVMDebuginfod)

llvm/tools/llvm-profdata/llvm-profdata.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3464,10 +3464,7 @@ static int order_main() {
34643464
return 0;
34653465
}
34663466

3467-
int llvm_profdata_main(int argc, char **argvNonConst,
3468-
const llvm::ToolContext &) {
3469-
const char **argv = const_cast<const char **>(argvNonConst);
3470-
3467+
int main(int argc, const char *argv[]) {
34713468
StringRef ProgName(sys::path::filename(argv[0]));
34723469

34733470
if (argc < 2) {

0 commit comments

Comments
 (0)