aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-09-21 16:13:57 +0300
committerIvan Komissarov <abbapoh@gmail.com>2021-09-21 16:13:57 +0300
commit8dae282f66706c5dc3865140b25fbcc5c816d635 (patch)
treea259f544c85ce18eefd5a5a4f40584efb23ddc01
parentfcd82d6f2c0c1cd780ca18ec2f7c8e3d5a70f814 (diff)
parent27bd9ac836b5cd2937b8d19dfa32cb4ff617b73c (diff)
Merge branch '1.20' into master
-rw-r--r--cmake/QbsDocumentation.cmake10
-rw-r--r--doc/reference/modules/android-sdk-module.qdoc15
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js35
-rw-r--r--share/qbs/modules/Android/sdk/utils.js3
-rw-r--r--share/qbs/modules/cpp/gcc.js28
-rw-r--r--src/lib/corelib/tools/filetime.h7
-rw-r--r--tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs3
7 files changed, 77 insertions, 24 deletions
diff --git a/cmake/QbsDocumentation.cmake b/cmake/QbsDocumentation.cmake
index 99b0e21a8..a8ef1bb97 100644
--- a/cmake/QbsDocumentation.cmake
+++ b/cmake/QbsDocumentation.cmake
@@ -158,11 +158,13 @@ function(_qbs_setup_qdoc_targets _qdocconf_file _retval)
if (NOT Python3_Interpreter_FOUND)
message(WARNING "Cannot find python3 binary. Qbs documentation will not be built.")
+ return()
endif()
_find_python_module(lxml)
_find_python_module(bs4)
if (NOT PY_LXML OR NOT PY_BS4)
- message(FATAL_ERROR "Cannot import lxml and bs4 python modules. Qbs documentation will not be built.")
+ message(WARNING "Cannot import lxml and bs4 python modules. Qbs documentation will not be built.")
+ return()
endif()
set(_fixed_html_artifact "${CMAKE_CURRENT_BINARY_DIR}/qbsdoc.dummy")
@@ -199,6 +201,11 @@ function(_qbs_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir)
return()
endif()
+ set(_html_target "qbs_html_docs_${_target}")
+ if (NOT TARGET ${_html_target})
+ return()
+ endif()
+
get_filename_component(_target "${_qdocconf_file}" NAME_WE)
set(_qch_outputdir "${_arg_QCH_DIR}")
@@ -216,7 +223,6 @@ function(_qbs_setup_qhelpgenerator_targets _qdocconf_file _html_outputdir)
VERBATIM
)
- set(_html_target "qbs_html_docs_${_target}")
set(_qch_target "qbs_qch_docs_${_target}")
add_custom_target("${_qch_target}" DEPENDS "${_qch_artifact}")
add_dependencies(qbs_qch_docs "${_qch_target}")
diff --git a/doc/reference/modules/android-sdk-module.qdoc b/doc/reference/modules/android-sdk-module.qdoc
index 76a10f69e..ce27b6302 100644
--- a/doc/reference/modules/android-sdk-module.qdoc
+++ b/doc/reference/modules/android-sdk-module.qdoc
@@ -235,14 +235,16 @@
/*!
\qmlproperty string Android.sdk::aaptName
+ \since Qbs 1.17
Name of the aapt binary. Allowed options: "aapt" and "aapt2".
- \defaultvalue \c "aapt"
+ \defaultvalue \c "aapt2"
*/
/*!
\qmlproperty string Android.sdk::packageType
+ \since Qbs 1.17
Type of the package. Allowed options: "apk" and "aab".
Type "apk" generates a runnable package whereas "aab" generates a package for Google Play.
@@ -251,7 +253,17 @@
*/
/*!
+ \qmlproperty string Android.sdk::dexCompilerName
+ \since Qbs 1.20
+
+ Name of the dex compiler binary. Allowed options: "dx" and "d8".
+
+ \defaultvalue \c "d8"
+*/
+
+/*!
\qmlproperty string Android.sdk::minimumVersion
+ \since Qbs 1.17
Minimum API Level required for the application to run.
@@ -260,6 +272,7 @@
/*!
\qmlproperty string Android.sdk::targetVersion
+ \since Qbs 1.17
API Level that the application targets.
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index b1239a78a..422863b95 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -53,24 +53,29 @@ function getQmakeFilePaths(qmakeFilePaths, qbs) {
if (qmakeFilePaths && qmakeFilePaths.length > 0)
return qmakeFilePaths;
console.info("Detecting Qt installations...");
- var pathValue = Environment.getEnv("PATH");
- if (!pathValue)
- return [];
- var dirs = splitNonEmpty(pathValue, qbs.pathListSeparator);
- var suffix = exeSuffix(qbs);
var filePaths = [];
- for (var i = 0; i < dirs.length; ++i) {
- var candidate = FileInfo.joinPaths(dirs[i], "qmake" + suffix);
- var canonicalCandidate = FileInfo.canonicalPath(candidate);
- if (!canonicalCandidate || !File.exists(canonicalCandidate))
- continue;
- if (FileInfo.completeBaseName(canonicalCandidate) !== "qtchooser")
- candidate = canonicalCandidate;
- if (!filePaths.contains(candidate)) {
- console.info("Found Qt at '" + toNative(candidate) + "'.");
- filePaths.push(candidate);
+ var pathValue = Environment.getEnv("PATH");
+ if (pathValue) {
+ var dirs = splitNonEmpty(pathValue, qbs.pathListSeparator);
+ var suffix = exeSuffix(qbs);
+ for (var i = 0; i < dirs.length; ++i) {
+ var candidate = FileInfo.joinPaths(dirs[i], "qmake" + suffix);
+ var canonicalCandidate = FileInfo.canonicalPath(candidate);
+ if (!canonicalCandidate || !File.exists(canonicalCandidate))
+ continue;
+ if (FileInfo.completeBaseName(canonicalCandidate) !== "qtchooser")
+ candidate = canonicalCandidate;
+ if (!filePaths.contains(candidate)) {
+ console.info("Found Qt at '" + toNative(candidate) + "'.");
+ filePaths.push(candidate);
+ }
}
}
+ if (filePaths.length === 0) {
+ console.warn("Could not find any qmake executables in PATH. Either make sure a qmake "
+ + "executable is present in PATH or set the moduleProviders.Qt.qmakeFilePaths property "
+ + "to point a qmake executable.");
+ }
return filePaths;
}
diff --git a/share/qbs/modules/Android/sdk/utils.js b/share/qbs/modules/Android/sdk/utils.js
index a10ca69fc..36a88ddbb 100644
--- a/share/qbs/modules/Android/sdk/utils.js
+++ b/share/qbs/modules/Android/sdk/utils.js
@@ -393,7 +393,8 @@ function prepareBundletoolPackage(project, product, inputs, outputs, input, outp
args.push("--modules=" + baseFilePath);
args.push("--output=" + aabFilePath);
var cmd = new Command(product.java.interpreterFilePath, args);
- cmd.description = "generating " + aabFilePath.fileName;
+ var aabFileName = outputs["android.package_unsigned"][0].fileName;
+ cmd.description = "generating " + aabFileName;
cmds.push(cmd);
return cmds;
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index f7581d09b..13cdb4a3d 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -954,7 +954,7 @@ function prepareAssembler(project, product, inputs, outputs, input, output) {
args = args.concat(Cpp.collectMiscAssemblerArguments(input, "asm"));
args = args.concat(Cpp.collectIncludePathsArguments(input));
- args = args.concat(Cpp.collectSystemIncludePathsArguments(input));
+ args = args.concat(Cpp.collectSystemIncludePathsArguments(input, input.cpp.includeFlag));
args.push("-o", output.filePath);
args.push(input.filePath);
@@ -1481,6 +1481,28 @@ function dumpDefaultPaths(env, compilerFilePath, args, nullDevice, pathListSepar
}
}
+function targetLinkerFlags(targetArch, targetOS) {
+ var linkerFlags = {
+ "windows": {
+ "i386": "i386pe",
+ "x86_64": "i386pep",
+ },
+ "freebsd": {
+ "i386": "elf_i386_fbsd",
+ "x86_64": "elf_x86_64_fbsd",
+ },
+ "other": {
+ "i386": "elf_i386",
+ "x86_64": "elf_x86_64",
+ }
+ };
+ if (targetOS.contains("windows"))
+ return linkerFlags["windows"][targetArch];
+ else if (targetOS.contains("freebsd"))
+ return linkerFlags["freebsd"][targetArch];
+ return linkerFlags["other"][targetArch];
+}
+
function targetFlags(tool, hasTargetOption, target, targetArch, machineType, targetOS) {
var args = [];
if (hasTargetOption) {
@@ -1493,8 +1515,8 @@ function targetFlags(tool, hasTargetOption, target, targetArch, machineType, tar
"x86_64": ["-m64"],
},
"linker": {
- "i386": ["-m", targetOS.contains("windows") ? "i386pe" : "elf_i386"],
- "x86_64": ["-m", targetOS.contains("windows") ? "i386pep" : "elf_x86_64"],
+ "i386": ["-m", targetLinkerFlags("i386", targetOS)],
+ "x86_64": ["-m", targetLinkerFlags("x86_64", targetOS)],
},
"assembler": {
"i386": ["--32"],
diff --git a/src/lib/corelib/tools/filetime.h b/src/lib/corelib/tools/filetime.h
index f9a15f794..70f4f4461 100644
--- a/src/lib/corelib/tools/filetime.h
+++ b/src/lib/corelib/tools/filetime.h
@@ -47,7 +47,12 @@
#if defined(Q_OS_UNIX) && !defined(__APPLE__)
#include <time.h>
-#define HAS_CLOCK_GETTIME (_POSIX_C_SOURCE >= 199309L)
+# if defined(Q_OS_FREEBSD)
+// FreeBSD 9.0 and above supports m_tim
+# define HAS_CLOCK_GETTIME (__FreeBSD_version >= 900000)
+# else
+# define HAS_CLOCK_GETTIME (_POSIX_C_SOURCE >= 199309L)
+# endif
#endif // Q_OS_UNIX
#ifdef __APPLE__
diff --git a/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs b/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs
index 4ffb8d0e2..a6b97bad2 100644
--- a/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs
+++ b/tests/auto/blackbox/testdata/remove-duplicate-libs/remove-duplicate-libs.qbs
@@ -4,8 +4,9 @@ Project {
property bool removeDuplicates
property string libDir: buildDirectory + "/lib"
property bool dummy: {
+ // most BSD systems (including macOS) use LLVM linker now
console.info("is bfd linker: "
- + (qbs.toolchain.contains("gcc") && !qbs.hostOS.contains("macos")))
+ + (qbs.toolchain.contains("gcc") && !qbs.hostOS.contains("bsd")))
}
qbsSearchPaths: "."