From 8ffb200153d1b1a8402c875c4961160efb149201 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 6 Nov 2019 11:23:12 +0100 Subject: Fix LTCG linker flags for macOS with separate debug info The linker must not throw away the lto.o file. We now instruct the linker to create a non-temporary lto.o, dependent on the target name. In order to do that we introduce a new mkspec variable QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO. This variable can contain single-$ variable references that get evaluated when loading ltcg.prf. Fixes: QTBUG-72846 Change-Id: I0ea882628d63e5406ba0ee68c7435af597364b0f Reviewed-by: Alexandru Croitor Reviewed-by: Edward Welbourne Reviewed-by: Kai Koehne --- mkspecs/features/ltcg.prf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mkspecs/features') diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf index a94f6d0eeb..5fa6309016 100644 --- a/mkspecs/features/ltcg.prf +++ b/mkspecs/features/ltcg.prf @@ -1,6 +1,12 @@ static:no-static-ltcg { # Static library but no-static-ltcg enabled: skip LTCG } else: CONFIG(release, debug|release) { + separate_debug_info { + # Evaluate single-$ variable references that have no valid value at mkspec loading time + QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO ~= s/\\$\\{/\$\$\{/ + eval(QMAKE_LFLAGS_LTCG += $$QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO) + } + # We need fat object files when creating static libraries on some platforms # so the linker will know to load a particular object from the library # in the first place. On others, we have special ar and nm to create the symbol -- cgit v1.2.3 From 2735c5bf069bcadefc2d6b626161e1166c2a683b Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 23 Oct 2019 07:48:04 +0200 Subject: Add support for passing qrc files to qmlimportscanner With the qrcFiles entry in the deployment JSON for Android, it can now pass this on to qmlimportscanner for scanning the qrc files for the available imports. This enables qmake to populate the qrc files it has referenced in the project, be it generated by qmake or added by the user. Task-number: QTBUG-55259 Change-Id: Ic512ce6f24508b3ea09ebdd07ac4446debfd9155 Reviewed-by: Joerg Bornemann --- mkspecs/features/android/android_deployment_settings.prf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mkspecs/features') diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf index 4d6101e297..e781eb024c 100644 --- a/mkspecs/features/android/android_deployment_settings.prf +++ b/mkspecs/features/android/android_deployment_settings.prf @@ -63,6 +63,22 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded { QML_ROOT_PATH = $$_PRO_FILE_PWD_ FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH)," FILE_CONTENT += " \"stdcpp-path\": $$emitString($$ANDROID_STDCPP_PATH)," + !isEmpty(RESOURCES) { + # Make sure that qmake generated qrc files are accounted for + load(resources_functions) + qtFlattenResources() + for(resource, RESOURCES) { + contains(resource, ".*\\qmake_qmake_immediate.qrc$") { + # They will be created for each architecture, since they could be different + # we need to account for all of them + for (arch, ANDROID_ABIS): \ + rescopy += $$absolute_path("qmake_qmake_immediate.qrc", $$OUT_PWD/$$arch) + } else { + contains(resource, ".*\\.qrc$"): rescopy += $$absolute_path($$resource, $$_PRO_FILE_PWD_) + } + } + FILE_CONTENT += " \"qrcFiles\": $$emitString($$join(rescopy, ","))," + } FILE_CONTENT += "" FILE_CONTENT += " \"application-binary\": $$emitString($$TARGET)" FILE_CONTENT += "}" -- cgit v1.2.3