[petsc-dev] using visibility by default?

Jed Brown jed at jedbrown.org
Thu Mar 3 03:25:19 CST 2016


Barry Smith <bsmith at mcs.anl.gov> writes:

>   Jed,
>
>   Any reason we should not turn on --with-visibility by default when it works? 

I would like it turned on.  One "downside" is that users can't simply
include a private header to hack something using private functions --
those symbols are actually private.  (Of course you can still access the
structs.)

I have a PETSC_ARCH that uses visibility, so at least one of us has been
testing it.

>   def checkVisibility(self):
>     if self.argDB['with-visibility']:
>       if not self.checkCompile('','__attribute__((visibility ("default"))) int foo(void);'):
>         raise RuntimeError('Cannot use visibility attributes')
>       self.addDefine('USE_VISIBILITY',1)
>
> Currently we don't seem to use it hence to what end?
>
>   Barry
>
>
> I came across this because I noticed we currently had a huge amount of private symbols exposed for no apparent reason except lack of testing/use.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160303/4041b7e9/attachment.sig>


More information about the petsc-dev mailing list