[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Tobias Hieta via cfe-commits
tru wrote: I haven't checked closely yet, but it seems like you need to add tests. https://github.com/llvm/llvm-project/pull/79390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Duncan Ogilvie via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; mrexodia wrote: For most drivers (except ELF) I can access the specialized context directly. But w

[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Duncan Ogilvie via cfe-commits
https://github.com/mrexodia updated https://github.com/llvm/llvm-project/pull/79390 >From 9ca7af3aa2401daeecc50772ebbd58f14d2fa3e9 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 25 Jan 2024 00:08:49 +0100 Subject: [PATCH] Embed the command line arguments during LTO --- clang/lib/Cod

[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; sbc100 wrote: (I'm not sure why `context()` needs to take a template param, and it looks like its

[llvm] [lld] [clang] Embed the command line arguments during LTO (PR #79390)

2024-01-24 Thread Sam Clegg via cfe-commits
@@ -40,6 +41,7 @@ using namespace llvm; namespace lld::wasm { static std::unique_ptr createLTO() { lto::Config c; + c.EmbedCmdArgs = commonContext().cmdArgs; sbc100 wrote: How about adding a helper like the existing ones `CommonLinkerContext.h`: ``` inline