diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-11 20:26:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-12 06:09:49 +0200 |
commit | a42eefab8629c998ec0f1351075888b95b039ec1 (patch) | |
tree | acec91db57a20ef2606df20a0928f6ea5ce680e7 /config_host.mk.in | |
parent | 986bd8b93b35ad7f2760dfe0576860532daa0e42 (diff) |
Enable --enable-lto --enable-skia when building with GCC+Clang on Linux
...where all the Library_skia objects are built with Clang, so contain
intermediate LLVM bytecode, but were then linked via GCC and ld or gold, which
do not understand such object files and thus failed. So in
gb_LinkTarget__command_dynamiclink use T_CC/T_CXX also for the linker command
line. But then Clang would still be used for linking with the
-fuse-ld=(ld or gold)
$(USE_LD) suitable for GCC, and would still fail. So break T_USE_LD out of
T_LDFLAGS and let gb_LinkTarget_use_clang override T_USE_LD with CLANG_USE_LD.
At least for now, that CLANG_USE_LD (containing something like
-fuse-ld=lld
or
-fuse-ld=lld --ld-path=...
for the latter see d668c9a04d04d256fcbbd2165fe226f1db88256b "Adapt --enable-ld
to Clang 12 trunk --ld-path") needs to manually be passed into autogen.sh, it is
not computed in configure.ac.
Then building Library_skia would still fail to link against
StaticLibrary_libpng, as that only contains intermediate GCC object code, so
make sure to build it with -ffat-lto-objects in this specific case.
Change-Id: I0a104e53a8898cd9c2eb3b643e21954e853608cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100556
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'config_host.mk.in')
-rw-r--r-- | config_host.mk.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config_host.mk.in b/config_host.mk.in index 00288ccb6968..d62afe8e796f 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -76,6 +76,7 @@ export CLANG_CXXFLAGS_INTRINSICS_AVX=@CLANG_CXXFLAGS_INTRINSICS_AVX@ export CLANG_CXXFLAGS_INTRINSICS_AVX2=@CLANG_CXXFLAGS_INTRINSICS_AVX2@ export CLANG_CXXFLAGS_INTRINSICS_F16C=@CLANG_CXXFLAGS_INTRINSICS_F16C@ export CLANG_CXXFLAGS_INTRINSICS_FMA=@CLANG_CXXFLAGS_INTRINSICS_FMA@ +export CLANG_USE_LD=@CLANG_USE_LD@ export CLANGDIR=@CLANGDIR@ export CLANGLIBDIR=@CLANGLIBDIR@ export CLANGSYSINCLUDE=@CLANGSYSINCLUDE@ |