Clang does not support `-flto-partition=none`
$ ./autogen.sh
$ CC=clang ./configure
$ make
...
make all-am
make[2]: Entering directory '/build/source/libraries/libapparmor/src'
libtool: compile: x86_64-unknown-linux-gnu-clang ... -flto-partition=none -g -O2 -c grammar.c -fPIC -DPIC -o .libs/grammar.o
clang-11: error: unknown argument: '-flto-partition=none'
The flag -flto-partition=none
is defined at libraries/libapparmor/src/Makefile.am:48
. Is there a way to detect if the compiler supports this flag before applying it in Makefile.am
?
Edited by Sam Grayson