]> git.pld-linux.org Git - packages/llvm.git/commitdiff
test whether linker supports --reduce-memory-overheads before enabling it
authorJan Palus <atler@pld-linux.org>
Sat, 15 Oct 2022 22:16:07 +0000 (00:16 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 15 Oct 2022 22:16:07 +0000 (00:16 +0200)
llvm.spec

index 92e15725c9eaeb2dd5d48dd1f71e6462e65c5111..c0aef8bfee7a46a26762801f91c77aada22295f5 100644 (file)
--- a/llvm.spec
+++ b/llvm.spec
@@ -735,7 +735,9 @@ CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
 %if %{with lowmem}
 export CFLAGS="%{rpmcflags} -g0"
 export CXXFLAGS="%{rpmcxxflags} -g0"
+if echo 'int main(){}' | %{__cc} -x c %{rpmldflags} -Wl,--reduce-memory-overheads -o /dev/null - > /dev/null 2>&1; then
 export LDFLAGS="%{rpmldflags} -Wl,--reduce-memory-overheads"
+fi
 %endif
 
 %cmake .. \
This page took 0.07892 seconds and 4 git commands to generate.