[PATCH] D136309: [clang][Toolchains][Gnu] pass -g through to assembler

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 20 10:28:20 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/test/Driver/as-options.s:120
+
+// Test that -g is passed through to GAS.
+// RUN: %clang -fno-integrated-as -g %s -### 2>&1 | \
----------------
nickdesaulniers wrote:
> MaskRay wrote:
> > -g can be tested along with other pass-through options. This way we test the relative order (though usually it doesn't matter but it improves the check) and decreases the number of clang invocations.
> Is the suggestion to:
> 1. combine this test with a pre-existing RUN line? or
> 2. Test all of the pass through options in this run line.
> 
> If 1, then I'm not sure which test best to combine this with.
If there are many independent pass-through options and one invocation suffices to test them all, you may try that. But I'll not insist on that if you think separate invocations is clearer.

If you add more debug info tests, consider whether other files may be more suitable (e.g. debug-options.c, clang-g-opts.c). For now I think as-options.s is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136309



More information about the cfe-commits mailing list