[PATCH] D136474: [CodeView][clang] Add flag to disable emitting command line into CodeView

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 13:06:14 PDT 2022


aeubanks added a comment.

In D136474#3875442 <https://reviews.llvm.org/D136474#3875442>, @aganea wrote:

> Thanks for the patch @aeubanks and apologies for this oversight. I am wondering however if it wouldn’t make more sense to just strip this flag (-fmessage-length) from the emitted cmd-line? The goal is to provide a reproducer, this flag does not matter for that purpose.

+1 to what @thakis said, and doing this can cause more cache hits with slightly different flags that don't affect codegen



================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4354
+
+    // Emit codeview command line if requested.
+    if (Args.hasFlag(options::OPT_gcodeview_command_line,
----------------
MaskRay wrote:
> This needs a test in clang/test/Driver/
> 
> Use `addOptInFlag`
`addOptIn/OutFlag` doesn't work here with the semantics I want

For -cc1, `-gcodeview-command-line` should control whether or not we use this feature, defaulting to not performing this feature.
But on the driver level, not specifying anything should pass `-gcodeview-command-line` by default (assuming `EmitCodeView`).

But perhaps this is confusing and we should default to `-gcodeview-command-line` everywhere?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136474



More information about the cfe-commits mailing list