aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/module-providers
diff options
context:
space:
mode:
authorRaphaël Cotty <raphael.cotty@gmail.com>2020-12-07 13:57:40 +0100
committerRaphaël Cotty <raphael.cotty@gmail.com>2020-12-08 12:55:15 +0000
commit9025c2e130d9a662354b6722c6b34fd964c5bc2b (patch)
treef74888fd052484f05b6ce9c715b95a43f3c8c59e /share/qbs/module-providers
parentbcc64746008826e00b3ceaba761449f01a500b2d (diff)
Android: Fix debugging support
Add archSuffix to generate the library with the architecture name for Qt > 5.14 (before the lib was renamed which prevented debugging). Remove rpaths as they are not used on android and generate warnings. Update target and defines to comply with android's Build System Maintainers Guide. Remove stripping step in Qt.android_support as androiddeployqt actually does the stripping. Change-Id: I46a273c1cded753223c7b759670477815b625267 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/module-providers')
-rw-r--r--share/qbs/module-providers/Qt/templates/android_support.qbs34
-rw-r--r--share/qbs/module-providers/Qt/templates/core.qbs3
2 files changed, 6 insertions, 31 deletions
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs
index bdbb0e43b..3790037f3 100644
--- a/share/qbs/module-providers/Qt/templates/android_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/android_support.qbs
@@ -68,7 +68,6 @@ Module {
}
Properties {
condition: _enableSdkSupport
- Android.sdk._archInName: _multiAbi
Android.sdk._bundledInAssets: _multiAbi
}
Properties {
@@ -79,6 +78,7 @@ Module {
condition: _enableSdkSupport && Utilities.versionCompare(version, "6.0") >= 0
Android.sdk.minimumVersion: "23"
}
+ cpp.archSuffix: _multiAbi ? "_" + Android.ndk.abi : ""
Rule {
condition: _enableSdkSupport
@@ -324,10 +324,8 @@ Module {
var input = inputs["android.nativelibrary"][i];
File.copy(input.filePath,
FileInfo.joinPaths(product.Qt.android_support._deployQtOutDir,
- "libs",
- input.Android.ndk.abi,
- input.baseName + "_" + input.Android.ndk.abi +
- ".so"));
+ "libs", input.Android.ndk.abi,
+ input.fileName));
}
}
};
@@ -396,31 +394,7 @@ Module {
File.remove(oldLibs[i]);
}
};
-
- // androiddeployqt doesn't strip the deployed libraries anymore so it has to done here
- var stripLibsCmd = new JavaScriptCommand();
- stripLibsCmd.description = "Stripping unneeded symbols from deployed qt libraries";
- stripLibsCmd.sourceCode = function() {
- var stripArgs = ["--strip-all"];
- var architectures = [];
- for (var i in inputs["android.nativelibrary"])
- architectures.push(inputs["android.nativelibrary"][i].Android.ndk.abi);
- for (var i in architectures) {
- var abiDirPath = FileInfo.joinPaths(product.Android.sdk.packageContentsDir,
- "lib", architectures[i]);
- var files = File.directoryEntries(abiDirPath, File.Files);
- for (var i = 0; i < files.length; ++i) {
- var filePath = FileInfo.joinPaths(abiDirPath, files[i]);
- if (FileInfo.suffix(filePath) == "so") {
- stripArgs.push(filePath);
- }
- }
- }
- var process = new Process();
- process.exec(product.cpp.stripPath, stripArgs, false);
- }
-
- return [copyCmd, androidDeployQtCmd, moveCmd, stripLibsCmd];
+ return [copyCmd, androidDeployQtCmd, moveCmd];
}
}
diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs
index 691e4b50c..8f0b0e2df 100644
--- a/share/qbs/module-providers/Qt/templates/core.qbs
+++ b/share/qbs/module-providers/Qt/templates/core.qbs
@@ -190,7 +190,8 @@ Module {
return undefined;
return frameworks;
}
- cpp.rpaths: qbs.targetOS.contains('linux') ? [libPath] : undefined
+ cpp.rpaths: qbs.targetOS.contains('linux') && !qbs.targetOS.contains("android") ? [libPath] :
+ undefined
cpp.runtimeLibrary: qbs.toolchain.contains("msvc")
? config.contains("static_runtime") ? "static" : "dynamic"
: original