Re: clang-local.1: document support for source-based code coverage

2022-05-06 Thread Theo de Raadt
Frederic Cambus  wrote:

> On a more serious note though, building from ports was the only way
> to have -stable packages before we started to offer -stable binary
> packages with OpenBSD 6.5, and it is still the only way for users of
> architectures for which those packages are not provided. It's thus
> reasonable to assume most of our users are familiar with the ports
> tree hierarchy terminology.

I have no idea where you are coming from.  The vast majority of our
users did NOT care about newer ports, and stuck with the provided
packages through the 6 month release cycle. 

The % of users who build ports is low single-digit.



Re: clang-local.1: document support for source-based code coverage

2022-05-06 Thread Frederic Cambus
On Wed, May 04, 2022 at 09:50:47AM -0600, Theo de Raadt wrote:

> > > Isn't the purpose of the clang-local(1) to document local changes to the
> > > system compiler, -fsanitize-minimal-runtime feels like a special case as
> > > we do not have the complete sanitizer runtime.
> > 
> > What do you suggest as a good location where people will 
> > find that information easily ?
> 
> Who knows, but probably not in clang-local.1
> 
> I actually find it a bit offensive when a base document has to mention
> something not in base. While here, let me make a comment on the

This is a valid objection, and there were other concerns about
clang-local.1 not being an adequate place to mention this, so I'm
withdrawing this diff.

> proposal's use of the token "devel/llvm" -- that is so completely obtuse
> and out of touch with the potential user base.  The average person will
> not understand that at all.  It is hugely presumptious that anyone
> searching for this compiler tooling will be familiar with the "ports"
> tree-heiracry; the reality is NOONE uses ports, instead they use
> packages with has a completely different namespace, and thus
> "devel/llvm" is completely meaningless to a person who uses packages.

That's a nice slogan idea for a future ports hackathon t-shirt:
"the reality is NOONE uses ports".

On a more serious note though, building from ports was the only way
to have -stable packages before we started to offer -stable binary
packages with OpenBSD 6.5, and it is still the only way for users of
architectures for which those packages are not provided. It's thus
reasonable to assume most of our users are familiar with the ports
tree hierarchy terminology.



Re: clang-local.1: document support for source-based code coverage

2022-05-04 Thread Bryan Steele
On Wed, May 04, 2022 at 05:40:43PM +0200, Marc Espie wrote:
> On Wed, May 04, 2022 at 07:43:35AM -0400, Bryan Steele wrote:
> > On Wed, May 04, 2022 at 01:20:10PM +0200, Frederic Cambus wrote:
> > > Hi tech@,
> > > 
> > > The base system includes the compiler-rt profile library for
> > > source-based code coverage.
> > > 
> > > So here is a diff to document support in clang-local.1, the same
> > > way we document support for the ubsan_minimal sanitizer runtime
> > > which is also part of compiler-rt.
> > > 
> > > Comments? OK?
> > > 
> > > Index: share/man/man1/clang-local.1
> > > ===
> > > RCS file: /cvs/src/share/man/man1/clang-local.1,v
> > > retrieving revision 1.23
> > > diff -u -p -r1.23 clang-local.1
> > > --- share/man/man1/clang-local.1  18 Feb 2022 00:39:18 -  1.23
> > > +++ share/man/man1/clang-local.1  4 May 2022 11:03:11 -
> > > @@ -99,6 +99,15 @@ See the documentation for the
> > >  .Fl fsanitize-minimal-runtime
> > >  flag.
> > >  .It
> > > +The base system includes the compiler-rt profile library for
> > > +source-based code coverage. See the documentation for the
> > > +.Fl fprofile-instr-generate
> > > +and
> > > +.Fl fcoverage-mapping
> > > +flags.
> > > +Note that llvm-profdata and llvm-cov tools from devel/llvm are
> > > +required to process coverage data and produce reports.
> > > +.It
> > >  The
> > >  .Xr malloc 3 ,
> > >  .Xr calloc 3 ,
> > 
> > Isn't the purpose of the clang-local(1) to document local changes to the
> > system compiler, -fsanitize-minimal-runtime feels like a special case as
> > we do not have the complete sanitizer runtime.
> 
> What do you suggest as a good location where people will 
> find that information easily ?

As unfortunate as it is, clang documention is mostly on the website[0].
I don't see why this needs to be in clang-local, is there some reason
why users would expect this to not work by default on OpenBSD?

-Bryan.

[0] https://releases.llvm.org/13.0.0/tools/clang/docs/UsersManual.html



Re: clang-local.1: document support for source-based code coverage

2022-05-04 Thread Theo de Raadt
Marc Espie  wrote:

> On Wed, May 04, 2022 at 07:43:35AM -0400, Bryan Steele wrote:
> > On Wed, May 04, 2022 at 01:20:10PM +0200, Frederic Cambus wrote:
> > > Hi tech@,
> > > 
> > > The base system includes the compiler-rt profile library for
> > > source-based code coverage.
> > > 
> > > So here is a diff to document support in clang-local.1, the same
> > > way we document support for the ubsan_minimal sanitizer runtime
> > > which is also part of compiler-rt.
> > > 
> > > Comments? OK?
> > > 
> > > Index: share/man/man1/clang-local.1
> > > ===
> > > RCS file: /cvs/src/share/man/man1/clang-local.1,v
> > > retrieving revision 1.23
> > > diff -u -p -r1.23 clang-local.1
> > > --- share/man/man1/clang-local.1  18 Feb 2022 00:39:18 -  1.23
> > > +++ share/man/man1/clang-local.1  4 May 2022 11:03:11 -
> > > @@ -99,6 +99,15 @@ See the documentation for the
> > >  .Fl fsanitize-minimal-runtime
> > >  flag.
> > >  .It
> > > +The base system includes the compiler-rt profile library for
> > > +source-based code coverage. See the documentation for the
> > > +.Fl fprofile-instr-generate
> > > +and
> > > +.Fl fcoverage-mapping
> > > +flags.
> > > +Note that llvm-profdata and llvm-cov tools from devel/llvm are
> > > +required to process coverage data and produce reports.
> > > +.It
> > >  The
> > >  .Xr malloc 3 ,
> > >  .Xr calloc 3 ,
> > 
> > Isn't the purpose of the clang-local(1) to document local changes to the
> > system compiler, -fsanitize-minimal-runtime feels like a special case as
> > we do not have the complete sanitizer runtime.
> 
> What do you suggest as a good location where people will 
> find that information easily ?

Who knows, but probably not in clang-local.1

I actually find it a bit offensive when a base document has to mention
something not in base. While here, let me make a comment on the
proposal's use of the token "devel/llvm" -- that is so completely obtuse
and out of touch with the potential user base.  The average person will
not understand that at all.  It is hugely presumptious that anyone
searching for this compiler tooling will be familiar with the "ports"
tree-heiracry; the reality is NOONE uses ports, instead they use
packages with has a completely different namespace, and thus
"devel/llvm" is completely meaningless to a person who uses packages.

Note that adding "Note that" doesn't help either.



Re: clang-local.1: document support for source-based code coverage

2022-05-04 Thread Marc Espie
On Wed, May 04, 2022 at 07:43:35AM -0400, Bryan Steele wrote:
> On Wed, May 04, 2022 at 01:20:10PM +0200, Frederic Cambus wrote:
> > Hi tech@,
> > 
> > The base system includes the compiler-rt profile library for
> > source-based code coverage.
> > 
> > So here is a diff to document support in clang-local.1, the same
> > way we document support for the ubsan_minimal sanitizer runtime
> > which is also part of compiler-rt.
> > 
> > Comments? OK?
> > 
> > Index: share/man/man1/clang-local.1
> > ===
> > RCS file: /cvs/src/share/man/man1/clang-local.1,v
> > retrieving revision 1.23
> > diff -u -p -r1.23 clang-local.1
> > --- share/man/man1/clang-local.118 Feb 2022 00:39:18 -  1.23
> > +++ share/man/man1/clang-local.14 May 2022 11:03:11 -
> > @@ -99,6 +99,15 @@ See the documentation for the
> >  .Fl fsanitize-minimal-runtime
> >  flag.
> >  .It
> > +The base system includes the compiler-rt profile library for
> > +source-based code coverage. See the documentation for the
> > +.Fl fprofile-instr-generate
> > +and
> > +.Fl fcoverage-mapping
> > +flags.
> > +Note that llvm-profdata and llvm-cov tools from devel/llvm are
> > +required to process coverage data and produce reports.
> > +.It
> >  The
> >  .Xr malloc 3 ,
> >  .Xr calloc 3 ,
> 
> Isn't the purpose of the clang-local(1) to document local changes to the
> system compiler, -fsanitize-minimal-runtime feels like a special case as
> we do not have the complete sanitizer runtime.

What do you suggest as a good location where people will 
find that information easily ?



Re: clang-local.1: document support for source-based code coverage

2022-05-04 Thread Bryan Steele
On Wed, May 04, 2022 at 01:20:10PM +0200, Frederic Cambus wrote:
> Hi tech@,
> 
> The base system includes the compiler-rt profile library for
> source-based code coverage.
> 
> So here is a diff to document support in clang-local.1, the same
> way we document support for the ubsan_minimal sanitizer runtime
> which is also part of compiler-rt.
> 
> Comments? OK?
> 
> Index: share/man/man1/clang-local.1
> ===
> RCS file: /cvs/src/share/man/man1/clang-local.1,v
> retrieving revision 1.23
> diff -u -p -r1.23 clang-local.1
> --- share/man/man1/clang-local.1  18 Feb 2022 00:39:18 -  1.23
> +++ share/man/man1/clang-local.1  4 May 2022 11:03:11 -
> @@ -99,6 +99,15 @@ See the documentation for the
>  .Fl fsanitize-minimal-runtime
>  flag.
>  .It
> +The base system includes the compiler-rt profile library for
> +source-based code coverage. See the documentation for the
> +.Fl fprofile-instr-generate
> +and
> +.Fl fcoverage-mapping
> +flags.
> +Note that llvm-profdata and llvm-cov tools from devel/llvm are
> +required to process coverage data and produce reports.
> +.It
>  The
>  .Xr malloc 3 ,
>  .Xr calloc 3 ,

Isn't the purpose of the clang-local(1) to document local changes to the
system compiler, -fsanitize-minimal-runtime feels like a special case as
we do not have the complete sanitizer runtime.

-Bryan.



clang-local.1: document support for source-based code coverage

2022-05-04 Thread Frederic Cambus
Hi tech@,

The base system includes the compiler-rt profile library for
source-based code coverage.

So here is a diff to document support in clang-local.1, the same
way we document support for the ubsan_minimal sanitizer runtime
which is also part of compiler-rt.

Comments? OK?

Index: share/man/man1/clang-local.1
===
RCS file: /cvs/src/share/man/man1/clang-local.1,v
retrieving revision 1.23
diff -u -p -r1.23 clang-local.1
--- share/man/man1/clang-local.118 Feb 2022 00:39:18 -  1.23
+++ share/man/man1/clang-local.14 May 2022 11:03:11 -
@@ -99,6 +99,15 @@ See the documentation for the
 .Fl fsanitize-minimal-runtime
 flag.
 .It
+The base system includes the compiler-rt profile library for
+source-based code coverage. See the documentation for the
+.Fl fprofile-instr-generate
+and
+.Fl fcoverage-mapping
+flags.
+Note that llvm-profdata and llvm-cov tools from devel/llvm are
+required to process coverage data and produce reports.
+.It
 The
 .Xr malloc 3 ,
 .Xr calloc 3 ,