[clang] [LinkerWrapper] Add support for --no-canonical-prefixes (PR #184160)
Aiden Grossman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 08:49:17 PST 2026
================
@@ -532,6 +537,9 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles, const ArgList &Args,
Args.MakeArgString("--target=" + Triple.getTriple()),
};
+ if (!CanonicalPrefixes)
+ CmdArgs.push_back("-no-canonical-prefixes");
----------------
boomanaiden154 wrote:
List at the top as in the definition of `CmdArgs` right above?
We don't want to propagate this unconditionally because it could change the behavior and would also make this inconsistent with the default behavior of the clang driver.
We need to change the way we get the directory of the current executable because otherwise we cannot resolve the path to `clang` if `clang-linker-wrapper` is a symlink in a directory that contains `clang` to a file in a directory that does not contain a binary named `clang`.
https://github.com/llvm/llvm-project/pull/184160
More information about the cfe-commits
mailing list