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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to