Skip to content
/ qtbase Public

Commit 73a97ee

Browse files
alcroitoQt Cherry-pick Bot
authored andcommitted
qmake: Fix android_16kb_pages check for qmake projects
The qtConfig() check in android.prf used an incorrect feature name with a QT_FEATURE_ prefix. This caused an error when configuring any qmake project for Android: Project ERROR: Could not find feature QT_FEATURE_android_16kb_pages. Fix the name of the feature in the qtConfig(). Even with the fixed name, the check would never succeed because we never exported the feature, so we didn't have a 'QT.core.enabled_features' entry for it in the qt_lib_core.pri file. To ensure we export the feature, mark the it as a CMake PRIVATE feature (so we don't touch the public qconfig.h header in a patch release), and then add a qt_feature_config() call to create an entry in the public QT_CONFIG variable as well as QT.core.enabled_features. Amends f174e2a Amends 48dcf5c Pick-to: 6.10 6.8 Fixes: QTBUG-144166 Change-Id: I96505798ad32f0d31175be7d064e15fca7ddd6c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit cfad21c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
1 parent 43d773a commit 73a97ee

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

configure.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,12 +1306,17 @@ qt_feature("coverage"
13061306
CONDITION QT_FEATURE_coverage_gcov
13071307
)
13081308

1309-
qt_feature("android_16kb_pages"
1309+
# Mark the feature as PRIVATE because we want it to be exported, but we don't want modifications
1310+
# in the public qconfig.h header in a patch release.
1311+
qt_feature("android_16kb_pages" PRIVATE
13101312
LABEL "Using 16KB page sizes in Android"
13111313
CONDITION ANDROID AND (((CMAKE_ANDROID_NDK_VERSION VERSION_GREATER_EQUAL "25.0.0"))
13121314
AND ((CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a") OR
13131315
(CMAKE_ANDROID_ARCH_ABI STREQUAL "x86_64")))
13141316
)
1317+
# The feature is saved into the public QT_CONFIG var in the qt_lib_core.pri file, to ensure it's
1318+
# available automatically for testing with qtConfig() in all user projects.
1319+
qt_feature_config("android_16kb_pages" QMAKE_PUBLIC_QT_CONFIG)
13151320

13161321
qt_configure_add_summary_build_type_and_config()
13171322
qt_configure_add_summary_section(NAME "Build options")

mkspecs/features/android/android.prf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ build_pass|if(single_android_abi:!single_arch) {
3636
else:TARGET = lib$${TARGET}_$${QT_ARCH}.so
3737
}
3838
QMAKE_LFLAGS += -Wl,-soname,$$shell_quote($$TARGET)
39-
qtConfig(QT_FEATURE_android_16kb_pages) {
39+
qtConfig(android_16kb_pages) {
4040
QMAKE_LFLAGS += -Wl,-z,max-page-size=16384
4141
}
4242
android_install {

0 commit comments

Comments
 (0)