[all-commits] [llvm/llvm-project] 86cd35: [LTO][clang] Using Single Dash Consistently when P...

Qiongsi Wu via All-commits all-commits at lists.llvm.org
Tue Sep 27 11:53:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86cd3535206d6db611260aae6f2869202eae4bb4
      https://github.com/llvm/llvm-project/commit/86cd3535206d6db611260aae6f2869202eae4bb4
  Author: Qiongsi Wu <qiongsiwu at Qiongsis-MacBook-Air.local>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/Driver/opt-record.c

  Log Message:
  -----------
  [LTO][clang] Using Single Dash Consistently when Passing LTO Options

The following three static functions in `clang/lib/Driver/ToolChains/CommonArgs.cpp`

```
static void renderRpassOptions(...)
static void renderRemarksOptions(...)
static void renderRemarksHotnessOptions(...)
```

use `--plugin-opt` for the plugin option prefix, while the function `tools::addLTOOptions`  uses `-plugin-opt`. This patch makes sure that we only use `-plugin-opt` (single dash) everywhere. It is not clear to me that why we decided to use `--plugin-opt` in https://reviews.llvm.org/D85810. If using `--plugin-opt` is intended, I'd love to hear the reason and I will close this patch.

We intend to followup this patch with a few other patches that teach `clang` to pass plugin options to the AIX linker, which uses a different prefix (`-bplugin_opt:`).

Reviewed By: w2yehia

Differential Revision: https://reviews.llvm.org/D134668




More information about the All-commits mailing list