[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2020-03-14 Thread Asuka Inori via Phabricator via cfe-commits
asukainori added a comment. I'm sorry to disturb. But I found this option is conflict with -flto. e.g. clang-cl -fuse-ld=lld -flto=thin /showFilenames .\test.cpp will output: clang-cl: warning: argument unused during compilation: '/showFilenames' [-Wunused-command-line-argument]

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-11 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344234: clang-cl: Add /showFilenames option (PR31957) (authored by hans, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-11 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: test/Driver/cl-showfilenames.c:7-8 +// multiple: cl-showfilenames.c +// multiple-NEXT: wildcard1.c +// multiple-NEXT: wildcard2.c rnk wrote: > I think it'd be nice to have the test show that diagnostics come out >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-10 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm Comment at: lib/Driver/Job.cpp:319 + if (PrintInputFilenames) { +for (const char *Arg : InputFilenames) + llvm::outs() << llvm::sys::path::filename(Arg) << "\n"; Huh, a -cc1 action can have

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-10 Thread Hans Wennborg via Phabricator via cfe-commits
hans updated this revision to Diff 168999. hans added a comment. Here's a version now using cc1 flags, but printing directly from the driver. Please take a look. https://reviews.llvm.org/D52773 Files: include/clang/Driver/CLCompatOptions.td include/clang/Driver/Job.h lib/Driver/Job.cpp

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-04 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. It doesn't address the version skew issue, but my blanket argument against any new environment variable is the existance of things like `_CL_` and `CCC_OVERRIDE_OPTIONS`. You can set any compiler flag you want from the environment, so we should standardize on one way of

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-04 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. In https://reviews.llvm.org/D52773#1255491, @thakis wrote: > In https://reviews.llvm.org/D52773#1255093, @zturner wrote: > > > I agree magic environment variables are bad, but without it we don’t > > address the only current actual use we have for this, which is making

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-04 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In https://reviews.llvm.org/D52773#1255093, @zturner wrote: > I agree magic environment variables are bad, but without it we don’t > address the only current actual use we have for this, which is making the > vs integration print filenames. Detecting compiler version

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-04 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a subscriber: rnk. zturner added a comment. I agree magic environment variables are bad, but without it we don’t address the only current actual use we have for this, which is making the vs integration print filenames. Detecting compiler version from inside the integration is hard,

Re: [PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-04 Thread Zachary Turner via cfe-commits
I agree magic environment variables are bad, but without it we don’t address the only current actual use we have for this, which is making the vs integration print filenames. Detecting compiler version from inside the integration is hard, but with an environment variable it’s very easy to solve.

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D52773#1252584, @zturner wrote: > Canyou add a test that demonstrates that multiple input files on the command > line will print all of them? Will do. > Also does this really need to be a cc1 arg? Why not just print it in the > driver?

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; steveire wrote: >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; zturner wrote: >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. I support continuing our practice of being silent by default, and not implementing anything like the noisy default version banner printing that MSVC does, or this filename printing. I think setting this flag is something for cmake or the VS

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; steveire wrote: >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Zachary Turner via Phabricator via cfe-commits
zturner added a comment. Canyou add a test that demonstrates that multiple input files on the command line will print all of them? Also does this really need to be a cc1 arg? Why not just print it in the driver? https://reviews.llvm.org/D52773

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Looks good. If this is passed and we invoke lld-link, should we give that a similar flag and pass that to lld-link as well? I think link.exe also prints its outputs.

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; hans wrote: >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; zturner wrote: >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Zachary Turner via Phabricator via cfe-commits
zturner added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; steveire wrote: >

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:792 Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); + if (Args.hasArg(OPT_echo_main_file_name)) +llvm::outs() << Opts.MainFileName << "\n"; I'll have to keep a

[PATCH] D52773: clang-cl: Add /showFilenames option (PR31957)

2018-10-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: rnk, thakis, zturner, steveire. Add a /showFilenames option for users who want clang to echo the currently compiled filename. MSVC does this echoing by default, and it's useful for showing progress in build systems that doesn't otherwise provide