aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/windows-msvc-base.qbs
Commit message (Collapse)AuthorAgeFilesLines
* msvc: fix asm flagsIvan Komissarov2024-01-091-3/+2
| | | | | | | | Filename should be the last argument. Fixes: QBS-1774 Change-Id: I6a45df6deacdba44bbb28d54ec8a90c2ade4525d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Prefer built-in JS function in modulesChristian Kandeler2023-02-201-1/+1
| | | | | | | contains -> includes Change-Id: Id893c2ea0659d9bded4f5cec1a3160ccd802118b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Use more common functions from cpp.js for GCC and MSVC toolchainsDenis Shienkov2021-10-051-32/+4
| | | | | | | | | It makes sense to use the {assembler|compiler}OutputTags() and the {assembler|compiler}OutputArtifacts() functions also in GCC and MSVC toolchains, that simplifies and unifies a code. Change-Id: Ie8cfd185c30322139fb8871b75ea69a888c1f471 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Simplify all single-line 'prepare' scriptsDenis Shienkov2021-09-281-15/+5
| | | | | Change-Id: I4e87e8aa98330c9d12a5d23cd2183edbb55d1a4d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Unify generation of precompiled headersDenis Shienkov2021-09-281-16/+5
| | | | | | | | This patch unifies the functions to generate the output file tags, and the output artifacts for the precompiled headers. Change-Id: I84be3f56037220ae5ade6e3d1d1a4e7d0a46847f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use common Cpp.resourceCompilerOutput{Tags|Artifacts} functionsDenis Shienkov2021-09-201-10/+9
| | | | | | | | | | | | | | | | | | ... to unify a codebase. Resource output artifacts are now tagged with the 'res' instead of the 'obj' as before (also the output file extensions are also changed from '*.obj' to '*.res'). This only affected to the additional processing for the new 'res' tags in the linker rules for the MSVC and the MinGW. The reason for adding the new 'res' tag is that for some compilers (e.g. the future Open Watcom), the resource files must be linked using the special flags (and not passed as like regular object files to the linker). Change-Id: Ibfc52a384816d3769a7c1f6564db079c118011a0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use more FileInfo.joinPaths() in artifacts generatorsDenis Shienkov2021-08-221-7/+12
| | | | | | | | | It makes sense to use the FileInfo.joinPaths() instead of the '/' separators in the paths, because the FileInfo.joinPaths() automatically use the best separators for a specific platforms. Change-Id: If518cca7f9edf0f199c146b1f22f07ddb51c1d51 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* msvc: fix passing /Zc:__cplusplus flagIvan Komissarov2021-08-031-0/+1
| | | | | | | | | It is mandatory to pass /Zc:__cplusplus when building with Qt 6.2 and MSVC. Fixes: QBS-1655 Change-Id: I27d928a568d0ac2075ce3f77f4142e20342be358 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix usage of Cpp.collectMiscAssemblerArguments() functionDenis Shienkov2021-06-291-2/+2
| | | | | | | | * We need to pass the 'asm' tag for this function. * We need to use this function also in MSVC toolchain. Change-Id: I3dfc7b79ec17b855da76dab35428d875c39548a1 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Use separate functions for repetitive actionsDenis Shienkov2021-05-251-0/+6
| | | | | | | | | It makes sense to minimize the copy-paste errors by moving the repetitive code into the separate functions to the cpp.js file. This will simplify the code and improve the maintenance. Change-Id: Id5a2914ff28619553b855cc6f09810ad370c408c Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Fix conditionally generation for some artifacts and tagsDenis Shienkov2021-05-061-2/+9
| | | | | | | | | | | | We need to generate a list of file tags and artifacts taking into account the dependent properties from the product. For example, we should only build tags for generating linker files if the generateLinkerMapFile property has been set. Change-Id: I286c566ffe119eebf24b60113dda65403f7af3dd Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* codesign: Long live `signtool` signing on WindowsDenis Shienkov2021-04-231-4/+20
| | | | | | Change-Id: I320cd1a1f3d8a1eed11d1c70007214f19a109b6e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Allow to specify windowsSdkVersionIvan Komissarov2021-04-191-0/+2
| | | | | | | | | Previously, it was not possible to use older windows SDK version. Fix that by introducing the new property that is passed to vcvarsall.bat Task-number: QBS-1498 Change-Id: Ic526eabb8ff82ddd85c93e90fd20421595a121f4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Share cpp::{assembler|compiler}ListingSuffix propertiesDenis Shienkov2021-04-061-1/+2
| | | | | | | | | | | | | | | | It makes sense to add the cpp.assemblerListingSuffix and the cpp.compilerListingSuffix properties to the base CppModule due the following reasons: 1. It is possible that the user wants to change the extension for the generated listing files, which makes working with Qbs more flexible. 2. It will be easier to write an autotests that check the generation of the listing files for a bare metal platforms, where listing files can have various extensions such as ".lst", ".ls", and so forth. Change-Id: I9989288bff0659dd3e8b7a443d0354bb78475270 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Share cpp::linkerMapSuffix propertyDenis Shienkov2021-04-011-1/+1
| | | | | | | | | | | | | | | | It makes sense to add the cpp.linkerMapSuffix property to the base CppModule due the following reasons: 1. It is possible that the user wants to change the extension for the generated map files, which makes working with Qbs more flexible. 2. It will be easier to write an autotests that check the generation of the map files for a bare metal platforms, where object files can have various extensions such as ".map", ".m51", ".m66", and so forth. Change-Id: I1e5e3b39bf84fddfe8c06f2db9d3936c6a3ff027 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Share cpp::objectSuffix propertyDenis Shienkov2021-03-301-4/+5
| | | | | | | | | | | | | | | It makes sense to add the cpp.objectSuffix property to the base CppModule due the following reasons: 1. It is possible that the user wants to change the extension for the generated object files, which makes working with Qbs more flexible. 2. It will be easier to write an autotests that check the generation of the object files for a bare metal platforms, where object files can have various extensions such as ".rel", ".r90", ".r43", and so forth. Change-Id: Ib73836d5e614a6924d312d061f02437c3b318785 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Make `cpp.toolchainInstallPath` property as public for toolchainsDenis Shienkov2020-12-021-1/+0
| | | | | | | | This property re-declared in each of toolchain modules. So, it makes sense to declare this property once in a base CppModule. Change-Id: I1df76b288660d4b999c918a0019a01825ee0890a Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Implement cpp.generateCompilerListingFiles for MSVC toolchainDenis Shienkov2020-08-121-3/+11
| | | | | | | | | | We need to use the /Fa compiler option as described here: * https://docs.microsoft.com/en-us/cpp/build/reference/fa-fa-listing-file?view=vs-2019 Change-Id: I81470bfbf84563a49bd5336e7204a07d5b2c910e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Msvc: Handle windows module definition fileDenis Shienkov2020-05-261-2/+7
| | | | | | | | | | | | | | | | | | | Module-definition (.def) file provide the linker with information about exports, attributes, and other information about the program to be linked. This file can be used instead of e.g. __declspec(dllexport) keywords inside of a header files to export an appropriate symbols: * https://docs.microsoft.com/en-us/cpp/build/reference/module-definition-dot-def-files?view=vs-2019 * https://docs.microsoft.com/en-us/cpp/build/reference/def-specify-module-definition-file?view=vs-2019 To make it supported, we have created the additional 'def' file tag, and now we can add the required module-definition file to the {Product|Group}'s 'files' property. Fixes: QBS-571 Change-Id: I831d2e1b8f9f061a4414a5eaac85b71584f48c5d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Allow to generate map file using MSVC toolchainDenis Shienkov2019-10-211-1/+9
| | | | | | | | | Right now it is possible to generate a linker map file using the cpp.generateLinkerMapFile property. Change-Id: Iffed6867e9829f5f2ca51b1932d6641963e66abe Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* C++: Add support for clang on WindowsChristian Kandeler2019-08-141-44/+4
| | | | | | | | | | | | | This is about clang in "mingw mode", not clang-cl. When targeting Windows, clang is a lot like mingw, so factor out the common parts into a new base module. Testing uncovered a number of invalid assumptions in our autotests, which are also fixed in this patch. In addition, minor adjustments had to be made to the Qt.core module and to the qbscore lib. Change-Id: I73085dc62a65e2a9d0397cf234c8641989246f22 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add support for the clang-cl compilerIvan Komissarov2019-04-101-0/+372
Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>