guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building a library as both static and dynamic


From: Greg Hogan
Subject: Building a library as both static and dynamic
Date: Sun, 27 Sep 2020 07:57:19 -0400

Is there a best practice or example for building a library twice, both static 
and dynamic? I submitted patch #43620, and in working on another library have 
the same issue. These are cmake builds with a parameter declaration for either 
a static or dynamic build, not both. I would like to create a single package 
with both “out” and “static” outputs, which looks to be standard across Guix.

One idea is to run the configure / make / make install phases twice. 
modify-phases does not currently support copying phases (though add-after could 
work with the right function reference from cmake-build) and #:configure-flags 
would need to be set differently.

Another option would be to patch the source build files, but this problem feels 
solvable in Guix without duplicating the code from cmake-build’s configure.

Thanks,
Greg


reply via email to

[Prev in Thread] Current Thread [Next in Thread]