aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-11-21 00:39:00 -0800
committerJake Petroules <jake.petroules@qt.io>2017-12-07 02:56:38 +0000
commit27c9b480769fd2447907cd6ab25f750ca79aa955 (patch)
treef8715713dffde0a1ec578f58bebfb3dbd0e482e6 /doc
parent2299a79c1ada2696807f40d54da958837ecffbba (diff)
Add the qbs.toolchainType property
[ChangeLog] Added the qbs.toolchainType property, which is a scalar version of the qbs.toolchain property and is used to set the current toolchain. Change-Id: I65b2ac44c0be0ea79fd0b1699f8f77c93def3437 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/items/language/profile.qdoc2
-rw-r--r--doc/reference/modules/qbs-module.qdoc30
2 files changed, 25 insertions, 7 deletions
diff --git a/doc/reference/items/language/profile.qdoc b/doc/reference/items/language/profile.qdoc
index b114eefab..127ca3029 100644
--- a/doc/reference/items/language/profile.qdoc
+++ b/doc/reference/items/language/profile.qdoc
@@ -47,7 +47,7 @@
// ...
Profile {
name: "my-special-profile"
- qbs.toolchain: ["gcc"]
+ qbs.toolchainType: "gcc"
qbs.targetPlatform: "linux"
qbs.architecture: "armv7a"
cpp.toolchainInstallPath: "/opt/special-gcc/bin"
diff --git a/doc/reference/modules/qbs-module.qdoc b/doc/reference/modules/qbs-module.qdoc
index 7f73c5f1f..a0069bea2 100644
--- a/doc/reference/modules/qbs-module.qdoc
+++ b/doc/reference/modules/qbs-module.qdoc
@@ -126,12 +126,22 @@
This is typically set in a profile.
Commonly used values are: \c{"x86"}, \c{"x86_64"} and \c{"arm"}.
\row
- \li toolchain
- \li \c{stringList}
- \li 1.0
- \li \c{undefined}
- \li Specifies the attributes of the toolchain that is going to be used for this build.
- Typical values include: \c{"gcc"}, \c{"llvm"}, \c{"clang"}, \c{"mingw"}, \c{"msvc"}
+ \li toolchainType
+ \li \c{string}
+ \li 1.11
+ \li determined automatically
+ \li Specifies the toolchain that is going to be used for this build.
+ You should generally treat this property as \e{write-only}
+ and avoid using it to test for the current toolchain. Instead, use the
+ \c toolchain property for conditionals. For example, instead of:
+ \c{(qbs.toolchainType === "xcode" || qbs.toolchainType === "clang" ||
+ qbs.toolchainType === "gcc")},
+ use \c{qbs.toolchain.contains("gcc")}. However, there are some cases when using
+ toolchainType would be acceptable, such as when the resulting condition would be
+ simpler while still being correct: \c{(qbs.toolchainType === "gcc")} versus
+ \c{(qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("clang"))}.
+ Typical values include:
+ \c{"gcc"}, \c{"clang"}, \c{"mingw"}, \c{"msvc"}, \c{"xcode"}
\row
\li sysroot
\li \c{string}
@@ -246,6 +256,14 @@
\c{"bsd"}, \c{"darwin"}, and \c{"unix"}, in
addition to the possible values of \c targetPlatform.
\row
+ \li toolchain
+ \li \c{stringList}
+ \li 1.0
+ \li \c{undefined}
+ \li Specifies the attributes of the toolchain that is going to be used for this build.
+ Typical values include: \c{"llvm"} in addition to the possible values of
+ \c{toolchainType}.
+ \row
\li version
\li \c{string} (read only)
\li 1.4.1