| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: Ic9ee11d628ba278271517aae0af020aec28ecbf7
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... when redirecting process output. Only do that if there is an output
filter function. Otherwise, we break redirection of binary data.
Fixes: QBS-1488
Change-Id: Ic5a1d2653fa8fc9c4f0eb5d31b7315d7aba3e030
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|/
|
|
|
|
|
| |
Task-number: QBS-1454
Change-Id: I6e2514d10cca0cba0a14456ecd2abfb495539ee4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
|
| |
This fixes -Wclazy-range-loop
Change-Id: I08a435b700017cdbe27fbfdbda6e26840d9a3568
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
|
|
|
|
|
|
|
| |
Use nullptr instead of 0.
Change-Id: Id5b7933844730e244a2dcf3fcebf24f9f048047f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pure file name that the description usually contains does not always
provide enough context: It's not necessarily clear from a file name
which product it belongs to, and some files can be built as part of more
than one product.
Because we print the full product name, including the multiplexing
information if necessary, we also remove the JS code that provided this
kind of disambiguation for GCC compiler and linker rules only.
[ChangeLog] Command descriptions now also contain the product name.
Change-Id: I9702a6cff3faffb086e5c93e02fffa6e65fb1043
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The checks that determine whether to re-run prepare scripts and/or
commands due to property or environment changes do not belong into the
build graph loader. Instead, we now do them on demand during the build
process. Advantages:
- The code is at its "natural" place, making it easier to understand
and less fragile.
- There are a lot fewer unnecessary build data invalidations, speeding
up both re-resolving and rebuilding in case only some rules/commands
have changed.
- Re-running commands due to property or environment changes no longer
implies re-running prepare scripts.
- We now catch property changes on generated artifacts, which was not
possible before, because the build graph loader only had access to
the source artifacts of the re-resolved project.
Change-Id: I36b022cf631fa9e8293feec4d6f416c2686539c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The value of Command.environment is supposed to be added to the general
build environment. Variables containing lists should be merged rather
than overwritten, as the code has done so far.
This is difficult to get right in the general case, as we'd need a way
to find out which variables contain lists. For now, use a fixed set of
well-known and important path list variables (PATH is particularly
relevant).
Change-Id: I860302550b8005cbe10ee7d06dcca2b5edfaf475
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|
|
|
|
|
|
| |
This is a simple find and replace with manual sanity check.
Change-Id: Ia733befe7885dc3c643d5c84e151312bfd86a3c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suppose there's a rule script that opens a TextFile and does a lengthy
operation. If a ProcessCommand finishes that has a filterOutput script
set, then it might happen that we call QScriptEngine::execute from a
QScriptEngine::execute callstack. After the inner execute finishes we
would auto-close the TextFile, unexpectedly for the code of the outer
execute call.
Delay ProcessCommand::onProcess{Finished|Error} if the ScriptEngine is
already active to avoid this situation.
Change-Id: Ibad32732f7efe9d5dbfbe1fdc143c0ea109dbb34
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: I6bcd8a9da77b68800bbced425ebf99ea6f83c413
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
| |
Change-Id: Id06bc8b14aa31cb0dafa621477ca072952532099
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
command-line mode prints in a form that is directly copy-paste'able
into a shell for re-execution, so command-line-with-environment should
as well. On Windows the format remains unchanged, because it's not
possible to set local environment variables for a command.
Change-Id: I5e7a9db297fcbeda821f7b6b5e176d340b2c43cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
| |
Task-number: QBS-946
Change-Id: I2fb5d573f7caf44f96fd4a96fd5069a44cdfb16a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
| |
We will make use of that in a follow-up patch.
Change-Id: I1fb6ca0938bbcc6f53bd0046761023a1b8563949
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
| |
This will make it easier to experiment with exchanging Qt containers
for STL ones, for instance.
Change-Id: Ie591fa54b5241ad4841b1ebcfb78b72932cd2b38
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
| |
Change-Id: If7e3a60f1b927e89f4a515d2f95beda7c3d1c665
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux (and very likely other Unices as well), QProcess::start()
incurs a certain overhead, because forking off the child process
duplicates some of the parent process' resources. This overhead appears
to be proportional to the amount of memory allocated by the parent
process, presumably due to page table entries getting copied. This has
consequences for qbs, particularly when being used from an IDE such as
Qt Creator, which has a higher memory footprint than the command line
tool. When using a high job count, as is typical on machines with lots
of CPU cores or in a distributed compilation environment, the following
problems were observed:
- High CPU load in the starting process (Qt Creator). Profiling
showed that most of the time was spent in fork() and related
functions.
- As a result, the number of parallel jobs stalled at a value
well below the requested one, slowing down the build.
- In some cases, QProcess::start() failed altogether, emitting
a message such as "fork() failed: Could not allocate memory".
We solve these issues by outsourcing the starting of ProcessCommands to
a dedicated launcher tool with modest memory requirements. For each qbs
process, we have one instance of this tool running while a build job is
going on. Communication with qbs happens via QLocalSocket. The protocol
is encapsulated in a QProcess replacement, so almost no changes to
existing code were necessary.
No performance regressions were observed when using lower job counts.
This patch will also enable us to properly support the incredibuild tool
in IDEs such as Qt Creator, which you do not want to start via
ibconsole.
[ChangeLog] Improved scalability of parallel builds on Linux by starting
Process commands via a dedicated launcher process.
Change-Id: I8966c00a2d67a94c3a380f0e089d61eda122209e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The pair in tools/buildgraph becomes rulecommands.{cpp,h}
The pair in parser becomes parsercommand.{cpp,h}
This resolves a conflict which prevented compilation of the entire
set of qbs sources with MSVC and the /Fo option.
Change-Id: Ic909d02a230d8e59f3bf4d00fc895bf54739961a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By using q<lowercase>.h headers, we become more bootstrap-friendly, as no
full syncqt is required any more.
In the same go, prefix all includes with the module name. This helps
grep-based analysis of which parts of Qt are used and where. It's also
consistent with Qt's public headers (where syncqt enforces the style).
Testdata and examples are excluded from the change, as they are not
relevant for bootstrapping.
Change-Id: I9539b1d795e87fca6e5fc6c91acbb775b79208d9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Patch-set 2 includes *.cpp *.c
Every source file needs to have up-to-date license
headers in order to pass ci.
Change-Id: Ie6e493097af6f7dd6a8adff170eb856f496e689e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
doc/reference/items/transformer.qdoc
share/qbs/modules/cpp/GenericGCC.qbs
Change-Id: I45560834560019b18274c373c45651eb8aadd206
|
| |
| |
| |
| |
| |
| | |
Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
The heavy lifting was done by clazy.
Change-Id: Ibb13c517567b1b32bbda6d26225454d1b003934d
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows these commands to run even in dry-run mode. This is for
internal use ONLY in building the helper tools for Java, TypeScript,
etc., dependency tracking and is not intended to be exposed to users.
Change-Id: I36130131363aa6247f10b9824726f73df9d7031f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: I85f81532d88798d71cb88552dd150189d72829bd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This bug fix adds quotes around arguments with spaces
or tabs in the response files. It also escapes quotes
if they're found in the argument list.
Task-number: QBS-812
Autotest-by: Joerg Bornemann <joerg.bornemann@qt.io>
Change-Id: I4f4479e413b467e64f55c3068475d0dbb1990798
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Philip Schuchardt <vpicaver@gmail.com>
|
| |
| |
| |
| |
| | |
Change-Id: I88213103519ae4f69fedb4fe535c9c44e3b61d03
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The global object was reset too early. Introduce RAII class for
setting/resetting the global object safely.
Change-Id: Ib04d5021a8dcb64974c54cf44721ef642d227d21
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This functionality is undocumented, has its flaws and is unavailable in
other JS engines. Use the following pattern instead to inject global
variables without polluting the global namespace:
QScriptValue g = engine.newObject();
g.setPrototype(engine.globalObject());
// set properties on g
engine.setGlobalObject(g);
engine.evaluate(...);
engine.setGlobalObject(g.prototype());
Change-Id: I5f92da8cccfa23c3722740c1852a71fd50e8eb8a
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
| |
Bug was introduced by a3b5c6e944.
Change-Id: Ic7a0a9dfa7f009905880dd6613e37bae4b74a3d2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
- Get rid of code duplication.
- Simplify code flow.
- Fix potentially erroneous overwriting of error status.
Change-Id: Ic7e3babe707e6d9e5c8c478de0891a5adecc0875
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I0516527408d44b8f78d8da1fc65cdf609babfbc6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
|
|
|
|
|
|
|
|
| |
We achieve this by forwarding QProcess::ProcessError instead of
QProcess::ExitStatus.
Change-Id: Id4b9ac7facbb92281e0a11da635131145114be9d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
This fixes an issue causing extremely long command lines to fail on
Windows when used in conjunction with cpp.compilerWrapper.
Change-Id: I7c844eeb00f9068d84e8c4fdcdf20db658438bbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Defaults to the command line invocation for Commands, and defaults to
the description for JavaScriptCommands.
Change-Id: I7bddb6591b7fdbffc2c08134f35471c0d2725cf9
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Meaning that we check whether the value is an error or the engine has an
uncaught exception, and print the respective string.
Change-Id: Ie2912e28a82906c7ee9323e2f0e55c6b3de96872
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I8f9daa08dc0822b74b9cc4d255bce2b170b55b59
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Previously, it would display the command that was entered ("cmd") vs
the command that was actually used ("C:\Windows\System32\cmd.exe").
Change-Id: Ia3487f2a0fee4c439d82598f3e2e81650efafa80
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I1c12ce97d0d932a35dae5c1a99b631bfd03eef2e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: If287b7480be854f4bae055ed9d575f16fd6f54df
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I36d825db3a5ef32c162c3063aab1e8a1f2696f4f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
This allows users to hide command output entirely without changing the
logging level. It is also used by the generator command to hide the dry
run command "executions" it performs when creating the build graph for
project generation.
Change-Id: I27a64c8138521001f5b62473b4a3b4ff46d8ba25
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
doc/reference/jsextensions/jsextensions-general.qdoc
src/lib/corelib/language/evaluatorscriptclass.cpp
src/lib/corelib/language/evaluatorscriptclass.h
Change-Id: Ic9b77b56e8fc8bf93e0a553930757de8c93fed22
|
| |
| |
| |
| |
| | |
Change-Id: I092fca9f950de1ba38826c33b155f86feae2770b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
| |
With "qbs build --show-command-lines" one can suppress
command descriptions and show actual command lines instead.
Change-Id: I98328254bad7fb85036abb0525c5ad7e734110c7
Task-number: QBS-615
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
This allows real functions to be used instead of unsafe construction of
function objects from strings.
Change-Id: Ic1b31d0f7984caaac0cf9a5b5a21d085736015b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
|
|
| |
Add LGPLv3 option.
Change-Id: I8a63ad5e46a2701032b2103f791df4dec5b707e8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
| |
Change-Id: I9052b8e895cb638bc4b8a185959c72e6819fb628
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
|