Commit Graph

81 Commits

Author SHA1 Message Date
Denis Shienkov
a4b9d57824 bare-metal: Add support for KEIL toolchain
This patch adds support for the toolchains, provided by
KEIL:

 * http://www.keil.com/c51/
 * http://www2.keil.com/mdk5/

Now QtC's compiler page have additional 'KEIL' selector
which allows to user to choose a desired C/C++ compiler
from set of the KEIL toolchains.

In this case the QtC will tries to detect the compiler ABI,
in which was added the additional OMF binary format type
which is produced by C51 compiler:

 * http://www.keil.com/support/docs/93.htm

Currently are supported the following architectures:

 * ARM
 * 8051 (aka MCS51)

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS 1.13 (where previously were
added support for KEIL toolchain).

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC KEIL kit.

Following features are not implemented yet:

* Debugger integration.
* Compile output parsers.
* Toolchains auto-detection.
* Support for C251, C166 architectures.

Change-Id: If0cc18d22b7dc0e5ce9096bdb3dc699ee3edde66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-11 13:47:36 +00:00
Denis Shienkov
1caff90686 bare-metal: Add support for IAR EW toolchain
This patch adds support for the toolchains, provided by
IAR Embedded Workbench:

 *  https://www.iar.com/iar-embedded-workbench/

Now QtC's compiler page have additional 'IAREW' selector
which allows to user to choose a desired C/C++ compiler
from set of the IAR EW toolchains.

In this case the QtC will tries to detect the compiler ABI,
in which was added the additional MCS51 architecture (which
includes all family for Intel x8051 MCU's):

 * https://en.wikipedia.org/wiki/Intel_MCS-51

Also, now the ABI has an additional proprietary UBROF binary
format type which is produced by some of IAR EW compilers:

 * https://netstorage.iar.com/SuppDB/Public/UPDINFO/011281/ew/doc/EW_MigrationFromUBROF.pdf
 * https://netstorage.iar.com/SuppDB/Public/UPDINFO/013556/ew/doc/UBROFRecordTags.pdf

Currently are supported the following architectures:

 * ARM
 * 8051 (aka MCS51)
 * AVR

In addition, were added changes to the QBS Project Manager
plugin to make it work with QBS 1.13 (where previously were
added support for IAR toolchain).

So, now do not need to do an additional 'hacks' into the
'qbs.toolchain' property of QtC IAR kit.

Following features are not implemented yet:

* C-SPY debugger integration.
* Compile output parsers.
* Toolchains auto-detection.

Change-Id: I4a7794efe8dc15652f5a7f1f3dd966c367943484
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-03-07 14:38:51 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
Christian Kandeler
d59663cfe4 ProjectExplorer: Remove SysRootKitInformation::hasSysRoot()
This function is exactly the same as SysrootKitInformation::sysroot(),
except that is returns a boolean. And it's always used like this:
if (SysRootKitInformation::hasSysRoot(k))
    sysroot = SysRootKitInformation::SysrootKitInformation::sysroot(k);
Which means that the same code is executed twice in a row.
There is no point in this, so let's just remove it.

Change-Id: I95e4de101d6164ed48558b888e22ed8892fc6d9b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-09 09:06:36 +00:00
Alessandro Portale
11632bbedd QbsProjectManager: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override

Change-Id: I8a67b87e614f54554f9ca50c9f5e3f3297458ec1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-07-27 12:35:12 +00:00
Christian Kandeler
327d7a495b QbsProjectManager: Set qbs.targetPlatform rather than qbs.targetOS
This is the recommended way in qbs 1.11.

Change-Id: Id20ecdc2b8332336c92c47cf05077dbe4e54cff2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-24 15:51:53 +00:00
Oswald Buddenhagen
777ca8e655 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp

Change-Id: I94647f59d7a9df48168ac066555afe80f5f9b91f
2017-12-21 13:20:24 +01:00
Christian Kandeler
265d093c36 QbsProjectManager: Fix compiler name setup for GCC-like toolchains
The mapping was not quite right. In particular, cpp.cCompilerName needs
to be set if the compiler name is not the default.

Task-number: QTCREATORBUG-19467
Change-Id: I6c190fdda98ff15dce6066bfb082d24853538a78
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-20 10:22:52 +00:00
Joerg Bornemann
e71912b45b QbsProjectManager: Avoid allocations in string comparisons
Use case-insensitive comparisons instead of converting toLower() first.
Found by clazy.

Change-Id: I0d32b0ba7ccb5493d1c86d41044b09c8baed3dc8
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-10-19 14:22:59 +00:00
Christian Kandeler
75395af824 QbsProjectManager: Respect overridden target ABI
Auto-detecting the architecture in qbs is all well and good, but if the
user explicitly set an ABI in the toolchain widget, we must set
qbs.architecture accordingly.

Change-Id: I3a2c441ceea5e939e43764e0468588d2d0ef323c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-27 16:13:06 +00:00
Christian Kandeler
d5066ac06e QbsProjectManager: Introduce QbsKitInformation
... and use it to allow users to set custom properties in the
corresponding profile. This replaces the idiosyncratic and more
complicated approach we had before, when that was done in the qbs
profiles settings page. The profiles view is now read-only.

Change-Id: I0c29c1ac0c510e17d685e7bbaa38b54c8100ddb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-06-20 12:00:11 +00:00
Jake Petroules
a251c2c966 Adapt to new architectures handling in qbs
This lets qbs handle architectures entirely for GCC/MinGW, ICC, and MSVC
toolchains, as well as projects targeting Android or any Apple platform
with any toolchain. Now Qt Creator only passes down architecture
information to qbs for QNX/QCC and Clang on Windows, Linux, BSD, etc.

Change-Id: I44925671d7f280890f9e25a5726d019d3f98dea9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-19 14:26:55 +00:00
Jake Petroules
83fd207a64 Qbs: use the separate QNX OS type
... instead of detecting it via the device type.

Amends e69c2eb2

Change-Id: If7bd19412e723c268d93e16d46828925b74d6a4b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2017-04-07 15:58:44 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Filippo Cucchetto
4b1f8f3609 ProjectExplorer: Added support for registering custom languages
Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-23 11:19:11 +00:00
Christian Kandeler
8751d46f97 QbsProjectManager: Take the "no OS" case into account
When a toolchain did not specify an operating system, we did not set
qbs.targetOS, which meant it stayed at its default value (qbs.hostOS).
Instead, we correctly set it to an empty list now.

Task-number: QTCREATORBUG-17452
Change-Id: I2c7030013ea7a1f954e8d0f7059b471008a0ed72
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-20 14:18:20 +00:00
Eike Ziller
0596699dbd Merge remote-tracking branch 'origin/4.1' into 4.2
Conflicts:
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qbsprojectmanager/qbsconstants.h

Change-Id: I3800e580faaccdc1dd08da851956ba677d33df51
2016-11-21 17:01:15 +01:00
Jake Petroules
e50c9afce9 Qbs: filter out -arch compiler flags from platformCompiler/LinkerFlags
-arch is not allowed in compiler flags as it's automatically handled by
the qbs.architecture property, and is an error in current versions of
Qbs. If the architecture was successfully detected, remove the flags.

Change-Id: I85cce7b7f4ef5a92f857ec624a912861bcb267f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-14 12:02:06 +00:00
Christian Stenger
b892d82086 QbsProjectManager: Fix compile with gcc 4.8
Change-Id: I3be0349c9af1f8ed51f04c04ce97983409dd7512
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-14 10:10:54 +00:00
Jake Petroules
d1c2a841af Qbs: don't set cpp.linkerName
This is unnecessary (and counterproductive) with automatic linker mode
in Qbs 1.6.

Change-Id: I808effead885eeba0d524fa27989b8a54b8c655f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-11 10:28:49 +00:00
Jake Petroules
a8bb2af30e Qbs: fix Xcode SDK detection (take 2)
This adds xcode to the toolchain list, which is required to load the
Xcode module. It also uses the compiler path as the mechanism to find
the developer path, and then extracts the canonical SDK name using the
sysroot if it's a valid one for the previously extracted developer path.

amends d121fefaa9

Change-Id: I73cf1a50acd6b99a9fc3b6003bcc6dc23c2a04ab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-11 10:28:44 +00:00
Christian Stenger
2380757199 QbsProjectManager: Fix missing include
Avoid compile issue when using gcc 4.8.
(error: variable 'const QRegularExpression re' has initializer but
incomplete type)

Change-Id: Ic89f9afdf0a6854948a21103a64ec8b8f4ad1681
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-11 07:57:02 +00:00
Jake Petroules
d121fefaa9 Qbs: fix Xcode SDK detection
The Xcode related properties in the cpp module no longer exist. Use the
correct ones, and be a little stricter about extracting the constituent
components from the sysroot.

Change-Id: I6ceaebf529764e69e1e04af6650a2920b139fac2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-10 11:04:57 +00:00
Christian Kandeler
f911ddba86 QbsProjectManager: Remove a redundant header file
Somebody mistakenly introduced qbsconstants.h, even though
qbsprojectmanagerconstants.h already existed for that purpose. Merge
these two files and remove the newer one.

Change-Id: I6103509d902880d0e9c181873ec4cf56acf04424
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-26 08:21:31 +00:00
Christian Kandeler
a97f1bd0bb QbsProjectManager: Do not set an empty compiler name
If one of the two compiler types in the Kit is not set, leave the
respective value in qbs at its default. Things will likely work anyway,
whereas setting an empty compiler name is guaranteed to break.

Task-number: QTCREATORBUG-17109
Change-Id: I2b4153cb9a9daafb2f57659e16622e00d3921005
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-19 09:29:57 +00:00
Christian Kandeler
b491a1c2c0 QbsProjectManager: Fix typo in toolchain setup code
This lead to weird behavior regarding compiler name and toolchain
prefix.

Task-number: QBS-1022
Change-Id: I10abfb22ee71aed6ec5ebc6b3eb477536c86f717
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-29 05:31:13 +00:00
Jake Petroules
f41b48ef5d Rename Abi::MacOS/GenericMacFlavor to DarwinOS/GenericDarwinFlavor
This makes clear that the ABI encompasses all Darwin platforms (macOS,
iOS, tvOS, watchOS) in the wake of the OS X to macOS rename, and would
have been more technically correct anyways since ABIs are far below the
"macOS" parts of our favorite desktop Unix operating system.

Change-Id: I16d1477f44ffe70e5d8cddd67199a1602ba6fd97
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-08-22 12:54:06 +00:00
Jake Petroules
6776b78655 Revert "QbsProjectManager: Write MSVC compiler version to profile"
This reverts commit 3c63b621d9.

This is no longer necessary because Qbs determines the version automatically.

Change-Id: I80161ddf366091eca8bb1e1b29657371e9a7b0fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-15 17:05:30 +00:00
Jake Petroules
ac19d0691d Don't set cpp.linkerName for Qbs kits
This is unnecessary now that Qbs handles the linker automatically.

Change-Id: I8c6270f74355bfa274717a7791daf8d1f4721e00
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-08-15 17:04:55 +00:00
Aaron Barany
6d3497d4e2 QBS DefaultPropertyProvider: Separate C and C++ compilers
Task-number: QBS-893
Change-Id: If811a34d6fecba8989b19089e8bac5df5621836f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-07-25 18:41:18 +00:00
Tobias Hunger
cb14fb0d71 Kits: Save several ToolChains per kit
BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS!

* Convert old ToolChainKitInformation to new version
* Store several toolchains in one kit (one per language)

Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-14 15:34:06 +00:00
Jake Petroules
069a4dc7dd Add macos value to qbs.targetOS.
Change-Id: I38f810ae72ff1f7ef428835b2eeeed6d726d4727
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-06-20 16:17:17 +00:00
Jake Petroules
1c04cce4d7 Remove unnecessary /FS flag in qbs property provider.
The current version of qbs handles this automatically.

Change-Id: I81905335fd3366198164436e7125944ad8a3d304
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-18 15:31:59 +00:00
Jake Petroules
ac9360a2c1 qbs: apply compiler and linker flags from GCC toolchains.
Change-Id: I27ce0b11238a2a0c9e5f2f1f8d9e5ecfa3cc51f9
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-05-18 09:17:33 +00:00
Joerg Bornemann
3c63b621d9 QbsProjectManager: Write MSVC compiler version to profile
Change-Id: Ibd8c559ffecf327eee6af8e6d5fbacb5c8c863d1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-05-18 02:56:47 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
c868b9f3ed Merge remote-tracking branch 'origin/3.5'
Change-Id: Ife5fdcd71b0adc99d4297a28a64515e9e93d7864
2015-09-04 09:19:28 +02:00
Christian Kandeler
d58002dd46 QbsProjectManager: Fix handling of cross-compilers on Windows.
Task-number: QTCREATORBUG-15011
Change-Id: Iea84e1a545bc6f414a35602e1d0c8c903901e813
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-03 14:13:46 +00:00
Eike Ziller
37f6b4397d Merge remote-tracking branch 'origin/3.5'
Change-Id: I1ce0fa92e5c469d591d3030d1a4f168dcee232ba
2015-08-06 11:38:13 +02:00
Christian Kandeler
707d49d2fb QbsProjectManager: Un-break MSVC.
Commit aad5ca12c4 was over-eager, wrongly assuming the presence of
cpp.cxxCompilerName for MSVC and also not taking into account that
we don't set cpp.compilerVersion* from Qt Creator.

Task-number: QBS-846
Change-Id: Id6a88c18f2c460ef66f0339aeb999b7fc0321225
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-06 07:49:04 +00:00
Eike Ziller
cd5f9f6ff8 Merge remote-tracking branch 'origin/3.5'
Change-Id: I7b3ef276d438ff0f184a649153e8aeec08a9f8c9
2015-08-04 13:16:03 +02:00
Jake Petroules
aad5ca12c4 Update qbs submodule and adapt QbsProjectManager accordingly.
Change-Id: I29dc48b991fc04b599e60ae63a7f4b7978dc9f3d
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-07-31 06:42:21 +00:00
Jake Petroules
ffcb2e654e Qbs: generate correct architecture name for iOS armv7.
Task-number: QBS-839
Change-Id: I535992feb2dd4db9f30dc1458b4c6a156a26849f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-07-30 08:57:34 +00:00
Jake Petroules
96278326d8 Qbs: Remove unnecessary header dependency.
Change-Id: I9eb64d089c5b4f1f8c3560c87c053c80668fddc0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-07-28 20:22:45 +00:00
Tobias Hunger
c275dac084 Rename toolchain type constants in ProjectExplorer
Change-Id: I56f5b7373846bb091456c050eb1ff3495ca2dd72
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-14 14:44:07 +00:00
Tobias Hunger
e6d1141e1e ToolChain: Get rid of type() in favor of typeId()
Change-Id: I8fc68c266acb55a7c3e014697a7b526784914f7a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-14 14:40:03 +00:00
Eike Ziller
4dd95aa5d4 Merge remote-tracking branch 'origin/3.4'
Change-Id: Id13cbdf2f7047366e543c91fbe7c21a9c4759e56
2015-06-17 12:04:21 +02:00
Joerg Bornemann
f0467f8b01 support Visual Studio 2015
Task-number: QTBUG-46344
Change-Id: I49c3e2776e65cc83d40d1f5ab3be1365d17242d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-15 11:53:37 +00:00
Tobias Hunger
5b77a3a8c1 Blackberry: Remove blackberry support
Keep QNX.

A short informal search did not turn up any more blackberry users,
even though there is interest in QNX. So this patch removes the
platform: We had no contact with the maintainers in months, there
are no changes going into the code for about as long.

I am not even aware of anybody testing the platform, so any
remaining users are probably better of with Qt Creator 3.2 or so
where the code was extensively tested.

Change-Id: Ibeda6bfd8565599918cfcc08fd01cb5ed8793dc2
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-30 11:15:53 +00:00
Sergey Belyashov
bcbf0d8417 Fix toolchain detection when C compiler specified
If someone specifies C compiler instead of C++ one, then
extractToolchainPrefix() returns an empty result which
causes invalid behaiour on build stage.

Task-number: QTCREATORBUG-14250
Change-Id: I94d2a281c6a98178c486019344c6cdc71ac50a49
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-16 13:36:53 +00:00