Commit 55181670 authored by Michal Klocek's avatar Michal Klocek
Browse files

Add check for thumb instruction set


We currently require thumb instruction set on arm to build internal
ffmpeg.

Task-number: QTBUG-71772
Change-Id: I43ed152a51f0dea97b800c868eb13a4e5e8e077e
Reviewed-by: default avatarAllan Sandfeld Jensen <allan.jensen@qt.io>
Showing with 43 additions and 4 deletions
...@@ -294,3 +294,21 @@ defineTest(qtConfTest_isWindowsHostCompiler64) { ...@@ -294,3 +294,21 @@ defineTest(qtConfTest_isWindowsHostCompiler64) {
qtLog("Required 64-bit cross-building or native toolchain was not detected.") qtLog("Required 64-bit cross-building or native toolchain was not detected.")
return(false) return(false)
} }
# Fixme QTBUG-71772
defineTest(qtConfTest_hasThumbFlag) {
FLAG = $$extractCFlag("-mthumb")
!isEmpty(FLAG): return(true)
FLAG = $$extractCFlag("-marm")
!isEmpty(FLAG): return(false)
MARCH = $$extractCFlag("-march=.*")
MARMV = $$replace(MARCH, "armv",)
!isEmpty(MARMV) {
MARMV = $$split(MARMV,)
MARMV = $$member(MARMV, 0)
}
if (isEmpty(MARMV) | lessThan(MARMV, 7)): return(false)
# no flag assume mthumb
return(true)
}
...@@ -69,6 +69,7 @@ contains(QT_ARCH, "arm") { ...@@ -69,6 +69,7 @@ contains(QT_ARCH, "arm") {
gn_args += arm_version=$$MARMV gn_args += arm_version=$$MARMV
} }
# TODO: use neon detection from qtbase
!lessThan(MARMV, 8) { !lessThan(MARMV, 8) {
gn_args += arm_use_neon=true gn_args += arm_use_neon=true
} else { } else {
...@@ -83,10 +84,16 @@ contains(QT_ARCH, "arm") { ...@@ -83,10 +84,16 @@ contains(QT_ARCH, "arm") {
} }
} }
MTHUMB = $$extractCFlag("-mthumb") qtConfig(webengine-arm-thumb) {
MARM = $$extractCFlag("-marm") gn_args += arm_use_thumb=true # this adds -mthumb
if (isEmpty(MARMV) | lessThan(MARMV, 7) | !isEmpty(MARM)): gn_args += arm_use_thumb=false } else {
else: !isEmpty(MTHUMB): gn_args += arm_use_thumb=true gn_args += arm_use_thumb=false
!qtConfig(webengine-system-ffmpeg) {
# Fixme QTBUG-71772
gn_args += media_use_ffmpeg=false
gn_args += use_webaudio_ffmpeg=false
}
}
} }
contains(QT_ARCH, "mips") { contains(QT_ARCH, "mips") {
......
...@@ -328,6 +328,10 @@ ...@@ -328,6 +328,10 @@
"webengine-win-compiler64": { "webengine-win-compiler64": {
"label": "64bit compiler", "label": "64bit compiler",
"type": "isWindowsHostCompiler64" "type": "isWindowsHostCompiler64"
},
"webengine-arm-thumb" : {
"label": "thumb instruction set",
"type": "hasThumbFlag"
} }
}, },
...@@ -659,6 +663,11 @@ ...@@ -659,6 +663,11 @@
"label": "64bit compiler", "label": "64bit compiler",
"condition": "config.win32 && tests.webengine-win-compiler64", "condition": "config.win32 && tests.webengine-win-compiler64",
"output": [ "privateFeature" ] "output": [ "privateFeature" ]
},
"webengine-arm-thumb": {
"label": "Thumb instruction set",
"condition": "config.linux && features.webengine-embedded-build && arch.arm && tests.webengine-arm-thumb",
"output": [ "privateFeature" ]
} }
}, },
...@@ -697,6 +706,11 @@ ...@@ -697,6 +706,11 @@
"type": "warning", "type": "warning",
"condition": "config.win32 && !features.webengine-win-compiler64", "condition": "config.win32 && !features.webengine-win-compiler64",
"message": "64-bit cross-building or native toolchain is required to build QtWebEngine." "message": "64-bit cross-building or native toolchain is required to build QtWebEngine."
},
{
"type": "warning",
"condition": "config.linux && features.webengine-embedded-build && !features.webengine-system-ffmpeg && arch.arm && !features.webengine-arm-thumb",
"message": "Thumb instruction set is required to build ffmpeg for QtWebEngine."
} }
], ],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment