[all-commits] [llvm/llvm-project] 693a5c: [llvm-driver] Just use argv[0]'s filename for find...
Alex Brachet via All-commits
all-commits at lists.llvm.org
Tue Dec 13 09:02:12 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 693a5ca69e679da6eb22f3c9aff1ada4f8c7f6c0
https://github.com/llvm/llvm-project/commit/693a5ca69e679da6eb22f3c9aff1ada4f8c7f6c0
Author: Alex Brachet <abrachet at google.com>
Date: 2022-12-13 (Tue, 13 Dec 2022)
Changed paths:
M llvm/tools/llvm-driver/llvm-driver.cpp
Log Message:
-----------
[llvm-driver] Just use argv[0]'s filename for finding tool
Usually we want the stem of argv[0] so something like clang-15
will correctly be identified as clang. For lld however, ld.lld
or ld-link would have a stem of just ld, so we also want to
use the full filename. The bug previously was that we were using
all of argv[0] so if you use a full path that happens to include a tool
name then that could be found first. This was the case in 2 stage
build where the binaries are stored in "tools/clang/stage2-bins/"
so some tools would end up as clang and not their intended tool.
More information about the All-commits
mailing list