SHA256
1
0
forked from pool/openexr
Petr Gajdos 2018-11-06 12:36:12 +00:00 committed by Git OBS Bridge
parent 810a498b42
commit 86e367887f

View File

@ -138,15 +138,16 @@ export CXXFLAGS="%{optflags} -O0"
--enable-imffuzztest \ --enable-imffuzztest \
--enable-imfhugetest --enable-imfhugetest
%if %{asan_build} %if %{asan_build}
for i in $(find -name Makefile | grep -v 'IlmImf/Makefile'); do vmemlimit=$(ulimit -v)
if [ $vmemlimit != unlimited ]; then
echo "ulimit -v has to be unlimited (currently $vmemlimit) to run ASAN build"
exit 1
fi
for i in $(find -name Makefile); do
sed -i -e 's/\(^CXXFLAGS.*\)/\1 -fsanitize=address/' \ sed -i -e 's/\(^CXXFLAGS.*\)/\1 -fsanitize=address/' \
-e 's/\(^LIBS =.*\)/\1 -lasan/' \ -e 's/\(^LIBS =.*\)/\1 -lasan/' \
$i $i
done done
# IlmImf/Makefile requires special handling: IlmImf/b44ExpLogTable and IlmImf/eLut
# helpers will run during build; but asan is not compatible with ulimit -v limitation
sed -i -e 's/\($(AM_V_CXX)$(LTCXXCOMPILE)\)/\1 -fsanitize=address/' IlmImf/Makefile
sed -i -e 's/\(^libIlmImf_la_LIBADD.*\)/\1 -lasan/' IlmImf/Makefile
%endif %endif
make %{?_smp_mflags} make %{?_smp_mflags}