aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Input scanner: Prevent resolving directories as included filesChristian Kandeler2016-11-181-1/+4
| | | | | | | | | This can otherwise easily happen, in particular with C++ standard library headers that don't have file extensions. Change-Id: I30529271278f567e6cb26054ea3b01df7efcfbfa Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* qbs build: Use correct module name "Qt.testlib" instead of "Qt.test"Christian Kandeler2016-11-181-1/+1
| | | | | Change-Id: I124b339edf6f3c466e85a361ace9849003e51812 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge 1.6 into 1.7Christian Kandeler2016-11-171-0/+2
|\ | | | | | | Change-Id: Ie25088c964f0d47ea8dde639667ebf85264615fe
| * Fix bug that causes re-linking on every build on Linux1.6Christian Kandeler2016-11-141-0/+2
| | | | | | | | | | | | | | Introduced by d0516e8473. Change-Id: I5bf9e9acab9485ba47c4f5b02e7b0c4ae2493266 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix include path order in C++ dependency scannerJoerg Bornemann2016-11-171-27/+13
| | | | | | | | | | | | | | | | | | | | The list of include paths must not be stored in a temporary set. Otherwise the order of include paths is undefined. Also, since introduction of merged top-level modules in commit 16404c35 we don't need to recurse through the dependency hierarchy. Change-Id: I50a843fc85dbf1cb04883774d43e5904da815579 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Warn against possibly improper use of JS extensions in qbs project filesChristian Kandeler2016-11-117-1/+99
| | | | | | | | | | | | | | | | | | | | For instance, we inform users when they are doing potentially slow File I/O operations during project resolving and advise them to use a Probe instead. Task-number: QBS-1033 Change-Id: I3e9d0eb36c6ddebc5f4a112c329f96d25856ac0a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Speed up qbs-setup-toolchains for MSVCJoerg Bornemann2016-11-103-25/+65
| | | | | | | | | | | | | | | | | | | | | | | | Determine the compiler's version by preprocessing a file containing _MSC_FULL_VER instead of compiling and linking a program to determine all compiler defines. With this change qbs-setup-toolchains needs less than 1/2 of the time to detect MSVC installations. Change-Id: I254e6c6d3abe489b328e979228e8b21f8d92f39c Task-number: QBS-866 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Refactor MSVC toolchain detectionJoerg Bornemann2016-11-106-110/+141
| | | | | | | | | | | | | | | | | | Have one MSVC object per MSVC installation instead of one MSVC per VS installation with some list members. This cleans up the code quite a bit and prepares for VS 15 support and speed improvements. Change-Id: Idf6759e5b05584532f56be4036c87df310363bd3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Make list properties overridableChristian Kandeler2016-11-105-13/+66
| | | | | | | | | | | | | | | | Users should be able to "opt out" of values inserted by modules outside their control. Change-Id: I4f641b50ea203054759453402fa1e1795f6df4dd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Let nested groups inherit the parent group's file tagsChristian Kandeler2016-11-101-2/+6
| | | | | | | | | | | | | | Tags should behave the same as module properties in that respect. Change-Id: I5cbfde9c2cf90eef93feef0a8ffd894309341577 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Enable evaluation cache for module validationChristian Kandeler2016-11-104-28/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the modules have been merged and all Probes have run, the cache can be enabled, preventing unnecessary re-evaluation of properties accessed in the validation script. Output of qbs_benchmarker on Linux using qbs itself as the test project: ========== Performance data for Resolving ========== Old instruction count: 1817936584 New instruction count: 1696757221 Relative change: -7 % Old peak memory usage: 2714982 Bytes New peak memory usage: 2743848 Bytes Relative change: +1 % This does not technically fix the bug mentioned below, but alleviates the pain caused by it. Task-number: QBS-1033 Change-Id: Ib0041067ff82a2f4b1818e6f76259d544e5184bd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Use string sharing when serializing file tagsChristian Kandeler2016-11-108-80/+61
| | | | | | | | | | | | | | | | On my machine, the on-disk build graph of a freshly resolved Qt Creator super project goes down by 12% with this patch. Change-Id: Ic86b4ba31769d7d4af407b24a0ee9845cf943a79 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Use string sharing when storing the propertiers of rescuable artifactsChristian Kandeler2016-11-092-3/+4
| | | | | | | | | | | | | | | | | | We mindlessly dumped the properties into the datastream directly, causing the size of the build graph to temporarily grow by an order of magnitude. Change-Id: Iee09cb6608443aec65b799ca9a9afe98098619f8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge "Merge 1.6 into master"Christian Kandeler2016-11-0912-69/+388
|\ \
| * | Merge 1.6 into masterChristian Kandeler2016-11-0812-69/+388
| |\| | | | | | | | | | Change-Id: Ifa54c1fdcb045596e19a8e453c14bc797d199da5
| | * Executor: Fix dynamic rules with generated inputsv1.6.1Christian Kandeler2016-11-081-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has never worked, as the condition that was supposed to collect such inputs always evaluated to false. Task-number: QBS-1029 Change-Id: Idf3f86f12fa050a3d151f4551821bf4395f715d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Executor: Only abort engine evaluation if engine is really evaluatingChristian Kandeler2016-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | Otherwise, crashes in QtScript have been observed. Change-Id: I5ef716ce6577f68d548b16ed682013fdc75e4005 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Add missing qHash() function for QualifiedId classChristian Kandeler2016-10-311-0/+1
| | | | | | | | | | | | | | | Change-Id: Id616ca2a538b4ff7f6c88b129540966a866c50eb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Fix module property assignments in Group itemsChristian Kandeler2016-10-3113-66/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, list properties were quite broken in the Group context. Task-number: QBS-1005 Task-number: QBS-1026 Change-Id: Id94fee42fdceb28f9a1ae541c293213095d6bb2c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Do not use fromLocal8Bit() for string literalsKai Koehne2016-11-0815-41/+40
|/ / | | | | | | | | | | | | | | | | | | The current locale encoding does have nothing to do with string literals. Use fromLatin1(), which tends to be the fastest for ASCII. Change-Id: I9f1ff603f26812a63e5b23a413ba240c47d5ac23 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Allow JavaScript expressions when overriding propertiesChristian Kandeler2016-11-081-1/+3
| | | | | | | | | | | | | | | | I mistakenly believed that already worked, but we had only implemented it for qbs-config. Change-Id: Ifb8bfabf2e4f5d6bfa2accb8a120a35c3c863936 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Assume UTF-8 encoding for qbs project filesChristian Kandeler2016-11-083-4/+8
| | | | | | | | | | | | | | | | Like QML has been doing forever. Task-number: QBS-941 Change-Id: I0e46003740b68f2172c623043a0861910c1fe29d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Attach information about the context to our script engineChristian Kandeler2016-11-079-8/+35
| | | | | | | | | | | | | | | | Certain operations might want to know what the script engine is currently doing. This will be used in a follow-up commit. Change-Id: I90167c29e94e0f77c7d5ccf20787e9749434e728 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Fix potential null pointer access in build graph loaderChristian Kandeler2016-11-041-1/+1
| | | | | | | | | | | | Task-number: QBS-1031 Change-Id: I8cff742317583f98dff5f6f2a26963ee4bf5d46a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Append minor version number to soname of all qbs libsJoerg Bornemann2016-11-031-0/+7
| | | | | | | | | | | | | | | | | | For the qbs build this feature is turned off to be able to build qbs 1.7 with qbs 1.6. Task-number: QBS-1002 Change-Id: I983b61c870f8516fb992e2379c5acb86f02dc104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge "Merge 1.6 into master"Christian Kandeler2016-10-283-14/+16
|\ \
| * | Merge 1.6 into masterChristian Kandeler2016-10-283-14/+16
| |\| | | | | | | | | | Change-Id: I7ae9ebf1bd9ff2f4062a20dbd50333d055f8f6c3
| | * Fix the value of "original" for list propertiesChristian Kandeler2016-10-282-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | It has to be the empty array in that case, as otherwise the value from the module prototype will get duplicated. Change-Id: I444342ce106fc6b9e302c0df18716906e926e966 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * Add module instance as scope to cloned module prototypeChristian Kandeler2016-10-243-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... when evaluating the "prototype part" of list properties. This is necessary so that other properties appearing on the right-hand-side of the property use the value from the instance instead of the one from the prototype. Task-number: QBS-845 Task-number: QBS-966 Change-Id: I7b6c7d068e45f4805422c887239ec81b5c661880 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Add support for generating qrc filesChristian Kandeler2016-10-281-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog] Added support for generating qrc files. Change-Id: I9c5d703fcb6f8c14606d5abf66e8edfd4959f364 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Add missing qHash() function for QualifiedId classChristian Kandeler2016-10-261-0/+1
|/ / | | | | | | | | | | | | I do not know why the project builds on my machines without this patch. Change-Id: Ic7145173d4667cb88748936dc36d43e8415c5ee0 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Do not needlessly re-evaluate module properties in GroupsChristian Kandeler2016-10-257-26/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a Group that contains at least one module property assignment, we used to re-evaluate all module properties. This was of course immensely wasteful, as there are normally only a handful of properties in need of re-evaluation. We fix the problem in the following way: - When evaluating a product's module properties, keep track of the dependencies between them. - For all Groups of that product, re-evaluate only the properties which are either explicitly set in that group or have a dependency on such a property. Here's the output of qbs_benchmarker, using qbs itself as the test project: ========== Performance data for Resolving ========== Old instruction count: 2083482809 New instruction count: 1696643887 Relative change: -19 % Old peak memory usage: 2997349 Bytes New peak memory usage: 2704033 Bytes Relative change: -10 % I've also profiled with the Qt Creator super project (not using valgrind, as that would take ages). For that project, this change halves the time spent in the ProjectResolver, while the overall resolving time goes down by about a third. Note that we could potentially use the gathered dependency data in change tracking as well, provided we manage to find out what exactly changed in the project files. That should result in an improved experience for IDE users. Change-Id: I6ceffe7a6f0421617f53a4dd2eade51993c2785f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add support for the QtScxml moduleChristian Kandeler2016-10-203-0/+71
| | | | | | | | | | | | | | [ChangeLog] Added support for QtScxml module. Change-Id: I1ad8d51a3d9532d4a24270e4cc13f26f51620b07 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Modules: Adapt to introduction of built-in "version" propertyChristian Kandeler2016-10-192-2/+1
| | | | | | | | | | | | | | | | - Remove redefinitions of the property. - Set the property, where applicable. Change-Id: Ie3f4bd3c4cc9b809667287045c10b22ff6b71e21 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Take relaxed error handling mode into account in more placesChristian Kandeler2016-10-192-11/+30
| | | | | | | | | | Change-Id: I01c218ec244427e2a56697c457f02728a89ff020 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge 1.6 into masterChristian Kandeler2016-10-177-16/+112
|\| | | | | | | Change-Id: Ie98233d955f3695da0b20069fb2317931e353e4e
| * Convert null variant values to empty listsChristian Kandeler2016-10-142-3/+14
| | | | | | | | | | | | | | | | ... if their declared type is a list. This is a workaround for QTBUG-51237. Change-Id: Ie9e02f5fd125ce73b993e59af0e3dc2b47fe14c1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Extend the autotest for module property assignments in GroupsChristian Kandeler2016-10-114-13/+94
| | | | | | | | | | | | | | | | So that we won't accidentally fix only one special case. Task-number: QBS-1005 Change-Id: I2093fd1569880f1ad683118cdd8df2576039f5f2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Cleanup remaining qbs_dummy files on detection of the MSVC environmentThomas Epting2016-10-061-0/+4
| | | | | | | | | | | | Task-number: QBS-1024 Change-Id: I2ec6b941d77bc769d119f30cac5b0f621db8930f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Time more operationsChristian Kandeler2016-10-1019-74/+323
| | | | | | | | | | Change-Id: I1aa46693cb71fe284083ee5305ce2650de1307ac Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | API: Fix off-by-one error when setting the install file pathChristian Kandeler2016-10-072-3/+5
| | | | | | | | | | | | | | The first character of the install file path would get cut off. Change-Id: I7f7609c08202c009a5a64d062a361e75d789928b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Do not auto-convert values to property typesChristian Kandeler2016-10-065-35/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JavaScript-style conversions are often unexpected and mask user errors. They also make a mockery of our type system. The exceptions are as follows: - Boolean properties are still auto-converted according to the JS rules, because otherwise user code would get tedious to write. - Lists of strings can still be assigned a single string, so the convenience pattern "files: 'main.cpp'" still works. This patch also fixes some bugs in our own modules that were uncovered by the change. [ChangeLog] Added stricter type checking for properties. Task-number: QBS-1013 Change-Id: I282c23eca3b3877c5551a49ef5c6dd8da91488fe Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Improve the TimedActivityLoggerChristian Kandeler2016-10-067-23/+16
| | | | | | | | | | | | | | | | | | | | - Get rid of the debug level parameter. Either we want to log the elapsed time or we don't. Enabling timing in verbose mode only is dubious anyway, as the debug output can influence the result. - Log the time in more sensible places. Change-Id: I1ced2a1d30cd015a9562d46079933db5ea69641c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | ModuleLoader: Remove redundant property checksChristian Kandeler2016-10-021-0/+4
| | | | | | | | | | | | | | | | | | | | This has a considerable performance impact for larger projects. Example: When resolving the Qt Creator project on my machine, the patch speeds up the property checking process by ~98%, while the overall resolving time goes down by ~15%. Change-Id: Ifd3e3fb4840a4b089f50f5de8e826cab7c6e5c5c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Fix "restoredWarnings" autotestChristian Kandeler2016-09-301-4/+7
| | | | | | | | | | | | | | | | Depending on the platform, one of the warnings can appear more than once. So let's not count duplicates. Change-Id: Ic4778415418dc7898a54d07979d48941c1654c9a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Re-display warnings when loading a stored build graphChristian Kandeler2016-09-3032-47/+130
| | | | | | | | | | | | | | | | | | [ChangeLog] Warnings encountered during project resolving are now stored and will be re-displayed when the project is loaded. Task-number: QBS-1011 Change-Id: I5fa04d3d537866212abbdf739b09a254843de473 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Merge 1.6 into masterChristian Kandeler2016-09-3012-37/+45
|\| | | | | | | Change-Id: I5a0de1ab1c38080d6061045d28fa9220a88ef4ba
| * Handle Q_NAMESPACEBogDan Vatra2016-09-283-2/+6
| | | | | | | | | | | | | | Q_NAMESPACE will be introduced in Qt 5.8 which is used to add metafinfo to a namespace Change-Id: I16eacc488e9d9705305ced0847d3ad7bc8557292 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Fix race conditionsChristian Kandeler2016-09-092-24/+19
| | | | | | | | | | | | | | | | Static variables must be initialized in a thread-safe way, because resolving for different profiles happens in parallel. Change-Id: I5d9b5e1233773e2e4371194df0501f4c2670396a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Fix undefined behavior in command line parserChristian Kandeler2016-09-085-6/+5
| | | | | | | | | | Change-Id: Ifa6b8b67f897d5405f7ec118ddf76831077ccfed Reviewed-by: Jake Petroules <jake.petroules@qt.io>