[PATCH] D113250: [clang][driver] Add -fplugin-arg- to pass arguments to plugins

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 18 11:23:43 PST 2021


MaskRay added inline comments.


================
Comment at: clang/docs/ClangPlugins.rst:133
+Clang plugins can receive arguments from the compiler driver command
+line via the `fplugin-arg-<plugin name>-<argument>` option.
+
----------------
Mention whether `<argument>` can contain `-`


================
Comment at: clang/test/Frontend/plugin-driver-args.cpp:2
+// Test passing args to plugins via the clang driver and -fplugin-arg
+// RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext -fplugin-arg-call_super_plugin-help -fsyntax-only %s 2>&1 | FileCheck %s
+// REQUIRES: plugins, examples
----------------
Move to `test/Driver` and use use `-###` to test CC1 options.

Check whether `REQUIRES: plugins, examples` is really needed. Many driver options don't need frontend feature availability.

Change `plugin-call-super.cpp` to use `%clang_cc1` to test CC1 options.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113250/new/

https://reviews.llvm.org/D113250



More information about the cfe-commits mailing list