John Emmas via llvm-dev
2021-Sep-28 12:07 UTC
[llvm-dev] Printing out the file being currently compiled (feature request)
Please let me know if I need to move this to cfe-users or cfe-dev - it's a simple request when running Clang inside Visual Studio. Here's the kind of thing I typically see during a Clang build:- Build started... 1>------ Build started: Project: zita-resampler, Configuration: Release x64 ------ 1>In file included from <built-in>:1: 1>In file included from F:\+GTK-SOURCES\gnu-windows\include\ardourext\sys\targetsxs.h:100: 1>F:\+GTK-SOURCES\gnu-windows\include\gtkmmconfig.h(21,37): warning : '/*' within block comment [-Wcomment] 1>In file included from <built-in>:1: 1>In file included from F:\+GTK-SOURCES\gnu-windows\include\ardourext\sys\targetsxs.h:100: 1>F:\+GTK-SOURCES\gnu-windows\include\gtkmmconfig.h(21,37): warning : '/*' within block comment [-Wcomment] 1>../zita-resampler/vresampler.h(79,23): warning : private field '_dummy' is not used [-Wunused-private-field] I can see various warnings but what I can't tell is which file was being compiled at the time. Microsoft's own output looks more like this:- Rebuild started... 1>------ Rebuild All started: Project: zita-resampler, Configuration: Release x64 ------ 1>cresampler.cc 1>F:\+GTK-SOURCES\Ardour\libs\zita-resampler\cresampler.cc(135,10): warning C4244: '=': conversion from 'double' to 'float', possible loss of data 1>resampler-table.cc 1>resampler.cc 1>vmresampler.cc 1>vresampler.cc Microsoft's warnings are different but the important thing is that I can see which file was getting compiled when the warning occurred. Is there any way that Clang could be adapted to print out which file it's compiling? When building a big project it's also useful for having a rough estimate of how many sources are left to be compiled. Thanks, John
Hans Wennborg via llvm-dev
2021-Sep-28 12:56 UTC
[llvm-dev] Printing out the file being currently compiled (feature request)
Hi John, clang-cl has a /showFilenames option which will make it print the filename. Does that work for you? Thanks, Hans On Tue, Sep 28, 2021 at 2:07 PM John Emmas via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Please let me know if I need to move this to cfe-users or cfe-dev - it's > a simple request when running Clang inside Visual Studio. Here's the > kind of thing I typically see during a Clang build:- > > Build started... > 1>------ Build started: Project: zita-resampler, Configuration: Release > x64 ------ > 1>In file included from <built-in>:1: > 1>In file included from > F:\+GTK-SOURCES\gnu-windows\include\ardourext\sys\targetsxs.h:100: > 1>F:\+GTK-SOURCES\gnu-windows\include\gtkmmconfig.h(21,37): warning : > '/*' within block comment [-Wcomment] > 1>In file included from <built-in>:1: > 1>In file included from > F:\+GTK-SOURCES\gnu-windows\include\ardourext\sys\targetsxs.h:100: > 1>F:\+GTK-SOURCES\gnu-windows\include\gtkmmconfig.h(21,37): warning : > '/*' within block comment [-Wcomment] > 1>../zita-resampler/vresampler.h(79,23): warning : private field > '_dummy' is not used [-Wunused-private-field] > > I can see various warnings but what I can't tell is which file was being > compiled at the time. Microsoft's own output looks more like this:- > > Rebuild started... > 1>------ Rebuild All started: Project: zita-resampler, Configuration: > Release x64 ------ > 1>cresampler.cc > 1>F:\+GTK-SOURCES\Ardour\libs\zita-resampler\cresampler.cc(135,10): > warning C4244: '=': conversion from 'double' to 'float', possible loss > of data > 1>resampler-table.cc > 1>resampler.cc > 1>vmresampler.cc > 1>vresampler.cc > > Microsoft's warnings are different but the important thing is that I can > see which file was getting compiled when the warning occurred. Is there > any way that Clang could be adapted to print out which file it's > compiling? When building a big project it's also useful for having a > rough estimate of how many sources are left to be compiled. > > Thanks, John > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev