summaryrefslogtreecommitdiff
path: root/share/qbs/modules/cpp/windows-msvc.qbs
Commit message (Collapse)AuthorAgeFilesLines
* Prefer built-in JS function in modulesChristian Kandeler2023-02-201-3/+3
| | | | | | | contains -> includes Change-Id: Id893c2ea0659d9bded4f5cec1a3160ccd802118b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Use Host and FileInfo serviceRaphael Cotty2022-01-311-1/+2
| | | | | | | | Replace all the possible use of the qbs module that can be replaced by the Host and FileInfo services. Change-Id: I0d6f820bb2577eacd9081ec2df1eb53adf94d50e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* msvc: fix passing /Zc:__cplusplus flagIvan Komissarov2021-08-031-0/+2
| | | | | | | | | 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>
* Allow to specify windowsSdkVersionIvan Komissarov2021-04-191-0/+1
| | | | | | | | | 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>
* Autotedect MSVC compiler by using a probeIvan Komissarov2020-02-141-1/+2
| | | | | | | | This allows to build projects without calling "qbs setup-toolchains" first by simply calling "qbs build". Change-Id: Iba4af8bf77d0ee5d209564ea371328d3c6cf2aa2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add support for the clang-cl compilerIvan Komissarov2019-04-101-337/+7
| | | | | | Task-number: QBS-1316 Change-Id: Ibf9da364610c260ead088a8990a70c7739d53c39 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Support big Qt resourcesJoerg Bornemann2018-11-301-3/+9
| | | | | | | | [ChangeLog] Introduced the property Qt.core.enableBigResources for the creation of "big" Qt resources. Change-Id: Ic87aa70132240e67243c1cbe137583a371558261 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add support for job poolsChristian Kandeler2018-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | Commands can now be assigned to an arbitrary job pool and a limit for the number of concurrently running jobs in such pools can be provided in a number of ways: - via the build command line: qbs --job-limits linker:1 - via the settings: qbs config preferences.jobLimit.linker 1 - in a project file: JobLimit { jobPool: "linker"; jobCount: 1 } We provide two job pools ourselves with the cpp module: "compiler" and "linker". [ChangeLog] Added the concept of job pools for limiting concurrent execution of commands by type Task-number: QBS-743 Change-Id: Ib3f361dbc73093e342bf0eba0daf2079a2b3a8ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* mingw: Create import libraries alongside DLLsChristian Kandeler2018-07-051-1/+0
| | | | | | | This is the platform standard, and it gives us smart relinking for free. Change-Id: Iee9e14fe66c9418adaa14893fe2b4f573408f77d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove the base module import from shared imports and modulesJoerg Bornemann2018-06-221-1/+0
| | | | | Change-Id: I5270e033dc41b5bd76a417099514c69cc073008b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Use Rule.name in favor of id in toolchain rulesJoerg Bornemann2018-06-141-4/+4
| | | | | | | | | | The ids are currently unused and so are the names. But while the ids are of no value at all, the names can be useful for debugging. Also, we might use them later as a way to identify rules / groups of "similar" rules (e.g. linker rules). Change-Id: I6dfac1db7c36a6cae52298ceb0691a106379ae3c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Expose cl-generated PDBs as debuginfo_cl artifacts for static libsJoerg Bornemann2018-04-181-8/+20
| | | | | | | | | [ChangeLog] For MSVC static libraries, compiler-generated PDB files are now tagged as debuginfo_cl to make them installable. Change-Id: I8431dbffbbc31c48f1bc7aea96332e0b2408c743 Task-number: QBS-1106 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge 1.10 into masterChristian Kandeler2017-12-221-3/+0
|\ | | | | | | Change-Id: Iecddc2722d22d7c15d4b32efd676fa8e7c00e99f
| * cpp module: Init all suffix and prefix properties to the empty stringChristian Kandeler2017-12-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...rather than leaving them undefined. This way, the string "undefined" will not end up in file names. It's safer to do it this way compared to checking for "undefined" in all the places that could make use of the properties. Due to the semantics of these properties, there is also no value in treating "undefined" in a special way. Task-number: QBS-1265 Change-Id: I6ce7626485baa284a6c782b513740f9d150e18c3 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge 1.10 into masterChristian Kandeler2017-12-151-1/+2
|\ \ | |/ | | | | Change-Id: Iab942ed25d06038cf8c172eb70dcd8e9a720e1c8
| * Fix GCC support for "bare metal" systems againChristian Kandeler2017-12-111-1/+2
| | | | | | | | | | | | | | | | | | This was fixed before in 8176a4d419 and broken again in 72eedbb0a4. Fix it for good this time using module priorities. Task-number: QBS-1263 Change-Id: Ib1702299ef6c51b19a9082da96485ef5387dc1bb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Make Module.setup{Build,Run}Environment first-class citizensChristian Kandeler2017-11-201-2/+2
|/ | | | | | | | | | | They did not have the project and product variables available, and they accessed module properties in a way that made it look as if they were normal properties rather than scripts, which was misleading. Now everything works the same as in Rule scripts and JS commands. Task-number: QBS-744 Change-Id: I11d70876185d528282a56747747dd8310a77fbc4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Get rid of the ".obj" subdir in our build directoriesJoerg Bornemann2017-10-061-7/+7
| | | | | | | | | | | We claim that build directories are opaque, yet there's a ".obj" subdir where object files are placed. This needlessly adds a level in the build dir structure. Remove the creation and usage of this directory, which is clearly qmake legacy. Change-Id: I3afa6bd61b76941ecebbc2cd8f4109621694e371 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Introduce property cpp.variantSuffixChristian Kandeler2017-09-011-0/+7
| | | | | | | | | | | | This property existed already, but was only used for Darwin. It is now fully functional and has proper platform-specific default values. [ChangeLog] Debug variants of libraries now get a name suffix on Darwin and Windows when multiplexing over qbs.buildVariants. Overriding is possible via cpp.variantSuffix. Change-Id: I5763f9641ead4f6335ab1f1800b9929bf84279e3 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Automatically determine built-in compiler definesJake Petroules2017-08-111-3/+2
| | | | | | | | This provides users with access to the full list of macros defined by the MSVC, GCC, Clang, or MinGW compiler in use. Change-Id: I6e7f6841bbc18aed13958724b268283d97b17320 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add initial support for Universal Windows PlatformJake Petroules2017-08-011-2/+11
| | | | | | | | | | | [ChangeLog] Added initial support for the Universal Windows Platform (properties for which API families/partitions are available to code being compiled, and whether compiled binaries require an app container context to load/execute). Change-Id: Idd3e117bbb40bd547ae06c16318b2d2e38f07bb4 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Re-introduce endianness propertyJake Petroules2017-06-291-0/+1
| | | | | | | | | | | | | Now it can actually be useful, in order to select a specific endianness when building for architectures that are bi-endian. For example, MIPS and PowerPC. This patch makes it possible to build for ppc64le, which is the only variant of the PowerPC architecture that seems to be relevant today. ppc32 and all big-endian variants seem to have fallen out of use. Change-Id: Id1b9f9b397990136ab9aa899829345d426465824 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not create copies of precompiled header source files on MSVCJoerg Bornemann2017-06-201-9/+0
| | | | | | | | | | | | We used to create copies of cpp_pch_src and c_pch_src files in the MSVC compiler rule to create an unambiguous file name that can be used in later calls to the compiler rule. This hack is not necessary anymore. We can inspect the artifacts of the product in the compiler rule. Change-Id: I40ff119e2507cae3210c52c82fd38cfd83cf261c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Add support for 64-bit ARM targets with Microsoft Visual C++Jake Petroules2017-05-081-0/+2
| | | | | | | | | | | | | | | | | | | Although the compiler has not yet been publicly released, we can find references for the names of things in order to future-proof qbs for when it is. The name of the 64-bit ARM assembler can be found in two locations: - https://github.com/Microsoft/ChakraCore/blob/master/Build/armasm.props - https://msdn.microsoft.com/en-us/magazine/mt795185.aspx The name of the 64-bit linker option: - https://github.com/dotnet/coreclr/blob/master/CMakeLists.txt The name of the ARM64 compiler macro: - https://msdn.microsoft.com/en-us/library/b0084kay.aspx Change-Id: I7ec9c112f149845e2a84a5907bb5b2eb87235a11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Improve support for Windows SxS assembly manifestsJake Petroules2017-04-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | There's no reason to limit manifest embedding solely to the manifest generated by link.exe. Additionally, this makes it easier to add content to the manifest by adding files with manifest fragments rather than having to manually compose them and create Windows Resource files to apply them. On MSVC, this allows the manifest tool to merge multiple manifests into the final assembly without having to manually create a .rc file or perform the merging. On MinGW, this allows a manifest to be merged into the final assembly without having to manually create a .rc file. Unlike MSVC, manifest merging is not yet supported because the toolchain does not provide this capability. Qbs may begin to emulate this capability at some point, but for now specifying multiple manifest files in a product with MinGW will result in an error. Change-Id: I12e2db809c8b638168567f4342288eac568a57ca Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove some usage of product.modulePropertyJoerg Bornemann2017-03-161-13/+11
| | | | | | | | | | | Keep moduleProperty calls for cpp.{flags|platformFlags|usePrecompiledHeader}, because ModUtils.moduleProperty maps those to their language-specific properties (e.g. cxxflags). Change-Id: Id2280a42b26318b3a320d9df22801626336c72e6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Let toolchains configure themselves if the binary is in the PATHChristian Kandeler2017-03-131-1/+8
| | | | | | | | This will allow us to build without a profile. Change-Id: Ie1bfed8590c876342668fc359b0bd49e35a3a0d2 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Re-work linking library dependenciesJoerg Bornemann2017-03-091-11/+1
| | | | | | | | | | | | | Traverse the dependency graph and collect library dependencies top-down. Do not "push" library information "upwards" when building a library. For gcc, differentiate between "public" and "private" library dependencies. Public library dependencies are added to the command line with -l. Private library dependencies are transitive shared object dependencies of shared objects. Those are added with -rpath-link. Change-Id: I4c0015910b746fb2d996fc9cf3074050512f02d5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix misuse of Function.prototype.applyJoerg Bornemann2017-01-191-5/+5
| | | | | | | | | | | | | | | We were using the following pattern to pass the current arguments object to functions: Foo.func.apply(this, arguments) This is wrong as it changes the this object of func from Foo to the this object of the calling context. The right way to pass the current arguments object is Foo.func.apply(Foo, arguments) Change-Id: Ie30dea98a9ce78a402677e146dd35fa2b96672ab Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Set cpp.compilerIncludePaths also for MSVCChristian Kandeler2017-01-161-0/+1
| | | | | | | This fixes the artifactScanning() autotest failure on Windows. Change-Id: I37dd5b3f1f6f8f8899ef40cb9eef313f6c7b613e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use different tags for debug info created by different rulesChristian Kandeler2017-01-021-6/+6
| | | | | | | | | Otherwise, rule conflicts occur when users try to process the "debuginfo" artifacts further. Task-number: QBS-1089 Change-Id: I70141cfbf2a966ab0414cbabab5e4785fd4a96c6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* MSVC: Add "WIN32" to the list of platform definesChristian Kandeler2016-12-141-0/+1
| | | | | | | | | This macro is set when building with Visual Studio and is often used interchangeably with the compiler define "_WIN32" by developers when testing for the platform. Change-Id: I4e14ffae162793bd8559796b449e26a3899d8cc8 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* MSVC: Do not overwrite build environment with result from ProbeChristian Kandeler2016-11-231-2/+2
| | | | | | | | | We want to amend it instead. Task-number: QBS-1038 Change-Id: Ib1b87b654d92911473cd03f9c32243a54fb98635 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge 1.6 into masterChristian Kandeler2016-08-091-2/+3
|\ | | | | | | Change-Id: Ic2903bf480a73ff8644ea6f6af2aadb419af40e4
| * Fix change tracking for precompiled headersChristian Kandeler2016-08-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | We used "explicitlyDependsOn" in the respective rules to make the pch sources depend on all header files. This was much too coarse, as it meant that the precompiled header was rebuilt whenever any header file in the product changed. Instead, we need to scan the pch sources just like all the other C and C++ source files to find out which header files they actually depend on. Change-Id: Iaec4ed85075b387d9f4b0fcd06b1e481851c6b10 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Deprecate the "moduleProperties" functionChristian Kandeler2016-08-041-7/+7
|/ | | | | | | | Ever since we introduced module merging, there has been no difference between moduleProperty() and moduleProperties(). Change-Id: I3f9a9df3f24bf971828e774a5f687356509df2ca Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Determine Visual Studio architecture & build environment automatically.Jake Petroules2016-06-271-0/+24
| | | | | | | | | This moves one step further to making the setup-toolchains tool unnecessary and also makes the toolchainInstallPath of MSVC profiles consistent with what Qt Creator sets. Change-Id: I3eb11b456bf02bde8993ec0dac7e0f9950174a08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Decouple image format from OS using new cpp.imageFormat property.Jake Petroules2016-06-211-0/+1
| | | | | Change-Id: If95ab5693a105ed5d442d5d0250cdc8204238a53 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-081-8/+1
|\ | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | | | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Print more descriptive "unknown Windows version" warning messages.Jake Petroules2016-05-301-7/+0
| | | | | | | | | | | | | | | | | | Incidentally, this also fixes a bug causing Windows 10 to be treated as Windows 1.0 in the subsystem version. Task-number: QBS-978 Change-Id: I5aa1763ce9d0a9b12aa50e864086cc2ae4ceb3c1 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge 1.5 into master.Christian Kandeler2016-05-271-0/+2
|\ \ | |/ | | | | Change-Id: I85f81532d88798d71cb88552dd150189d72829bd
| * Properly support disabling the use of precompiled headers.Christian Kandeler2016-05-181-0/+2
| | | | | | | | | | | | | | We already had the respective properties, but they didn't do anything. Change-Id: I2af86e325b6da13ea7f07eb132e207c8501ae467 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-05-181-1/+1
|\ \ | |/ | | | | | | | | | | | | Conflicts: qbs-resources/imports/QbsFunctions/functions.js qbs_version.pri Change-Id: I24c4c941d825e61ddd2e704c8cea29eaa9943997
| * Add missing _MSC_VER=XXXX define to compilerDefinesJoerg Bornemann2016-05-171-1/+1
| | | | | | | | | | | | | | The _MSC_VER define must be passed to moc and friends. Change-Id: I77d1a030e802a24b6980d67434e05ae0be96a20d Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Remove items scheduled for removal in 1.6.Jake Petroules2016-04-221-43/+0
|/ | | | | Change-Id: I4098b281ab9c1f5bc29fe23164dd3a3303759ce0 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Use file tags for precompiled header sources.Christian Kandeler2016-03-161-0/+42
| | | | | | | | | The Transformer-based solution is too simplistic: It does not allow for the header to be auto-generated, nor can you reliably include headers in such a file that are created during the build. Change-Id: I30ce58a8a478116d70d2c19098ee174e7ff10717 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Rename cpp.generateManifestFiles.Christian Kandeler2016-01-281-1/+2
| | | | | | | | | Use the singular form, as there is only one manifest per binary. Keep the old name around for backward compatibility. Document the property while we're at it. Change-Id: Ic02c8ecbec0f9e62570cda12ab478e58d5589ae2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Move global auxiliary functions into a new Utilities extension.Jake Petroules2015-11-271-5/+6
| | | | | Change-Id: If0f12b9d28b83080f4435d91b55d70d5cff5d42e Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Introduce new assembler-related properties.Jake Petroules2015-10-311-2/+4
| | | | | | | | | | | | | | This adds: - cpp.assemblerName - cpp.assemblerPath - cpp.assemblerFlags - cpp.platformAssemblerFlags Users can now, for example, use nasm instead of GNU as (default). Task-number: QBS-891 Change-Id: I8501abea494b327ac95f02f3cded263dbe72f12f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>