Skip to main content
AgeCommit message (Collapse)AuthorFilesLines
12 daysTypo.Jonah Graham1-1/+1
Change-Id: I4d9ec6da1f02cc41643539c17ba34567ec95ba7b
12 daysBug 575903: Call correct clean methodJonah Graham1-2/+3
The old clean method was removed from use in Bug 571134 but this call to it was missed. Change-Id: I01310a3e3c1f45534e55d146f9480ac323446dd4
2021-08-09Bug 574607 - Compilation Database Parser: reload only active config on changeMarc-Andre Laperle1-0/+3
Change-Id: Ide1d1495a1284ed4d3e9b4cc066a62b2cb55e908 Signed-off-by: Marc-Andre Laperle <>
2021-07-08Bug 574741: Always add main-build to .PHONY.Christian Walther1-2/+2
Addendum to 0436516 (Bug 573502): The main-build target now always exists, not just when there is a pre-build step, so it must always be marked as .PHONY. Change-Id: I478222bcc319c516a6e116f710d8382346b5ded5 Signed-off-by: Christian Walther <>
2021-06-14Bug 526421: Search the icon path from provided contributionJulien Dehaudt1-31/+14
Signed-off-by: Julien Dehaudt <> Change-Id: I7592a5df9b297f54184f754c7e3b0f8d79a6677c
2021-05-24Bug 573722: Allow sub-class to output custom lines in headerTorbjörn SVENSSON2-5/+55
Contributed by STMicroelectronics Change-Id: If7163f33c804dc40bc950da067d81396a26d8f74 Signed-off-by: Torbjörn SVENSSON <>
2021-05-15Bug 573512: Add verbose option for progress monitorJonah Graham1-4/+39
During operations, such as remove projects, the subtask of a progress monitor has useful information for users. However during a normal build there ends up being lots of output that is of little value. Change-Id: Ie5bf95a743e8909242a0224883fd22e49ff55ed6
2021-05-15Bug 573512: Added parameter for removing projects from workspace.Marc Siebenhaar1-6/+119
This is command line option to -remove and -removeAll projects from the workspace. Change-Id: Ice4e7db3485d2a0c698f48dc2aa0662170289f36
2021-05-14Bug 573502: Ensure post-build step is executed lastTorbjörn Svensson1-57/+47
The post-build step may depend on secondary artifacts of the build and should thus be executed last. Contributed by STMicroelectronics Change-Id: Iaf67f6b3e1fcab008798d2712e15d0a6a46ceae8 Signed-off-by: Torbjörn Svensson <>
2021-05-12Bug 571134 - Use the builder argument for cleanTorbjörn Svensson1-5/+13
This allows to clean the correct configuration Contributed by STMicroelectronics Change-Id: Ia47f3694809579f8d6fa6d6e6b0dd46f553d256d Also-by: Torbjörn Svensson <> Also-by: Jonah Graham <> Signed-off-by: Torbjörn Svensson <> Signed-off-by: Jonah Graham <>
2021-05-01Bug 573254: Add the missing ITool parameter to toManagedCommandLineInfoTorbjörn SVENSSON1-1/+11
Contributed by STMicroelectronics Change-Id: I4e9351a8af473bf34f2bc8541461f2b82ffd6262 Signed-off-by: Torbjörn Svensson <>
2021-04-12Bug 568397: Add separate text boxes for separate build command and argsJonah Graham2-9/+72
Change-Id: I078a1db23a69dcbde503b1dd5e496705ecccc956
2021-04-08Bug 572648: Handle cases of empty (EOF) JSON filesJonah Graham3-1/+10
Change-Id: I10fae3542ae75120dad0a59b52aaf7b34a67d8e9
2021-04-06Bug 571309: Use java Collections instead of System.arraycopyJonah Graham1-5/+4
System.arraycopy is more error prone and subsequent commits will be modifying the array. This commit is to keep unrelated code separate. Change-Id: I2490318176da3e631a63974ffe5fa62da44a96ea
2021-03-01Bug 571458: Return verdict of all configsTorbjörn SVENSSON1-23/+26
When invoking the headless build, the verdict should be the "sum" of all the build configurations. If one build configuration fails, then the verdict of the build should also be "failed". Contributed by STMicroelectronics Change-Id: Ic3237d3531657f7f89c9338142ebf8fdb477c481 Signed-off-by: Torbjörn SVENSSON <>
2021-03-01Bug 571566: Document how to choose workspace for headless buildTorbjörn SVENSSON3-62/+3
Moved handling of "-help" to a new plugin using the same approach as was used for the JavaCodeFormatter in bug 543363. This mainly allows to get the help text even if the workspace is missing. Contributed by STMicroelectronics Change-Id: I4ee2e93f0e8fed13ddebd70c3bce58f047aa1d12 Also-by: Jonah Graham <> Signed-off-by: Torbjörn SVENSSON <>
2021-02-26Bug 571433: Make ManagedCommandLineGenerator APITorbjörn SVENSSON9-65/+169
Allow extenders to extend the ManagedCommandLineGenerator in order to add options that are placed on the toolchain node instead of the tool. Contributed by STMicroelectronics Change-Id: I548bcbf72f1290cd4bc0ce830c27ce032a62c9c9 Signed-off-by: Torbjörn SVENSSON <>
2021-02-24Bug 406497: Fixed wrong null checkTorbjörn SVENSSON1-2/+1
Contributed by STMicroelectronics Change-Id: I741bdde5708a7dd4583a3afbb83c5ec8643b8cc0 Signed-off-by: Torbjörn SVENSSON <>
2021-02-22Bug 571384: Rebuild required files when configuration has changedTorbjörn SVENSSON1-6/+27
A change of build configuration should rebuild the artifact. With make, this is achieved by depending on the makefile that contains the rule to build the artifact. If the flags change, so will the makefile do and the artifact is rebuilt. Contributed by STMicroelectronics Change-Id: I56e0376ff9bfa5629b55c1b6c9f94a6f930e0d69 Signed-off-by: Torbjörn SVENSSON <>
2021-02-22Bug 571405: Generate rules with -MT"$@"Torbjörn SVENSSON1-10/+2
When there is a linked file in the project, the build target for the content in the .d file should be the .o file as that is what is depending on the source file. Use "$@" rather than "$(@)" as it's the usual syntax for single letter variables in make. Contributed by STMicroelectronics Change-Id: I6b024b2b3a1a8b061740e99de5e96923981c92fa Signed-off-by: Torbjörn SVENSSON <>
2021-02-20Bug 571381: Generate BUILD_ARTIFACT* symbols in makefileTorbjörn SVENSSON1-0/+55
The symbols generated are: * BUILD_ARTIFACT_NAME Value of "Artifact name" field defined in the build configuration * BUILD_ARTIFACT_EXTENSION Value of "Artifact extension" field defined in the build configuration * BUILD_ARTIFACT_PREFIX Value of "Output prefix" field defined in the build configuration * BUILD_ARTIFACT Assembly of the other values to build the target file name The above symbols make it easier to extend the generated makefile using the provided makefile hooks "makefile.init", "makefile.defs" and "makefile.targets". There is no longer need to duplicate the name of the target artifact in the hooks files. The hooks can for example be used when the post-build step is not flexible enough. By placing the post-build step in makefile.targets, when done properly, will let the user have full control over the sequence, including parallelism, for the required steps. Contributed by STMicroelectronics Change-Id: I163917837b65cb397eb5943c4357a54e9576cf42 Signed-off-by: Torbjörn SVENSSON <>
2020-12-27Bug 565553 - Improve performance of build command parsers with large number ↵Marc-Andre Laperle1-38/+98
of files Add more caches for methods in AbstractLanguageSettingsOutputScanner that are IO heavy: - getFilesystemLocation - determineMappedURI - resolvePathEntryInFilesystem (File.exists) These cut down the execution time of command parsing by around 50% on Windows, more so when considering Java >=12 when File.getCanonicalPath/File caching is not manually enabled. See also and Change-Id: I80828f969547f824d2e45e60b5f4459d03c70bb1 Signed-off-by: Marc-Andre Laperle <>
2020-12-01Revert "Bug 568397: Hide "Build settings" if using custom command"Jonah Graham1-11/+9
This reverts commit 1d226f92731b30e3894ccdf884341e58d9990508. Reason for revert: Due to some concerns about use cases and the desire to resolve those concerns with separate build and args text boxes this is being reverted for 10.1 until this change can be done at the same time as Change-Id: Iffa37087c00f434d4e684eea19ecacde36004b80
2020-11-18Bug 565553 - Improve performance of build command parsers with large number ↵Marc-Andre Laperle1-15/+37
of files When possible, precompute the group number in the replacement expression when parsing option strings, instead of calling replaceAll which is slower. If the replacement expression is not a simple numbered group, fall-back to replaceAll. I have benchmarked this save between 200ms to 2sec depending on the project size. Change-Id: Id48fdcf476e2d1739522c9267e214f4c88bf316a Signed-off-by: Marc-Andre Laperle <>
2020-11-18Bug 568728: Drop execute permission on filesTorbjörn Svensson5-0/+0
Add enforecment script that verifies that only specified file types are allowed to be mared as executable. Change-Id: I4b40e3a46b03bfc78a9dcd52e8bf29cb079b7f3b Signed-off-by: Torbjörn Svensson <>
2020-11-17Do not use deprecated CDataUtil.objectsEqualAlexander Kurtakov5-21/+21
Objects.equals should be used instead. Change-Id: I6713d0d4d0fb8b13b3b336af61cdd73048839969 Signed-off-by: Alexander Kurtakov <>
2020-11-09Bug 568397: Hide "Build settings" if using custom commandTorbjörn Svensson1-9/+11
When unchecking the "Use default build command" checkbox, hide the GUI options to configure the flags as the user should have full control. This solution was discussed in Change-Id: Ifbd67b279db55f5a83f4a660b9a1248e5c021df2 Also-by: cartu38 opendev <> Signed-off-by: Torbjörn Svensson <>
2020-10-04Bug 565553 - Improve performance of build command parsers with large number ↵Marc-Andre Laperle2-9/+118
of files Narrow down parsers based on option string Instead of trying to match all patterns one by one, we can check the start of the option string to be parsed and narrow down which pattern (parsers) should be used. Doing so is much less elegant code-wise as we are "unrolling" the beginning of the patterns by hand, but it gives a good speed up. Around 300ms saved with a test of LLVM code base (~50% of parseOption time) and much larger gains on much larger projects or course. Change-Id: I9e841e7233078d6e38ad08943d98966d0e3c661e Signed-off-by: Marc-Andre Laperle <>
2020-09-26Bug 567334 - Occasional NPE in CompilationDatabaseParserMarc-Andre Laperle1-0/+5
Make sure the project is still accessible before doing the work. It's possible that the project got closed before the job had a chance to start. Change-Id: If02e818394502397e8958d18284160d4f08ca195 Signed-off-by: Marc-Andre Laperle <>
2020-09-13Bug 565553 - Improve performance of build command parsers with large number ↵Marc-Andre Laperle1-1/+15
of files Optimize AbstractLanguageSettingsOutputScanner.findResource by checking under the currentProject first when searching for the IFile corresponding to the parsed file name. When the parsed file name is absolute, we can try to make it relative to the current project and see if it exists as an IFile instead of going through findFilesForLocationURI which is very slow. Having an absolute path for the source file is quite common under the current (local) projet. This saves around 1.5 sec when parsing all commands of LLVM projet as an example. Change-Id: I576a917410e5d5ecbd8e932011555c699b250354 Signed-off-by: Marc-Andre Laperle <>
2020-08-31Bug 553674: Make Binary parsers and related classes AutocloseableJonah Graham1-11/+12
And prepare to make it an error in CDT to not have properly handled an Autocloseable which means a number of fixes to make sure handles are closed. Change-Id: I36cd46017bbce6ece1703d688d7754e523eca68f
2020-08-30Fixed potential NPETorbjörn Svensson1-1/+3
buildInfo is null in the case that the node list is empty. Change-Id: I165ec31eeeab57e1eb7bed0268d0f83c70d6e0f7 Signed-off-by: Torbjörn Svensson <>
2020-08-30Ensure file is closedTorbjörn Svensson1-4/+1
Removed useless catch block that just rethrows the same exception Change-Id: If3e4faea1ed889d4f7b39a7cff786e0aa9a6803d Signed-off-by: Torbjörn Svensson <>
2020-08-28Fixed "Dead code" compiler warningTorbjörn Svensson1-15/+3
Change-Id: Idc18751d1bcd59a8fa49529731e11dce354b925a Signed-off-by: Torbjörn Svensson <>
2020-08-25Bug 418579 - String index out of range: -8Victor Rubezhny1-9/+11
Signed-off-by: Victor Rubezhny <> Change-Id: I02763d18fdf8f9715670b671a7f84f9fe06489ca
2020-08-23Bug 565553 - Improve performance of build command parsers with large number ↵Marc-Andre Laperle1-4/+8
of files Compile a pattern ahead of time and early return. The first pattern is used to trim extra characters that are not contained within the actual option pattern. If this first pattern doesn't match, there is no point in continuing because it is a superset. Times before/after, only counting AbstractOptionParser.parseOption LLVM before: 4289ms, after: 622ms Change-Id: Id40fc9a35359c39aea00ba14813ffe6c343158fc Signed-off-by: Marc-Andre Laperle <>
2020-08-23Bug 566107 - Option parsers can fail to trim extra characters when using ↵Marc-Andre Laperle2-11/+15
patterns with numbered back-references Clarify in the javadoc that numbered back-references should not be used in order for option pattern to safely work. Add a unit test demonstrating the flaw when numbered back-references are used. Update GCC parser as an example for not using numbered back-references. Change-Id: I008b3589486dc9fb0d9d9aa41f7cc2443bf4351e Signed-off-by: Marc-Andre Laperle <>
2020-08-18Bug 564123 Treat environment and build variable case sensitivelyjantje11-71/+16
Remove all equalIgnoreCase and equal with uppercasing for environment variables Change-Id: Ic15974b5fb62413c7b1826ced544ff6d4a8eba2f Signed-off-by: jantje <>
2020-08-03Bug 565457 - CDB settings provider/parser's automatic exclusion of files is ↵Marc-Andre Laperle1-31/+78
very slow Implement a file exclusion algorithm that favors excluding whole folders when possible. The way it works is we gather exclusion information of each folder as we visit each children. When "leaving" the folder, we can act on whether or not it can be considered for exclusion as a whole or instead individually exclude a subset of its children. Using LLVM code base as a test: Before: 613 sec After: 2.4 sec Change-Id: Ib882a72cae157e3db6b6c94a1a09cb6f05b66bc4 Signed-off-by: Marc-Andre Laperle <>
2020-08-03Bug 565553 - Improve performance of build command parsers with large number ↵Marc-Andre Laperle1-8/+37
of files Cache results of various path resolution algorithms. Resolving paths is particularly slow while creating entries, see AbstractLanguageSettingsOutputScanner.createResolvedPathEntry. There are three main callees within that method that this patch addresses with a caching approach: * findContainerForLocationURI: First, this finds containers for a given URI in the workspace using Eclipse resources API. Then a single container is selected based on a preferred project. This can done repeatedly for include paths, which are often similar for source files in a given project or source folder. This first step is the expensive one and it only depends on one argument (the URI) and a simple IResource[] return type, so the cache here is done for this operation. Then the post-filtering is kept as is. * findFileForLocationURI: Similar to the container case but for files. A typical projet has much less file paths than folder paths in its options. One more common option using file paths is -include. The same approach is applied here as the previous point because there are performance gains but they are smaller if you consider typical projet setup. * findBestFitInWorkspace: When a path cannot be found, this makes an attempt to find the parsed path relative to every folder of the workspace, by starting first with the preferred project, then its referenced projects and then the rest. Caching the result of findBestFitInWorkspace itself is too cumbersome because the result depends on 3 variables (currentProject, currentCfgDescription and parsedName) which would make a complex cache key. Instead, caching the result of findPathInFolder at the project level is sufficient, with little to no performance difference. In all three cases, the class LRUCache is used in order to limit memory consumption of the cache. A limit of 100 elements for each cache was chosen based on experimentation with a few projects like LLVM and projets several times bigger. A limit higher than necessary for small projects does not incur a noticeable overhead for small projects and a limit too small for very large projects merely diminishes the performance gains. Using LLVM code base as a test, the time to parse options for all files: Before: 68395ms, after: 5599ms Change-Id: Ib997e9373087950f9ae6d93bbb1a5f265431c6bc Signed-off-by: Marc-Andre Laperle <>
2020-07-11Bug 563006 - CDB settings provider/parser doesn't support "arguments"Marc-Andre Laperle2-1/+10
One flaw with this implementation is that the "arguments" coming from the CDB do not have shell quoting and shell escaping of quotes whereas the current implementations of Build Output parsers assume some form of shell quoting. This means that simply joining strings of arguments with spaces will be missing the expected shell quoting and possibly misparsed by the build output parsers. It is not clear to be at this point if this should be fixed or not as it might involve revamping the existing build output parsers to add the concept of shell/environment and this could also affect potential extenders. In this current form, simple cases with no spacing and quote escaping involved work correctly and is still a nice improvement. Change-Id: Ia81796e63c748318b34696998ac4a467712e5f96 Signed-off-by: Marc-Andre Laperle <>
2020-07-04Fixed NLS and null warningsTorbjörn Svensson3-5/+4
Signed-off-by: Torbjörn Svensson <> Change-Id: I6e40038e99c37a4efc25f64d8d186b00c6f55f8c
2020-06-13Bug 564123 delete org.eclipse.cdt.utils.Platformjantje1-1/+1
The class overrode org.eclipse.core.runtime.Platform to workaround bugs in the platform that have since been fixed. As 32-bit x86 and PPC support has been removed this class is no longer needed as all the code is now unreachable anyway. Change-Id: I01bb00b9203aa02663ff25ce36c4c14f22dadee5 Signed-off-by: jantje <>
2020-06-12Bug 564257: Respect commandGenerator and applicabilityCalculatorTorbjörn Svensson2-46/+120
The method Configuration.getUserObjects() and Configuration.getLibs() should respect the commandGenerator and applicabilityCalculator defined for the option in the toolchain definition. The method Tool.getToolCommandFlags() should call the commandGenerator only if the value type would generate a default command. Change-Id: I4d6224627888e602682076ac929adbf808cff8d7 Signed-off-by: Torbjörn Svensson <>
2020-06-08Bug 562004 - Remove dependency to from CDT Managed BuildSergei Kovalchuk7-30/+24
Core Dependency removed for Managed Build Core Change-Id: I15e29453a1452a5060c470f3b3658cb5763615b0 Signed-off-by: Sergei Kovalchuk <>
2020-05-10Bug 559186 - Allow using variables for the CDB path in CDB settings providerMarc-Andre Laperle1-15/+30
For example, you can use ${ProjDirPath}/buid/compile_commands.json which is a more sharable setting Change-Id: Ic51775ea1f7d258c55e2e720c94f626a17444744 Signed-off-by: Marc-Andre Laperle <>
2020-04-25Bug 562452: Avoid using .C for C++ files when calculating specsJonah Graham2-15/+33
Change-Id: I0fe24a8343e73d501ae09e8bf3721e3d310a696d
2020-03-02Revert "Bug 560614 - Drop dependency on ICU4J"Jonah Graham7-14/+29
This reverts commit 87b627bf02eaab28cdb64f6ebe203ac64d18fe94. Change-Id: I54ea1ac766437deb174eeba571a7a5094c180828
2020-03-02Bug 560614 - Drop dependency on ICU4JAlexander Kurtakov7-29/+14
Straightforward conversion. Still usages left that need deeper investigation how to be done proper. Some long time commented code removed as java formatter breaks trailing whitespaces on save. Change-Id: If74259bed5735b0d4cc98fc2cfa609c9c53c80c9 Signed-off-by: Alexander Kurtakov <>
2020-01-30Bug 559707 - Promote ToolchainBuiltinSpecsDetector.getTool(String)Alexander Fedorov1-61/+71
added protected Optional<ITool> languageTool(String languageId) instead of private ITool getTool(String languageId) Change-Id: Ic21d2a493acf4e547c7354c544c2cef34b53eab6 Signed-off-by: Alexander Fedorov <>

Back to the top