https://github.com/khyperia updated https://github.com/llvm/llvm-project/pull/121231
>From 33b542152876b9ccbf42cc3d070d582c32145477 Mon Sep 17 00:00:00 2001 From: khyperia <git...@khyperia.com> Date: Fri, 27 Dec 2024 23:03:58 +0100 Subject: [PATCH] Add -fuse-lipo option --- clang/include/clang/Driver/Options.td | 1 + clang/lib/Driver/ToolChains/Darwin.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index d922709db17786..6cd23de87bacde 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -6654,6 +6654,7 @@ def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">, def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[LinkOption]>, Visibility<[ClangOption, FlangOption, CLOption]>; def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>; +def fuse_lipo_EQ : Joined<["-"], "fuse-lipo=">, Group<f_clang_Group>, Flags<[LinkOption]>; defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>; def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>; diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp index 4105d38d15d7d8..0d3cbb57362164 100644 --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp @@ -910,7 +910,10 @@ void darwin::Lipo::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(II.getFilename()); } - const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("lipo")); + std::string LipoName = + std::string(Args.getLastArgValue(options::OPT_fuse_lipo_EQ, "lipo")); + const char *Exec = + Args.MakeArgString(getToolChain().GetProgramPath(LipoName.c_str())); C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(), Exec, CmdArgs, Inputs, Output)); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits