diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-07-18 18:05:10 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-07-22 22:40:12 +0000 |
commit | 0200426f9f974188e8c548bb9bf05b4825362ed8 (patch) | |
tree | 7a57b42f663a6cdb7238f4f6210ae6d7f107af5c /doc | |
parent | 65cb4cba999b47a643e820a102b3185f861b97c1 (diff) |
Introduce cpp.linkerMode
This property allows qbs to automatically select an appropriate linker
based on the objects being linked. The new behavior is to automatically
use the C++ compiler driver for linking if any of the objects being
linked were compiled from C++ or Objective-C++ sources, otherwise the C
compiler driver if any of the objects being linked were compiled from C
or Objective-C sources, otherwise the system linker. To retain the old
behavior, cpp.linkerName can be set to cpp.cxxCompilerName, and
cpp.linkerMode to "manual". Qbs will also avoid passing the -stdlib
option or linking c++abi on Linux unless any of the objects being linked
were compiled from C++ or Objective-C++ sources.
As a result the default behavior for building a pure C application or
pure ASM application with Qbs is to NOT link to the C++ standard library
or any other supporting C++ libraries.
[ChangeLog] Introduced cpp.linkerMode property to allow selection of the
correct linker (C driver, C++ driver, or system linker) based on the
objects being linked
Change-Id: Ic16e31a3072c9e296c348783a21717902c15bff6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/modules/cpp-module.qdoc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index e71269b6c..330fc3455 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -496,6 +496,17 @@ example because dependent products are linked with an option such as \c "--no-undefined", then this property can be set to \c "strict". \row + \li linkerMode + \li \c{string} + \li 1.6 + \li "automatic" + \li Controls whether to automatically use an appropriate compiler frontend in place of the + system linker when linking binaries. The default is \c{"automatic"}, which chooses + either the C++ compiler, C compiler, or system linker specified by the \c{linkerName} + and \c{linkerPath} properties, depending on the type of object files present on the + linker command line. \c{"manual"} allows you to explicitly specify the linker using the + \c{linkerName} and \c{linkerPath} properties. + \row \li nmName \li \c{string} \li 1.2 |