[clang] [Driver] Refactor option '-mlink-bitcode-file'. (PR #125322)

Amit Kumar Pandey via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 31 17:40:32 PST 2025


https://github.com/ampandey-1995 created https://github.com/llvm/llvm-project/pull/125322

Associate '-mlink-bitcode-file' as both CC1 and FC1 option.  Fixes https://gitlab.e4s.io/uo-public/llvm-openmp-offloading-v2/-/jobs/360327

>From c0eed4a42d294aac3237915ab83b4482936f206a Mon Sep 17 00:00:00 2001
From: Amit Pandey <pandey.kumaramit2023 at gmail.com>
Date: Sat, 1 Feb 2025 07:02:52 +0530
Subject: [PATCH] [Driver] Refactor option '-mlink-bitcode-file'.

Associate '-mlink-bitcode-file' as both CC1 and FC1 option.  Fixes
https://gitlab.e4s.io/uo-public/llvm-openmp-offloading-v2/-/jobs/360327
---
 clang/include/clang/Driver/Options.td | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index d8123cc39fdc951..e602e9ba9cceb97 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -7302,6 +7302,8 @@ let Visibility = [CC1Option, FC1Option] in {
 def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
   HelpText<"Link and internalize needed symbols from the given bitcode file "
            "before performing optimizations.">;
+def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
+  HelpText<"Link the given bitcode file before performing optimizations.">;
 } // let Visibility = [CC1Option, FC1Option]
 
 let Visibility = [CC1Option] in {
@@ -7411,8 +7413,6 @@ defm constructor_aliases : BoolMOption<"constructor-aliases",
   NegFlag<SetFalse, [], [ClangOption], "Disable">,
   BothFlags<[], [ClangOption, CC1Option],
           " emitting complete constructors and destructors as aliases when possible">>;
-def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
-  HelpText<"Link the given bitcode file before performing optimizations.">;
 defm link_builtin_bitcode_postopt: BoolMOption<"link-builtin-bitcode-postopt",
   CodeGenOpts<"LinkBitcodePostopt">, DefaultFalse,
   PosFlag<SetTrue, [], [ClangOption], "Link builtin bitcodes after the "



More information about the cfe-commits mailing list