aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge 1.12 into masterChristian Kandeler2018-06-226-6/+45
|\ | | | | | | Change-Id: I3b5f14cf38452aaa740ac66cffa1e740f7349823
| * setup-toolchains: Fix another possible QProcess timeoutChristian Kandeler2018-06-211-1/+1
| | | | | | | | | | | | | | This amends a838fd2328. Change-Id: I6ef5b0f87190a95025e3c949162cd8b0e4c4f64c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Give more help in 'No such product' error messageKai Koehne2018-06-211-3/+14
| | | | | | | | | | | | | | | | | | | | | | If a user did specify a product that's not available, he most likely wants to see the product names actually available. For up to ten products, we just list the names of the products now. For a longer list of products we point to list-products command. Change-Id: I19ef16b2cf6172f02024d9dfb4c19cb81a5600a3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Consider Transformer::explicitlyDependsOn when disconnecting artifactsChristian Kandeler2018-06-201-0/+1
| | | | | | | | | | | | | | | | | | This was forgotten in d0e8197bbf. As a result, transformers could hold references to invalid artifacts, resulting in a crash when storing the build graph. Change-Id: I6af0d15d0c0ad44f1f9011c88e413f327a05943d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Do not collect exported properties for disabled productsChristian Kandeler2018-06-191-0/+6
| | | | | | | | | | Change-Id: I1d4e8a28485f421e3bcefe7e498fdc1a3ba99f98 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Catch mis-use of "original" as default property valueChristian Kandeler2018-06-181-0/+7
| | | | | | | | | | | | | | | | This used to cause an infinite recursion, eventually crashing after running out of stack space. Change-Id: I073f7163d73a70b17bab078c8a99199bc9d21eaa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Check for duplicate entries in multiplex propertiesChristian Kandeler2018-06-151-2/+16
| | | | | | | | | | | | | | | | | | This used to lead to an error message about duplicate product names, which left the user in the dark about the actual problem. Change-Id: I460dcdf89112124cfd303529d42acd6c13fe9155 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Remove the base module import from Qt template filesJoerg Bornemann2018-06-2210-10/+0
| | | | | | | | | | Change-Id: I2580e44cc202ccb349654e39b61bfa2ba7662def Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Get rid of the need for "import qbs"Joerg Bornemann2018-06-224-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | It is difficult to place why the "import qbs" statement is needed. What it does is providing the default imports like CppApplication. There's no advantage in having a project file without this base import, so we always import "qbs" implicitly now. [ChangeLog] Removed the need to add "import qbs" to project files. Change-Id: I5954fbbade361188d1d54815cc3bf806fb461e9d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-1512-32/+29
|\| | | | | | | Change-Id: I72bbda4537a65bc525afc38a3d280f3c23940c12
| * Fix FileInfo::isDir() on UnixChristian Kandeler2018-06-141-1/+3
| | | | | | | | | | | | | | | | The function could return true for non-existing files. This amends b29168f50, which erroneously assumed that could only happen on Windows. Change-Id: Ic5fa50b2035b52ff078194624623a7b46e90672f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qtprofilesetup: Remove unnecessary "product" qualifierChristian Kandeler2018-06-141-1/+1
| | | | | | | | | | Change-Id: I9e96032baad8519af44e694dcee12cdb149a4991 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Call QProcess::waitForFinished with timeout of -1Joerg Bornemann2018-06-143-5/+5
| | | | | | | | | | | | | | | | | | The default value of 30 s can be too short for environments like virtual machines under heavy load. Task-number: QBS-1360 Change-Id: I83af7740dc842faf8795f5901f36744229160154 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Make RescuableArtifactData::children a std::vectorJoerg Bornemann2018-06-143-4/+3
| | | | | | | | | | | | | | The value_type ChildData is not suitable for QList. Change-Id: I33057a739c26e36a7c6dabc44dad72262a05cdb0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix C4267 warningsJoerg Bornemann2018-06-141-1/+1
| | | | | | | | | | | | | | | | | | This fixes the following warnings: executor.cpp(832): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data executor.cpp(832): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data Change-Id: Ic23b855b8213a7b4feee81553233ad882a6c8ed2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * RulesApplicator: Remove unnecessary qualificationsChristian Kandeler2018-06-141-10/+6
| | | | | | | | | | Change-Id: Id917d2b9c831f6ddf43f81790dd632a206019680 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Fix RulesApplicator::InputsSourceFlagChristian Kandeler2018-06-141-1/+1
| | | | | | | | | | | | | | | | This enum is used for a QFlags type, so we cannot have a zero value in there. Change-Id: Ifd935c398065b0706cb0fba85c1752c448c26f4c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Makefile generator: Improve dependency collection performanceChristian Kandeler2018-06-141-9/+7
| | | | | | | | | | | | | | | | Use the output artifact's children directly rather than "manually" collecting the input artifacts from the rule input tags. Change-Id: I3a31d24471a963c1881e89d76da61b0bcf28cc1a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Prevent adding empty file paths as dependenciesChristian Kandeler2018-06-081-0/+2
| | | | | | | | | | | | | | | | | | The input artifact scanner was missing a check, so empty paths could end up in the list of file dependencies. As a result, the respective artifact would get rebuilt every time. Change-Id: I34e48776856224dc885f03d34d40cae88d7d5e4b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Do not use colored output on dumb terminalsJoerg Bornemann2018-06-133-2/+13
| | | | | | | | | | | | | | | | This prevents the display of escape sequences when using the vanilla emacs compile command, which sets TERM to dumb while isatty returns true. Change-Id: I025b00572af15eb435adfd9287179e05a41c2b0f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | JS imports: Cache also the results of "require"Christian Kandeler2018-06-124-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we only did this when the import statement was used. ========== Performance data for Resolving ========== Old instruction count: 4222084293 New instruction count: 4059138786 Relative change: -4 % Old peak memory usage: 31448616 Bytes New peak memory usage: 31345168 Bytes Relative change: -1 % ========== Performance data for Rule Execution ========== Old instruction count: 2801901530 New instruction count: 2713710190 Relative change: -4 % Old peak memory usage: 20535920 Bytes New peak memory usage: 20527264 Bytes Relative change: -1 % ========== Performance data for Null Build ========== Old instruction count: 602407594 New instruction count: 550459348 Relative change: -9 % Old peak memory usage: 15631832 Bytes New peak memory usage: 15631752 Bytes Relative change: -1 % Change-Id: I4c7ff9f83799a0da9b2e4e67c5b946bd02f199c3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-0811-23/+124
|\| | | | | | | Change-Id: I0c914674c0728a7f7bc70fd9608914b95ef55a30
| * Fix VS toolchain compatibility matchingJoerg Bornemann2018-06-081-1/+8
| | | | | | | | | | | | | | | | | | | | VS 2017 15.0 (_MSC_VER 19.10) builds of Qt are compatible with later Visual Studios of the same major version, e.g. VS 2017 15.7 (_MSC_VER 19.14). Change-Id: I7635f6e2be6591245c1056045128e546c23bacd2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix Windows build with QtScript-less QtJoerg Bornemann2018-06-085-3/+60
| | | | | | | | | | | | | | | | As we're building our own QtScript statically, we must override the export macros of QtScript. Change-Id: I9395e59cfcc1905b7b248b81277ec5fcfed9059f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Change tracking: Do not rescue outdated child artifactsChristian Kandeler2018-06-081-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | If a former child artifact is not in the list anymore after the rules applicator has run and it was not originally added as a result of scanning, then it is no longer a child artifact. We used to add these artifacts back to the list of children, so that an existing parent/child connection persisted even after changing the rule input tags in a way that the child would not match anymore. Change-Id: I700f515bbe5732bdb9251d48e3fc5ad53fb181cc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix observation of JS imports pulled in via "require"Christian Kandeler2018-06-071-4/+3
| | | | | | | | | | | | | | | | | | If we call import() with ObserveMode::Disabled, we still need to gather all the results for possible later observation, because due to caching, we will not re-collect them on the next import() call. Change-Id: Ia7ccbe7cc3c47d6c2f1612bcf37c4a6c144c6ea2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Fix property values that are pure assignments of importsJoerg Bornemann2018-06-061-1/+15
| | | | | | | | | | | | | | | | Those were broken, because QScriptValue::toVariant() doesn't take QScriptValue::prototype() into account, which we set for imports. Change-Id: I571f7a4b63df08b1768f61bcc1d622f3730c2a73 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix the qmlcachegen functionalityChristian Kandeler2018-06-051-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | The qmlcache module was broken in an impressive number of ways: - We forgot to adapt the Probe to a5cc49f2c6. - The return value of the validate property is never evaluated; you have to throw an error for it to have an effect. - From 5.11 on, qmlcachegen does not support the --target-architecture option anymore. Task-number: QBS-1353 Change-Id: I770ddc18ad2519c1d5db83bee9634717b1768d67 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Make sure probe results are also cached for shadow productsChristian Kandeler2018-06-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Because we don't turn shadow products into actual products in the ProjectResolver, the results of probes run in their context did not end up in the build graph and the configure scripts were therefore needlessly re-executed on the next project resolving. Fix this by storing these probe results along with the project-level ones. Change-Id: I647bbedbbe3fa6f36b536fd1b80fd321894362f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge 1.12 into masterChristian Kandeler2018-06-0135-138/+479
|\| | | | | | | Change-Id: I95f9b29df55c0baac20791bbe17f615c1ce060bb
| * Add support for system-level settingsChristian Kandeler2018-06-0126-80/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | In addition to the traditional per-user settings, there is now also a system-wide settings file affecting all users. The file's platform- specific default location can be overridden at build time. The qbs-config tool can write these settings via the new --system option. [ChangeLog] Introduced the concept of system-level qbs settings Change-Id: Ie6f675a74e96ce1fa7b2dd0712f6106071e848a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * C++ scanner: Properly handle UTF-8 byte order markChristian Kandeler2018-05-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes in the first line of a source file starting with a byte order mark would not get detected, resulting in failure to recompile after a header file change. Skip over the BOM before passing the data to the lexer. Task-number: QBS-1348 Done-with: Ola Røer Thorsen <ola@silentwings.no> Change-Id: I894a5b1667e49be5f8ce9b5cc66e4e796fd073f1 Reviewed-by: Ola Røer Thorsen <ola@silentwings.no> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * qbs-setup-toolchains: Check for presence of cl.exe in MSVC bin pathsJoerg Bornemann2018-05-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Now we check for the presence of cl.exe also for VS versions >= 15. This fixes warnings like: WARNING: Failed to set up MSVC2017-_1033: Could not start C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.14.26428/bin/arm/1033/cl.exe (Process failed to start: The system cannot find the file specified.) Change-Id: I2d8350abaa1b8a96a3e832d4bfc121f5fa2e52ba Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Move msvcVersion out of QtEnvironmentJoerg Bornemann2018-05-244-18/+29
| | | | | | | | | | | | | | | | | | This member is only used in qbs-setup-qt and is possibly invalid when used from Qt Creator. The removal stops us from trying to use the member in the qtprofilesetup lib again. Change-Id: Ib356b0f69fe479321aa7c3148acdb95fb805239a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix file tag for Qt libraries in qtprofilesetupJoerg Bornemann2018-05-241-1/+2
| | | | | | | | | | | | | | | | | | The check env.msvcVersion.isValid() doesn't work for Qt Creator, because we never set the MSVC version for a QtEnvironment there. Use the isMsvcQt function instead. Change-Id: I9cfef1bc6383551fc3382408d18a239c4f7d0339 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Move MSVC-related functions to qtprofilesetup libJoerg Bornemann2018-05-245-36/+137
| | | | | | | | | | | | | | This will avoid code duplication in the next commit. Change-Id: I90d99860dce04bf56c81d4f363aa6e5bafe1224c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Allow rules without output artifactsChristian Kandeler2018-05-282-15/+35
| | | | | | | | | | | | | | | | | | | | | | | | It is occasionally useful to have a rule whose purpose lies solely in its "side effects", that is, it does not produce any actual files. This patch removes the necessity to declare a dummy artifact in that case. [ChangeLog] Added support for rules without output artifacts Change-Id: I38e76a5ddc78ffa768e8ae1f270ae2f7461c5ee7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Apply all groups with the same file tag filterChristian Kandeler2018-05-243-31/+44
|/ | | | | | | | | ... rather than considering only the last one. It is a valid use case to add more properties and/or file tags in derived items. Change-Id: I9ebc95a3f485c16c3cc7e21723645ab87c9c1693 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Set project-level search pathsChristian Kandeler2018-05-191-0/+1
| | | | | | | | ... when adding transitive dependencies. This was forgotten in 7e630a1436. Change-Id: If1a4bbecb8ee7b828d8b32ae79933ac07ad58d12 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Include settingsrepresentation.h in the main header fileChristian Kandeler2018-05-191-0/+1
| | | | | Change-Id: Ifcb9d418d9646ae9bbc2aad816518fd6cb732659 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix CLOCK_REALTIME not being available on macOS SDK < 10.11Alexandru Croitor2018-05-181-0/+5
| | | | | | | | | Just define it to a dummy value, it's not used anyway. Amends 2aa3131bef6444a800f6e6259cecf44851eb0454 . Change-Id: Ib11e4158b274ef6b49013107cc0815007b6544d6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix FileTime and FileInfo stat times implementation on macOSAlexandru Croitor2018-05-183-8/+43
| | | | | | | | | | | | | | | | | | | | | | This requires a couple of changes: 1) When targeting macOS 10.12+, clock_gettime is available and can be used directly for FileTime::currentTime(). 2) For lower versions, we partially implement the clock_gettime CLOCK_REALTIME usecase, as it is done in macOS libc sources, and explicitly use that version. 3) The file stat structure has slightly different field names on macOS, so the accessed names were adjusted in FileInfo::lastModified() and FileInfo::lastStatusChange(). Two more things are worth mentioning: 1) Both the stock and custom implementations of clock_gettime() have 1000nsec = 1microsecond resolution, and not a 1ns one. 2) The stat.st_mtimespec field can store nanosecond values, but in practice with HFS+ the date resolution is 1 second. This is not true for APFS, which has a 1ns resolution. Change-Id: I1ecdc6e9db7a9c1dc5f9a9a0859ec25a34165c4d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ModuleLoader: Remove modules of disabled product modulesChristian Kandeler2018-05-181-6/+4
| | | | | | | | | | | ... before setting up the transitive dependencies. Otherwise, there is the danger that other code will look at the original modules list and stumble over inconsistencies. For instance, propagateModulesFromParent() does that, which caused asserts on macOS. Change-Id: I8cd1adb15d8341e8f528f221dcca22fa27b0d68e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not export anything from disabled productsChristian Kandeler2018-05-182-26/+73
| | | | | | | | | | | | | | | | | Before this patch, if a product had a non-required dependency on another product and that product's condition was false, then the dependencies from the disabled product's Export item still got into the importing product, which is not what users expect. The fix is achieved by splitting up the addTransitiveDependencies() function and moving the part that is not required for determining the dependencies between products into handleProduct(). In that function we already have definite knowledge about which dependencies are enabled, so we can simply filter out dependencies of modules representing products that are disabled. Task-number: QBS-1250 Change-Id: I787a4554b2ced3924e0c6ab7e78bd73221fbecdc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Mark parent artifacts explicitly as out of dateChristian Kandeler2018-05-186-2/+17
| | | | | | | | | | ... after a transformer finishes. This makes our "out of date" check independent of the local clock resolution for generated artifacts that do not have source artifacts as children. Change-Id: If3d47f1fd859c30846806fabaddf3b47a840a6d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* ModuleLoader: Remove unneed loadBaseModule() callChristian Kandeler2018-05-173-6/+13
| | | | | | | | | | | | | | | That call was probably conceptually unneeded since d08ce8f643 (because from then on the module instance, which already has a qbs instance, was used to evaluate the condition), and harmful since be8432fac9 (because the loadBaseModule() call then happened on the shared module prototype). This patch also needs to touch the module merger: Because the prototype is now not tainted with qbs properties from the product item anymore, we have to make sure that variant values are not ignored during module merging; otherwise, qbs properties set by the multiplexing procedure could get lost in the merge process. Change-Id: Iae5d47dbe018d330f4c96e919bb0f83c086ae1df Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make Depends.productTypes in Export items workChristian Kandeler2018-05-162-30/+115
| | | | | Change-Id: I441c0454ee7a4b928c132052c49db1cddc34d3c9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Split up the module prototype cacheChristian Kandeler2018-05-162-43/+67
| | | | | | | | | | We only need one prototype item per file path and profile. Other differences, such as the multiplex configuration, only influence whether the module condition is true and do not require loading the module file again. Change-Id: Ia352bca1859566d5db6bfc86ce4d24888ef45f30 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Allow module instances with the same priority in different search pathsChristian Kandeler2018-05-151-9/+14
| | | | | | | | | | The search path order provides additional prioritization. Conflicts can now only occur between candidates in the same directory. This is needed e.g. to allow distributions to provide global search paths. Change-Id: I698a96e8943041fb0c4536901f75394bacd7fb40 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Move some code out of a loopChristian Kandeler2018-05-151-15/+16
| | | | | | | These values are the same in all iterations. Change-Id: I53f5f2bb5c76605eae089f546537c58d396787f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>