qttools: Add option to disable qdoc

qdoc needs clang on build host, therefore add an option so it can
disabled when clang is not part of build system, it can also peek into
build host and if there is a version of clang installed it will
configure for it but then conflict with gcc during compilation

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2019-12-14 18:43:34 -08:00
parent a02e01ca68
commit 710d995b54
2 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
From 623675e07231f62cdc7600dca5897a9fc70e0467 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 14 Dec 2019 18:36:49 -0800
Subject: [PATCH] src.pro: Add option noqdoc to disable qdoc builds
it needs clang on host, so lets separate it out
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/src.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/src.pro b/src/src.pro
index 5c256ea3..196c34c7 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -25,7 +25,7 @@ qtConfig(library) {
include($$OUT_PWD/qdoc/qtqdoc-config.pri)
QT_FOR_CONFIG += qdoc-private
-qtConfig(qdoc): qtConfig(thread): SUBDIRS += qdoc
+qtConfig(qdoc): qtConfig(thread):!contains(CONFIG, noqdoc): SUBDIRS += qdoc
!android|android_app: SUBDIRS += qtpaths
--
2.24.1

View File

@@ -18,6 +18,7 @@ DEPENDS += "qtbase qtdeclarative qtxmlpatterns"
SRC_URI += " \
file://0001-add-noqtwebkit-configuration.patch \
file://0002-linguist-tools-cmake-allow-overriding-the-location-f.patch \
file://0003-src.pro-Add-option-noqdoc-to-disable-qdoc-builds.patch \
"
FILES_${PN}-tools += "${datadir}${QT_DIR_NAME}/phrasebooks"
@@ -34,9 +35,14 @@ COMPATIBLE_HOST_toolchain-clang_riscv64 = "null"
export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_BINDIR}/llvm-config"
TOOLSTOBUILD += "linguist/lconvert linguist/lrelease linguist/lupdate pixeltool qtdiag qtpaths qtplugininfo"
TOOLSTOBUILD += "${@bb.utils.contains('PACKAGECONFIG', 'clang', 'qdoc', '', d)}"
TOOLSFORTARGET = "pixeltool qtdiag qtpaths qtplugininfo"
TOOLSFORHOST = "linguist ${@bb.utils.contains('PACKAGECONFIG', 'clang', 'qdoc', '', d)}"
EXTRA_QMAKEVARS_PRE += " \
${@bb.utils.contains('PACKAGECONFIG', 'qtwebkit', '', 'CONFIG+=noqtwebkit', d)} \
CONFIG+=disable_external_rpath \
${@bb.utils.contains('PACKAGECONFIG', 'clang', 'CONFIG+=disable_external_rpath', 'CONFIG+=noqdoc', d)} \
"
EXTRA_QMAKEVARS_PRE_append_class-native = " CONFIG+=config_clang_done CONFIG-=config_clang"
EXTRA_QMAKEVARS_PRE_append_class-nativesdk = " CONFIG+=config_clang_done CONFIG-=config_clang"