You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Improve efficiency of C library builds now that they are used only for testing.
This commit is contained in:
@@ -222,4 +222,27 @@ sub buildMakefile
|
||||
|
||||
push @EXPORT, qw(buildMakefile);
|
||||
|
||||
####################################################################################################################################
|
||||
# Update a Makefile with object compile rules
|
||||
####################################################################################################################################
|
||||
sub buildLoadLibC
|
||||
{
|
||||
# Load the module dynamically
|
||||
require pgBackRest::LibC;
|
||||
pgBackRest::LibC->import(qw(:debug));
|
||||
|
||||
# Load shared object
|
||||
require XSLoader;
|
||||
XSLoader::load('pgBackRest::LibC', '999');
|
||||
|
||||
# Do a basic test to make sure it installed correctly
|
||||
if (libcUvSize() != 8)
|
||||
{
|
||||
confess &log(ERROR, 'UVSIZE in test library does not equal 8');
|
||||
}
|
||||
}
|
||||
|
||||
push @EXPORT, qw(buildLoadLibC);
|
||||
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user