aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-03-03 18:09:04 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-03-06 13:57:59 +0000
commitf4ba1c69e2e06e7bb443b1a6fbd30833d2fcdc24 (patch)
tree19acfe5f35cbb82abe320b2bf582ff4159c055ca /doc
parent9b6a89e33a3f2d6f7ab68f739f5ffd4062402774 (diff)
doc: add How-To section about separating debug info
Change-Id: I8ae6f90da242b47ecbae7f9aeb11cebdf227ca73 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/howtos.qdoc59
-rw-r--r--doc/reference/modules/cpp-module.qdoc2
2 files changed, 61 insertions, 0 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index b63e2ca96..9512cb0a9 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -37,6 +37,7 @@
\list
\li \l{How do I build a Qt-based project?}
\li \l{How do I make my app build against my library?}
+ \li \l{How do I separate and install debugging symbols?}
\li \l{How do I use precompiled headers?}
\li \l{How do I make sure my generated sources are getting compiled?}
\li \l{How do I run my autotests?}
@@ -129,6 +130,64 @@
}
\endcode
+ \section1 How do I separate and install debugging symbols?
+
+ First, you need to set the \l{cpp::debugInformation}{cpp.debugInformation} and
+ \l{cpp::separateDebugInformation}{cpp.separateDebugInformation}
+ properties to \c true or use some conditional expression in your product:
+ \code
+ CppApplication {
+ // ...
+ cpp.debugInformation: qbs.buildVariant !== "release"
+ cpp.separateDebugInformation: true
+ }
+ \endcode
+
+ If the \l{cpp::separateDebugInformation}{cpp.separateDebugInformation} property is set to
+ \c true, \QBS will create debugging symbols with the corresponding file tags
+ \c "debuginfo_app" (for an application), \c "debuginfo_dll" (for a dynamic library),
+ or \c "debuginfo_loadablemodule" (for a macOS plugin).
+
+ Now, you can install your application and its debugging symbols as follows:
+ \code
+ CppApplication {
+ // ...
+ Group {
+ fileTagsFilter: cpp.separateDebugInformation ? ["debuginfo_app"] : []
+ qbs.install: true
+ qbs.installDir: "bin"
+ qbs.installSourceBase: buildDirectory
+ }
+ }
+ \endcode
+
+ If you're building a shared library, you need to use the \c "debuginfo_dll" tag instead:
+ \code
+ DynamicLibrary {
+ // ...
+ Group {
+ fileTagsFilter: cpp.separateDebugInformation ? ["debuginfo_dll"] : []
+ qbs.install: true
+ qbs.installDir: "lib"
+ qbs.installSourceBase: buildDirectory
+ }
+ }
+ \endcode
+
+ If you're building a macOS plugin, you need to use the \c "debuginfo_loadablemodule"
+ tag instead:
+ \code
+ LoadableModule {
+ // ...
+ Group {
+ fileTagsFilter: cpp.separateDebugInformation ? ["debuginfo_loadablemodule"] : []
+ qbs.install: true
+ qbs.installDir: "PlugIns"
+ qbs.installSourceBase: buildDirectory
+ }
+ }
+ \endcode
+
\section1 How do I use precompiled headers?
If you use a \l Group item to add a precompiled header file to a product
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc
index 72a934847..2fc592d4e 100644
--- a/doc/reference/modules/cpp-module.qdoc
+++ b/doc/reference/modules/cpp-module.qdoc
@@ -390,6 +390,8 @@
\defaultvalue \c{true} for MSVC and with GCC or Clang on Apple platforms,
otherwise \c{false}.
+
+ \sa debugInformation, {How do I separate and install debugging symbols?}
*/
/*!