1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
Commit graph

3153 commits

Author SHA1 Message Date
Jonah Graham
b6b66b5457 Bug 568397: Add separate text boxes for separate build command and args
Change-Id: I078a1db23a69dcbde503b1dd5e496705ecccc956
2021-04-12 17:25:15 -04:00
Jonah Graham
bbe89c853e [releng] Update to newer help-docs-eclipserun-repo
Note that:
- doc/org.eclipse.cdt.doc.isv
- doc/org.eclipse.cdt.doc.user

were updated in commit 149aca51f9 made
this release cycle.

Change-Id: I5b19c7ba14d1c3f837163c109603f9a330e9f138
2021-04-12 09:28:45 -04:00
Jonah Graham
2073d47084 Bug 572648: Handle cases of empty (EOF) JSON files
Change-Id: I10fae3542ae75120dad0a59b52aaf7b34a67d8e9
2021-04-08 10:56:14 -04:00
Jonah Graham
55c2df3b03 Bug 571309: Use java Collections instead of System.arraycopy
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-04-06 20:23:56 -04:00
Jonah Graham
a028e22442 Bug 572593: reenable disabled meson tests
Upgrade the tests to JUnit5 so they can be marked as flaky and slow.
Also removed a bunch of unused code.

This partially reverts commit 8220215a2e.

Reason for revert: These tests were "temporarily" disabled a while ago
as part of the JIRO migration in Bug 545624.

Change-Id: I111cf4d9d9f5e07e49074ca2355a3d1f52fb1070
2021-04-06 20:21:44 -04:00
Alexander Fedorov
8dbf024ab8 Bug 572552 - CDT releng: update versions to 10.3.0
Added missed license headers
Updated baseline for the parent pom to CDT 10.2
Updated version for pom.xml to 10.3
Updated version for features and bundles to CDT 10.3
Updated copyright for about.properties to be 2021
Incremented version + 100 where needed

Change-Id: I79666fcc0402fee6607499d7dce1eaf87a5f446d
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2021-04-04 16:17:25 -04:00
Torbjörn SVENSSON
afd8342ec0 Bug 571458: Return verdict of all configs
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 <torbjorn.svensson@st.com>
2021-03-01 11:47:47 +01:00
Torbjörn SVENSSON
1404e46d70 Bug 571566: Document how to choose workspace for headless build
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 <jonah@kichwacoders.com>
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2021-03-01 02:40:52 -05:00
Torbjörn SVENSSON
0ca137e854 Bug 571433: Make ManagedCommandLineGenerator API
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 <torbjorn.svensson@st.com>
2021-02-26 14:47:34 -05:00
Torbjörn SVENSSON
f7c88ecd73 Bug 406497: Fixed wrong null check
Contributed by STMicroelectronics

Change-Id: I741bdde5708a7dd4583a3afbb83c5ec8643b8cc0
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2021-02-24 16:57:37 +01:00
Torbjörn SVENSSON
7760ce2eb7 Properly invoke diff command during test
Contributed by STMicroelectronics

Change-Id: Ic67a3331375cf0eb071d2b24e2c9716114aeb4dd
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
2021-02-23 14:02:59 +01:00
Torbjörn SVENSSON
c809bde381 Bug 571384: Rebuild required files when configuration has changed
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 <torbjorn.svensson@st.com>
2021-02-22 14:53:52 -05:00
Torbjörn SVENSSON
b063af68ad Bug 571405: Generate rules with -MT"$@"
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 <torbjorn.svensson@st.com>
2021-02-22 14:35:58 -05:00
Torbjörn SVENSSON
07d8edaf28 Bug 571381: Generate BUILD_ARTIFACT* symbols in makefile
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 <torbjorn.svensson@st.com>
2021-02-20 15:22:22 +01:00
Jonah Graham
64e21a93c4 Bug 499777: Flaky and slow test tags
to exclude flaky and slow tests from gerrit runs and main build
tests can be tagged as such. See BTreeExpensiveTests for example
of a slow test and Bug_303953Test for an example of a flaky one.

The root README.md has a few notes on converting tests to JUnit5
and adding annotations to mark them slow or flaky.

Change-Id: I03a4004112e6a500d8ec2771d68f14f7dc5f67fb
2021-02-01 11:32:58 -05:00
Marc-Andre Laperle
f6d1132d8e Bug 565553 - Improve performance of build command parsers with large number 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 https://bugs.eclipse.org/bugs/show_bug.cgi?id=565553#c17
and https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8258036

Change-Id: I80828f969547f824d2e45e60b5f4459d03c70bb1
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-12-27 13:43:08 -05:00
Jonah Graham
c248620053 [releng] Increment feature and related versions to 10.2.0
Change-Id: Icd135a588920fa25fd846dc285db5f83e5ac7037
2020-12-19 12:11:25 -05:00
Jonah Graham
a469af6bf3 [releng] Update to newer help-docs-eclipserun-repo
Change-Id: I5cc8b6d66ace35eea397a781739dc27def4df3f9
2020-12-19 12:11:25 -05:00
Jonah Graham
1d0bc6992f Revert "Bug 568397: Hide "Build settings" if using custom command"
This reverts commit 1d226f9273.

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 https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/173118

Change-Id: Iffa37087c00f434d4e684eea19ecacde36004b80
2020-12-01 12:07:38 -05:00
Torbjörn Svensson
fb20df887a Bug 569300: Allow custom build option editors to save the value
Added a new interface with a method that is called when the value is to
be saved into a resource configuration.
If the function returns false, then the default implementation of
handling property changes will kick in. If the function returns true,
then it's assumed that the value has been handled.

Change-Id: I0523d15ba0a3ec9dbc24c3e4afc070b071d8fb7e
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-30 16:11:01 -05:00
Alexander Kurtakov
bc9ecdad17 Build with Tycho 2.1.0
Change-Id: I7f682ad313ce275f45e0b4adb4c1280d952cf3ac
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Also-by: Jonah Graham <jonah@kichwacoders.com>
2020-11-20 10:53:30 -05:00
Marc-Andre Laperle
f5531cee19 Bug 565553 - Improve performance of build command parsers with large number 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 <malaperle@gmail.com>
2020-11-18 22:06:10 -05:00
Alexander Kurtakov
3abe3d28e6 No need to dispose colors anymore.
Change-Id: I39e760a0dba9d220268ee738c8a085d14f0e188b
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-11-18 13:41:15 -05:00
Torbjörn Svensson
e632011f2c Bug 568728: Drop execute permission on files
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 <azoff@svenskalinuxforeningen.se>
2020-11-18 17:38:22 +01:00
Alexander Kurtakov
57fd1b2847 Do not use deprecated CDataUtil.objectsEqual
Objects.equals should be used instead.

Change-Id: I6713d0d4d0fb8b13b3b336af61cdd73048839969
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-11-17 16:50:33 +02:00
Alexander Kurtakov
dc5b05442e Bug 568888 - Open *.mak files as makefiles
Recognize *.mak extension.

Change-Id: Id765af612d0d8b7f355a9696f06d9e1184db5703
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2020-11-17 15:43:02 +02:00
Torbjörn Svensson
1d226f9273 Bug 568397: Hide "Build settings" if using custom command
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
https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/171735

Change-Id: Ifbd67b279db55f5a83f4a660b9a1248e5c021df2
Also-by: cartu38 opendev <cartu38.opendev@gmail.com>
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-11-09 14:17:15 -05:00
Alexander Fedorov
f2dcc3dff3 Bug 567966 - CDT code clean up: type safety warnings
Generalize the type of elements and resolve type safety warnings

Change-Id: Id8e443d0c071bbd5447092099e80574cdf7fd9b3
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-10-29 06:11:39 -04:00
Alexander Fedorov
b8ba9605c6 Bug 567966 - CDT code clean up: type safety warnings
Generalize the type of elements and resolve type safety warnings

Change-Id: Ibbbdc26663a7fede9debef3ca5d1c79ca346608c
Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
2020-10-24 16:37:11 +03:00
Marc-Andre Laperle
6ca0bb78bb Bug 329995 - Update all C/C++ views when the active configuration changes
Change the default workspace indexer setting

Use the active configuration by default, which is less confusing because
the UI is properly reflected on active config change.  Using a fixed
config can be seen as a more advanced setting for performance concerns.

A new preference is added, only used at default scope:
org.eclipse.cdt.core/cprojectdescription.configRelations
This can be used by products to customize the default according
to their needs (plugin_customization.ini).
This was done because this is a fairly impactful change for users.

Change-Id: I35888ffe5bc1814943f432f88a12094394924c88
Signed-off-by: Alex Freidin <freidin.alex@gmail.com>
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-10-20 22:59:41 -04:00
Jonah Graham
34b5f9612e [releng] Keep empty directory
Change-Id: I43188c0da02c98d15c5264369bd18612ceefa5ff
2020-10-13 21:51:09 -04:00
Martin Weber
af1b6fa238 Bug 567488: Move cmake code to cmake dir
Change-Id: If3df1f176ed82475d01a047c3a6d8c0882bb1d76
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-10-13 20:42:22 -04:00
Jonah Graham
3a6fd58665 [releng] Update help-docs-eclipserun-repo to use Platform 4.17
Change-Id: I85f28fe919b68fc222acb90850fc538941c3a826
2020-10-12 10:39:13 -04:00
Jonah Graham
a1201a811a Bug 567810: Squash over zealous warning from PDE
See also Bug 558477

Change-Id: I0765a2a49dc77e2f24af787b0f9a1e0e1e510a30
2020-10-12 10:14:26 -04:00
Jonah Graham
c40ed25daa [releng] Update API Filters
Remove old filters that are no longer relevant and mark some API warnings
as ignored.

Change-Id: Id687740b4261f9441f10804941a1d2aa1a3746c8
2020-10-12 10:14:26 -04:00
Marc-Andre Laperle
fa270ed30a [releng] Update plug-in versions
Version changes are all to refect non-API changes (micro version)

Change-Id: I372aa2671a4c7f5c765a42156d3f639b8eaff680
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
2020-10-06 16:20:18 -04:00
Jonah Graham
24639efcee [releng] Bump version to 10.1.0
Change-Id: I39f7c379c0b43c086a25b047b3af564f6f24d670
2020-10-06 16:20:18 -04:00
Marc-Andre Laperle
08e8e57162 Bug 565553 - Improve performance of build command parsers with large number 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 <malaperle@gmail.com>
2020-10-04 14:29:11 -04:00
Marc-Andre Laperle
2015e9b009 Bug 567334 - Occasional NPE in CompilationDatabaseParser
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 <malaperle@gmail.com>
2020-09-26 22:28:03 -04:00
Martin Weber
e974d52aa4 Bug 566495: Rework CMakeErrorParser
Change-Id: I5c7c67597da386137581b7b240b9ca7fdcf71c29
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-09-22 15:57:43 -04:00
Marc-Andre Laperle
050be8ebe1 Bug 565553 - Improve performance of build command parsers with large number 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 <malaperle@gmail.com>
2020-09-13 12:17:25 -04:00
Jeff Johnston
17b3e6c1a6 Bug 566658 - [build] Core Make project does not support profiling
- fix Core Make Makefile template to add one for linuxtools
  build mode which is used for Linux Tools profiling
- fix the error default to change tab indent to spaces so
  make won't treat error message as recipe
- add some default profiling flags for gcov and gprof support when
  Linux Tools profiling

Change-Id: I29c2247c9e2b00a4e1c1952198faf881abd7a66a
2020-09-03 23:32:19 -04:00
Martin Weber
0ccb310931 Print build-start and -end message to consoleInfoStream.
This make messages stand out more prominently in the build console.

Change-Id: I180a7eb6631870004cca94a7f1d2c8bda5b044f8
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-09-01 14:24:36 -04:00
Martin Weber
afe13d32bf Bug 566385: integrate cmake build-output parser (code cleanup)
Change-Id: I6fe6f728c45316e79875201b4071f75a8016393e
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-09-01 14:23:57 -04:00
Martin Weber
a6baf50a47 Bug 566385: integrate cmake build-output parser
Change-Id: Iaf6b6f6e653571f666474e096aec4cb29893088c
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
2020-09-01 14:23:57 -04:00
Jonah Graham
1562080a3c Bug 553674: Make Binary parsers and related classes Autocloseable
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-31 21:32:32 -04:00
Jonah Graham
a83e8924ba Bug 563494: Remove freemarker java11 workaround
Change-Id: I7fc259ff13f7d44b1aa29c6842db6d744cffcc9e
2020-08-31 09:07:10 -04:00
Jonah Graham
88b2322c38 Bug 551817: Fix legal docs - and automate their checks
Change-Id: I6f97927f0df64a28e71a2d7ab4c55b609794f751
2020-08-30 23:15:59 -04:00
Torbjörn Svensson
f7c173377d Fixed potential NPE
buildInfo is null in the case that the node list is empty.

Change-Id: I165ec31eeeab57e1eb7bed0268d0f83c70d6e0f7
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-30 23:09:12 -04:00
Torbjörn Svensson
5d91f6f847 Ensure file is closed
Removed useless catch block that just rethrows the same exception

Change-Id: If3e4faea1ed889d4f7b39a7cff786e0aa9a6803d
Signed-off-by: Torbjörn Svensson <azoff@svenskalinuxforeningen.se>
2020-08-30 23:08:33 -04:00