scan-build checking for make

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

scan-build checking for make

Hans Wennborg via cfe-dev
Hi all,

scan-build looks at the name of the build command to decide whether to add
CC=... and CXX=... commandline options for make-like build commands, in order to
override these values if they are set in the makefile (which wins over
environment variables).

https://github.com/llvm/llvm-project/blob/master/clang/tools/scan-build/bin/scan-build#L1118

Unfortunately, this means that

scan-build /usr/local/bin/make or scan-build $HOME/bin/gmake

are not recognized as "make-like" and CC=... and CXX=... options are not added.

This check should be made with a regex, just like the checks before.

Is this Perl script still used? Should I make a patch?

Csaba
--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformat way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: scan-build checking for make

Hans Wennborg via cfe-dev
Yes, perl scan-build is absolutely still used, so patches are very welcome!

Regex, or just extract the filename, or maybe even *always* set these
variables because it's unlikely to make things worse.

On 2/12/20 1:58 AM, Csaba Ráduly via cfe-dev wrote:

> Hi all,
>
> scan-build looks at the name of the build command to decide whether to
> add CC=... and CXX=... commandline options for make-like build
> commands, in order to override these values if they are set in the
> makefile (which wins over environment variables).
>
> https://github.com/llvm/llvm-project/blob/master/clang/tools/scan-build/bin/scan-build#L1118 
>
>
> Unfortunately, this means that
>
> scan-build /usr/local/bin/make or scan-build $HOME/bin/gmake
>
> are not recognized as "make-like" and CC=... and CXX=... options are
> not added.
>
> This check should be made with a regex, just like the checks before.
>
> Is this Perl script still used? Should I make a patch?
>
> Csaba

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: scan-build checking for make

Hans Wennborg via cfe-dev
Now I have to learn to use Phabricator :)


On Wed, Feb 12, 2020 at 8:26 AM Artem Dergachev <[hidden email]> wrote:
Yes, perl scan-build is absolutely still used, so patches are very welcome!

Regex, or just extract the filename, or maybe even *always* set these
variables because it's unlikely to make things worse.

On 2/12/20 1:58 AM, Csaba Ráduly via cfe-dev wrote:
> Hi all,
>
> scan-build looks at the name of the build command to decide whether to
> add CC=... and CXX=... commandline options for make-like build
> commands, in order to override these values if they are set in the
> makefile (which wins over environment variables).
>
> https://github.com/llvm/llvm-project/blob/master/clang/tools/scan-build/bin/scan-build#L1118
>
>
> Unfortunately, this means that
>
> scan-build /usr/local/bin/make or scan-build $HOME/bin/gmake
>
> are not recognized as "make-like" and CC=... and CXX=... options are
> not added.
>
> This check should be made with a regex, just like the checks before.
>
> Is this Perl script still used? Should I make a patch?
>
> Csaba



--
You can get very substantial performance improvements
by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler
So if you're looking for a completely portable, 100% standards-conformant way
to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK)

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev