[clang] [ClangLinkerWrapper] Remove OPT_linker_arg_EQ and OPT_compiler_arg_EQ options from ClangLinkerWrapper (PR #181600)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 16 14:20:08 PST 2026
YixingZhang007 wrote:
The reason for this change is that currently `OPT_device_compiler_args_EQ` and `OPT_device_linker_args_EQ` are used to pass compiler and linker options from clang to `clang-linker-wrapper`. Then, `OPT_compiler_arg_EQ` and `OPT_linker_arg_EQ` are derived as filtered subgroups of `OPT_device_compiler_args_EQ` and `OPT_device_linker_args_EQ`, based on the target triple. These options are thenused internally in `clang-linker-wrapper` (at the moment they are only used once, where they are forwarded to the clang command called in clang-linker-wrapper for linking, see https://github.com/llvm/llvm-project/blob/4e8b7bdfea73905be8129cb33a69a6f20bf52134/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp#L588).
As a result, with the current logic, I am proposing that we can reuse `OPT_device_compiler_args_EQ` and `OPT_device_linker_args_EQ` to store the parsed `OPT_device_compiler_args_EQ` and `OPT_device_linker_args_EQ` , and then use them internally in clang-linker-wrapper`. Then we could remove `OPT_compiler_arg_EQ` and `OPT_linker_arg_EQ` completely.
https://github.com/llvm/llvm-project/pull/181600
More information about the cfe-commits
mailing list