libvirt/build-aux
Daniel P. Berrange e4b980c853 Prevent more compiler optimization of mockable functions
Currently all mockable functions are annotated with the 'noinline'
attribute. This is insufficient to guarantee that a function can
be reliably mocked with an LD_PRELOAD. The C language spec allows
the compiler to assume there is only a single implementation of
each function. It can thus do things like propagating constant
return values into the caller at compile time, or creating
multiple specialized copies of the function body each optimized
for a different caller. To prevent these optimizations we must
also set the 'noclone' and 'weak' attributes.

This fixes the test suite when libvirt.so is built with CLang
with optimization enabled.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-11 13:57:12 +01:00
..
augeas-gentest.pl maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
check-spacing.pl check-spacing: fix error message 2016-06-15 16:05:08 +02:00
mock-noinline.pl Prevent more compiler optimization of mockable functions 2017-07-11 13:57:12 +01:00
prohibit-duplicate-header.pl prohibit-duplicate-header: print file name and line 2016-06-23 12:48:40 +02:00