mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Add -ftree-coalesce-vars option to unit test compilation.
This is a workaround for inefficient handling of many setjmps in gcc >= 4.9. Setjmp is used in all error handling, but in the unit tests each test macro contains an error handling block so they add up pretty quickly for large unit tests. Enabling -ftree-coalesce-vars in affected versions reduces build time and memory requirements by nearly an order of magnitude. Even so, compiles are much slower than gcc <= 4.8. We submitted a bug for this at: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87316 Which was marked as a duplicate of: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63155
This commit is contained in:
parent
b5f749b21c
commit
e55d733041
@ -121,6 +121,10 @@
|
||||
<p>Make Valgrind return an error even when a non-fatal issue is detected. Update some minor issues discovered in the tests as a result.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Add <id>-ftree-coalesce-vars</id> option to unit test compilation.</p>
|
||||
</release-item>
|
||||
|
||||
<release-item>
|
||||
<p>Clear test directory between test runs.</p>
|
||||
</release-item>
|
||||
|
@ -400,6 +400,7 @@ sub run
|
||||
"\n" .
|
||||
"test.o: test.c\n" .
|
||||
"\t\$(CC) \$(CFLAGS) \$(TESTFLAGS) -O0" .
|
||||
($self->{oTest}->{&TEST_VM} ne VM_U12 ? ' -ftree-coalesce-vars' : '') .
|
||||
(vmCoverageC($self->{oTest}->{&TEST_VM}) && $self->{bCoverageUnit} ?
|
||||
' -fprofile-arcs -ftest-coverage' : '') .
|
||||
" -c test.c\n" .
|
||||
|
Loading…
Reference in New Issue
Block a user