summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix over-eager sanity checkv1.12.1Christian Kandeler2018-09-041-5/+9
| | | | | | | It could trigger on legal constructs. The patch amends 9c1aa4ece1. Change-Id: I31eab78fdb58262f2e4935f4eebf4023e4a4adc0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix invariant in the RequestedArtifacts classChristian Kandeler2018-09-044-13/+14
| | | | | | | | | | If an artifact map is requested a second time, we need to update the set of all tags if the artifacts map has changed in the meantime. This fixes an assertion in the sanity checks. Change-Id: Iacf8d4376c7a3a356428cc7eb508dbd22e945a8c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Executor: Fix invalid assertionChristian Kandeler2018-09-035-1/+41
| | | | | | | | An artifact whose alwaysUpdated property is false does not need to exist and is therefore not required to have a valid timestamp. Change-Id: I642349c49a53e6e45d6b09d1acc87f4c9a0edae9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ModuleLoader: Fix memory leakChristian Kandeler2018-09-031-2/+2
| | | | | | | One of the allocations was not exeception-safe. Change-Id: Ib367f9f2e5e65d0813465d5dcbf9dc779418bdfc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Store product names in ExportedModuleChristian Kandeler2018-08-316-19/+29
| | | | | | | | | | | | | ... rather than product pointers. ExportedModule objects can be stored in Transformers, which potentially outlive the referenced products. Alternatively, we could update the product pointers during change tracking, but that would be tedious and error-prone. [ChangeLog] Fixed possible crash on storing a build graph after re- resolving. Change-Id: I09bcf638a17da410198524858eb4c1bda59bebcb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix potential inconsistency in Artifact dataChristian Kandeler2018-08-102-4/+4
| | | | | | | | If safeConnect() returns false, we must not add that "child" to the list of children added by scanners. Change-Id: Icbb1b2d14d99f002e2370ee2bda25daafb0398b2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix potential false caching of module prototypesChristian Kandeler2018-08-109-25/+66
| | | | | | | | | | | | | | | | Our code assumed that products with the same profile and the same multiplex configuration would also evaluate a module's condition to the same value, which is not true: Properties such as qbs.architecture, which are commonly checked in module conditions, can be set in a product item independently of multiplexing. We now evaluate the module condition for every product. According to our benchmarker, the slowdown is a very modest 2% and does not appear to increase for larger projects. This patch amends 08ce978733, which tried to address the same problem, but succeeded only for a subset of the possible cases. Change-Id: I992e0f0d5cf207949cf5d863f242b9476ecdfc05 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Fix edge case in Depends.productTypesChristian Kandeler2018-08-084-0/+63
| | | | | | | It makes no sense to consider multiplexed variants of the same product. Change-Id: I7ebee091264451dc587156a0c543932059ed9948 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-08-021-0/+1
| | | | | Change-Id: I0243ca9cad9fcd5506a27b4b752f915633c9b493 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Add a changelog for 1.12.1Christian Kandeler2018-08-021-0/+6
| | | | | | | To be kept in sync for all upcoming commits. Change-Id: I96e79bad9d98137dcf4ec90da6622e7058af6e24 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* GCC: Allow the -march option to be set in project filesChristian Kandeler2018-08-022-3/+7
| | | | | | | | | It is unrealistic to cover all its possible uses via dedicated properties. Task-number: QBS-1018 Change-Id: Iacfb9617ef130255c35766f057c60be9f816bca2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix OOM crash in QRC scannerJoerg Bornemann2018-08-011-3/+5
| | | | | | | | | | | | | | We implicitely created a QByteArray with the file content without passing the file size. This would result in copying the whole mmapped file into memory, and potentially much more if there's no terminating null byte. Fix this by using QByteArray::fromRawData which we pass the correct file size and which doesn't copy the data. Task-number: QBS-1375 Change-Id: I35c4cceba64343550094c29298ff9b3617718dac Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ModuleLoader: Suppress bogus subsequent errorsChristian Kandeler2018-07-311-1/+23
| | | | | | | | | This is only relevant for relaxed mode (used by IDEs). We try hard not to cause bogus subsequent errors in the first place (see cadb0864c9), but in some edge cases we still run into them, and will drop them now. Change-Id: I0a12086c29f9e9f6b647902eaaf634c8ea0a094d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* GCC: Fix ldconfig ProbeChristian Kandeler2018-07-311-2/+6
| | | | | | | | | There can be additional content on a line of ldconfig output after the colon. Task-number: QBS-1372 Change-Id: Icb24f02951d323f00f8c3bd25f61021f3bf72839 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix false positives in artifacts map change trackingChristian Kandeler2018-07-307-24/+161
| | | | | | | | | | | | | | | | | | | | | We used to invalidate a script if it accessed the artifacts map and that map's keys are now different from what they were. However, that logic was too coarse: All rules that run after the command will add new artifacts, so such changes will be the norm, at least when the project is built for the first time. As a result, some artifacts might get rebuilt unnecessarily on the next qbs invocation. The reason why we did it that way was that we needed to consider the case where a script iterated over the elements of an artifacts map, e.g. using a for..in loop. In such a case, we cannot know which part of the map the code is interested in and the script needs to be re-run if the keys change. This is now solved with the help of a QScriptClass, which informs us if a script enumerates the keys. In all other cases, the script only accesses well-known tags, so we only have to compare the respective artifact lists and do not care about other keys getting added or removed. Change-Id: I182a50c34ece28f7ff3f7eba7a8f246e9b79b30e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make sure product type and artifact file tags are sortedChristian Kandeler2018-07-303-3/+5
| | | | | | | | | ... when accessed from JavaScript. Due to the FileTag class being based on Id, we sometimes get a different order of elements, leading to false positives in change tracking. Change-Id: Ie2f1a2e9a229fddcd479175323dded3a80bb02e5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* GCC: Only consider absolute paths for the system paths checkChristian Kandeler2018-07-301-2/+2
| | | | | | | | There is no reason to pay for the call to canonicalFilePath() if the candidate is not an absolute path. Change-Id: Ief39a72ef8967c1315fe6665e1b2795da168027e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Install missing header fileChristian Kandeler2018-07-202-1/+2
| | | | | | Task-number: QBS-1370 Change-Id: Ib541db1c783a6b7878d1712fd735dbb4779d2d96 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Version bumpChristian Kandeler2018-07-192-3/+3
| | | | | Change-Id: I3f2db0a0388c34dde148506b9081dbaaea03de25 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* API: Consider auxiliary inputs when collecting transformer datav1.12.0Christian Kandeler2018-07-121-0/+5
| | | | | | | | | All auxiliary inputs are guaranteed to be present when a rule's commands run, so they must be added to TransformerData::inputs. Change-Id: I4c58f567ab603868aae180d931225edf7f9dcbf9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update link for minimumWindowsVersionOrgad Shaneh2018-07-111-1/+1
| | | | | Change-Id: Ibb98b4a9166e3cd61fe9aacd0e6a5a2eb9eb7624 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-07-111-0/+1
| | | | | Change-Id: I3577f425e40e1c19e5876e5d71f27455779a330e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Consider Rule::excludedInputs where neededJoerg Bornemann2018-07-103-1/+6
| | | | | | | | | ...and add an assert that ensures that excluded inputs never appear in the rule application. Task-number: QBS-1171 Change-Id: Ia71c3224807bd9370f0d5048db45d6f9fb570fa1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* MSVC Probe: Expose WindowsSDKVersion and WindowsSdkDirJoerg Bornemann2018-07-101-1/+2
| | | | | | | | Those two environment variables are needed for the WinRT build of Qt. Task-number: QTBUG-68144 Change-Id: Ib07c86971ffb7951b2c533b6e900bf6247e9f08f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* MSVC: Suppress "performing full link" messageOrgad Shaneh2018-07-101-1/+1
| | | | | | | | | | | | Building a DLL in debug mode for the first time shows the following error message, which also causes the entire command to be printed out: LINK : F:\Projects\...\Library.dll not found or not built by the last incremental link; performing full link Change-Id: I17d530e184074796b17178ae9efce66bc877ffa2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update the timestamps of file dependencies of rescued artifactsChristian Kandeler2018-07-104-2/+11
| | | | | | | | | | | Resetting the timestamps of file dependencies happens per artifact before the rescue procedure, so any dependencies added there must get their timestamp reset explicitly. Task-number: QBS-1359 Change-Id: Iec22b105a4132ada65b52391d4212c3b9ba52a2a Reviewed-by: Ola Røer Thorsen <ola@silentwings.no> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* benchmarker: Fix crash when called with no parametersChristian Kandeler2018-07-101-1/+8
| | | | | | | The crash was accidentally introduced in da6c0e5058. Change-Id: If3a1ed1633fc8bb6aaf736859a89e1b7c17777c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-07-061-0/+1
| | | | | Change-Id: I0ecc59ff2277be198415332af405394043fa77d4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-07-061-0/+1
| | | | | Change-Id: I365acd2eb6fd27d3b31bcf7d84c00039166781ec Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix TestBlackbox::pluginDependency on MacChristian Kandeler2018-07-051-2/+4
| | | | | | | | One of the checks fails in 1.12, because we still list "qbs" as an input file tag in the bundle module. Change-Id: I8f033e4dc653989b153182c11e6607afe5658e6e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ModuleLoader: Fix misleading error messageChristian Kandeler2018-07-045-0/+21
| | | | | | | | | If a product could not get properly loaded and a per-product property override was given on the command line, we used to erroneously complain about the property override instead of reporting the real error. Change-Id: I1cbbc8ff9b6dcd453563c4745778576342862ca3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Cover dependency parameter change tracking in autotestChristian Kandeler2018-07-042-2/+20
| | | | | Change-Id: I180feccc60857a5431e1c55354e478824f62b6fe Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove quotes and escaping from debug logsOrgad Shaneh2018-07-035-27/+28
| | | | | | | | | | | Before: qbs.exec: adding leaf "RULE [c_pch][c_pch_src] [test] located at F:\\Projects\\qt-creator\\build-qtc\\share\\qtcreator\\qbs\\share\\qbs\\modules\\cpp\\GenericGCC.qbs:616:18" After: qbs.exec: adding leaf RULE [c_pch][c_pch_src] [test] located at F:\Projects\qt-creator\build-qtc\share\qtcreator\qbs\share\qbs\modules\cpp\GenericGCC.qbs:616:18 Change-Id: Ia1bcc197b9ce71934febbde7515b5d71d3cde0db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Autotests: Prevent another false positive on slow CI machinesChristian Kandeler2018-06-291-0/+1
| | | | | Change-Id: Id35b1843da772f703f1b2cb60487f9513c0a8efc Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Autotests: Allow to parameterize the "file unlock grace period"Christian Kandeler2018-06-292-4/+13
| | | | | | | | ... via the environment. This should help reduce false positives in our CI. Change-Id: I28492b4e476289f2d9418a272b167d9a679ebc5f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* GCC: Do not add non-existing paths to cpp.systemRunPathsChristian Kandeler2018-06-281-1/+2
| | | | | | Change-Id: Ib8db4e47b9f9982152b46ec7ada4696456185cf4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* GCC: Filter libraryPaths for entries from systemRunPathsChristian Kandeler2018-06-261-1/+10
| | | | | | | | | ... when constructing the command line, the same way as we already did for rpaths. Change-Id: I7d69e85fe4ba9a5659653a941adcdbe6cc328a67 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Do not crash on invalid property assignment in Export itemChristian Kandeler2018-06-263-0/+33
| | | | | | | | | | | The crash would happen when creating the export information for a product whose Export item contained an assignment of the form "x.y: original", where x is not a module and the assignment was inside a Properties item. Task-number: QBS-1362 Change-Id: I900857fcd97852360ec2b75de1b7a791fd948dc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix module property access trackingChristian Kandeler2018-06-251-6/+8
| | | | | | | | | Track all accesses, regardless whether the value comes from the cache or not. Accesses are tracked per transformer, but the cache is per product/ group. Change-Id: Ia0c856268fe6a3f199103a89604cd3909e6a4308 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* setup-android: Fix case where there is only one architectureChristian Kandeler2018-06-251-2/+6
| | | | | | | | There is no multiplexing in that case, so we have to set qbs.architecture instead of qbs.architectures. Change-Id: I2f96bfd6b67a6ef45882ba5ce9eb35ab2317e8b2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Provide an error location for invalid property assignmentsChristian Kandeler2018-06-253-14/+32
| | | | | | | | | | ... of the form "x.y.z: value", where there is no module x.y. The errors printed in this case did not have a location, because none of the value items are proper module instances and we did not keep track of the chain of parent items. Change-Id: I2da4da7beb5bd6f6d185a63c90d42340c9e30492 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Properly diagnose invalid module property assignmentsChristian Kandeler2018-06-256-5/+84
| | | | | | | | | ... if the non-existing module name has more than one component. We inadvertantly skipped the check in that case. Task-number: QBS-1362 Change-Id: I1fcababee1ea70c3133bd1b1c8f8f32f8450a0e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix the exportsQbs autotest for mingwChristian Kandeler2018-06-251-1/+1
| | | | | | | | Fun fact: If the file path you pass to the linker via -o does not contain a dot, then mingw will append ".exe". Change-Id: I4a4133c99fc63fd91e47c905ca902d3eb26b1146 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix rule input tags in the Exporter modulesChristian Kandeler2018-06-223-6/+31
| | | | | | | | | | We need to make sure all the artifacts are present in the build graph before writing the respective interface file, but we don't need to rewrite it if these artifacts are rebuilt. So use auxiliaryInputs instead of inputs. Change-Id: I82dee65f6630a0bbd24245df9100e4dabf0320f2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Benchmarker: Keep the temp data in case of a failureChristian Kandeler2018-06-221-5/+8
| | | | | | | So the problem can be more easily investigated. Change-Id: Ia968a4e42164cce5b3f67d9e8a29ccd5b24e3eaf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* 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>
* Don't link to multiplexed libraries when depending on the aggregateAlexandru Croitor2018-06-206-0/+76
| | | | | | | | | | ... library, this can lead to warnings or linker errors. Most easily seen on macOS when multiplexing across multiple architectures, and an app ends up linking against multiple multiplexed variants of a dependent product library. Change-Id: I4ea4b419099a1010f7b8c32ee11079da93f1d236 Reviewed-by: Christian Kandeler <christian.kandeler@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>