Don't build nanos6 with debug symbols by default

This commit is contained in:
Rodrigo Arias 2023-09-15 19:05:55 +02:00
parent 3a4062ac04
commit fd766d8ff8

View File

@ -11,6 +11,7 @@
, papi , papi
, boost , boost
, ovni , ovni
, enableDebug ? false
, enableJemalloc ? true , enableJemalloc ? true
, jemalloc ? null , jemalloc ? null
, cachelineBytes ? 64 , cachelineBytes ? 64
@ -75,12 +76,17 @@ in
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++ (optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG"); (optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
postConfigure = lib.optionalString (!enableDebug) ''
# Disable debug
sed -i 's/\([a-zA-Z0-9_]*nanos6_debug[a-zA-Z0-9_]*\)\s*[+]\?=.*/\1 =/g' Makefile.am
'';
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We # The "bindnow" flags are incompatible with ifunc resolution mechanism. We
# disable all by default, which includes bindnow. # disable all by default, which includes bindnow.
hardeningDisable = [ "all" ]; hardeningDisable = [ "all" ];
# Keep debug symbols in the verbose variant of the library # Keep debug symbols in the debug variant of the library
dontStrip = true; dontStrip = enableDebug;
buildInputs = [ buildInputs = [
autoconf autoconf