clang-8: error: unknown argument: '-flto-partition=none' when building lxml

Stephan Bergmann sbergman at redhat.com
Mon Aug 27 08:15:56 UTC 2018


On 24/08/18 20:02, Luke Benes wrote:
> When I build with clang/linux I'm now seeing the following error:
> 
> Building lxml version 4.1.1.
> Building without Cython.
> Using build configuration of libxslt 1.1.32
> Building against libxml2/libxslt in the following directory: /usr/lib
> ...
> clang -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
> -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt 
> -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none 
> -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt 
> -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt 
> -fPIC -DCYTHON_CLINE_IN_TRACEBACK=1 -I/usr/include/libxml2 -Isrc 
> -Isrc/lxml/includes -I/usr/include/python3.7m -c src/lxml/etree.c -o 
> build/temp.linux-x86_64-3.7/src/lxml/etree.o -w
> clang-8: error: unknown argument: '-flto-partition=none'

external/lxml/ExternalProject_lxml.mk is somewhat special in that it (by 
accident?) uses $$CFLAGS (i.e., whathever the CFLAGS env var is set to 
in the shell run by `make`) instead of $(CFLAGS) (i.e., what configure 
determined and potentially stored in config_host.mk; the value typically 
used in other external/*/ExternalProject_*.mk).  Maybe that is the 
source of your "-flto -fuse-linker-plugin -ffat-lto-objects 
-flto-partition=none" arguments?


More information about the LibreOffice mailing list