[clang] e27026c - [LinkerWrapper] Do not consume `--verbose` from the linker
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 27 13:07:14 PDT 2022
Author: Joseph Huber
Date: 2022-07-27T16:06:48-04:00
New Revision: e27026cce16a98f923bbdb71362334faf6d68cd3
URL: https://github.com/llvm/llvm-project/commit/e27026cce16a98f923bbdb71362334faf6d68cd3
DIFF: https://github.com/llvm/llvm-project/commit/e27026cce16a98f923bbdb71362334faf6d68cd3.diff
LOG: [LinkerWrapper] Do not consume `--verbose` from the linker
Summary:
Linkers use `--verbose` to let users investigate search libraries among
other things. The linker wrapper was incorrectly not forwarding this to
the linker job. This patch simply renames this so users can still see
verbose messages from the linker if it was passed.
Added:
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index d3ff71ee28e9b..eb71a561a1cd4 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -8439,7 +8439,7 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(
Args.MakeArgString("--host-triple=" + TheTriple.getTriple()));
if (Args.hasArg(options::OPT_v))
- CmdArgs.push_back("--verbose");
+ CmdArgs.push_back("--wrapper-verbose");
if (const Arg *A = Args.getLastArg(options::OPT_g_Group)) {
if (!A->getOption().matches(options::OPT_g0))
diff --git a/clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td b/clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
index 1ab7fd239f708..07ce8b03a06ef 100644
--- a/clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
+++ b/clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
@@ -31,7 +31,7 @@ def device_linker_args_EQ : Joined<["--"], "device-linker=">,
def dry_run : Flag<["--"], "dry-run">,
Flags<[WrapperOnlyOption]>,
HelpText<"Print program arguments without running">;
-def verbose : Flag<["--"], "verbose">,
+def verbose : Flag<["--"], "wrapper-verbose">,
Flags<[WrapperOnlyOption]>, HelpText<"Verbose output from tools">;
def embed_bitcode : Flag<["--"], "embed-bitcode">,
Flags<[WrapperOnlyOption]>, HelpText<"Embed linked bitcode in the module">;
More information about the cfe-commits
mailing list