1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00
Commit graph

2898 commits

Author SHA1 Message Date
Doug Schaefer
6a12755a4e Fixes for ESP32.
In the new toolchain wizard, the select button wasn't hooked up.
So I turned it off. Also, we had no build settings tab on the serial
launch.

Change-Id: I811f579334889085f49d298878589109c5e4a228
2017-12-01 16:28:29 -05:00
Doug Schaefer
d6a1c13e5c Cleanup Core Build Preference pages.
Move Toolchains directly under C/C++ and rename to Core
Build Toolchains. Add a label describing what the toolchains
are for in hope of avoiding confusion with managed build.
Also move Qt into C/C++.

Change-Id: Ia1d76087c65b26562d1001243ea355c7ac32365e
2017-12-01 14:04:51 -05:00
Doug Schaefer
d0e528d135 Fix manual include/macro settings handling for GCCToolChain.
We weren't passing in the base settings to the compiler for
discovery. Also had a bug in the defines regex that mishandled
values with spaces in them.

Change-Id: I48183bfc3f61056324da009e58327cdcfed8754a
2017-11-29 12:18:12 -05:00
Doug Schaefer
6db1357b1a Stop launch on error. Fix up set/get make commands.
We were missing the dialog to ask if you wanted to continue
after build errors in a project. We were missing the method
that provided the list of projects to do that check.

Also while testing that noticed the handling of the build
and clean command UI was broken with make projects.

Change-Id: I698e151672a114bb22c815f49d362b6413b9c315
2017-11-27 18:04:40 -05:00
Doug Schaefer
0ed7b10dea Bug 527818 - Clean up handling of missing toolchain file
If we're building for non-local targets we need a toolchain
file. Print out an error message when it's missing at build
time. Recover when one is added.

Also a rider that makes sure the Makefile projects are
marked experimental.

Change-Id: I0c295dc5b3d71a04c60c3385ce790553f172859d
2017-11-27 14:46:06 -05:00
Doug Schaefer
d9b8eb3fd0 Hook up the old Include Paths and Symbols page to Makefile projs.
Makefile projects depend on build output parsing to pick up
compiler options to use while indexing. Sometimes, that just
doesn't work. As a back up we've always allowed users to manually
add them to the project. Long ago when we had pure make projects
we had UI for this. This change hooks that old UI up. It was a
time before build configs so they get applied to them all but it
serves it's role as a backup when users run into problems.

Unmarked everything I use here from deprecated until we decide
how to replace these with Core build config aware settings.

Change-Id: I6fc4d48e5315df3c60c7591b026ae0a53a1f505e
2017-11-22 16:40:14 -05:00
Doug Schaefer
12e709427d Releng fixes, ensuring legal files are there. Removing projects.
Removed the empty debug.core.tests project. Also removed the
utils-feature and remote-feature projects since these shouldn't
be features.

Change-Id: Ib5d297c626de5328e3421a1fc9346330d9907750
2017-11-21 13:10:50 -05:00
Doug Schaefer
a90655bc04 Set CC and CXX variables to toolchain compileCommands in std build.
Also set BUILD_MODE to the launch mode so the makefile can do
different things based on the mode. Change template to add -g
option for debug.

Also fix a deadlock I detected due to side affect build folder
creation.

Change-Id: Ic7b13ba3238e6ef201cccb1b2bfc8dcc6956ea3a
2017-11-20 15:55:39 -05:00
Doug Schaefer
dc4be72b1a Fix MSYS2 so that it's provider overrides the path provider.
Also handle case when launchMode is null when creating a build
config.

Change-Id: Ie70de785168c2e24c842d517c64a297ba44e24f4
2017-11-20 13:28:22 -05:00
Doug Schaefer
a58fc62ba6 Forgot to add the makefile templates to the build.
Change-Id: I538e8610f9e31963a2c8224079de1a2f19c565c3
2017-11-17 11:36:29 -05:00
Doug Schaefer
589faf51cc Fix up leftover toolchain provider id usage.
The CMake toolchain file editor was not recording the correct
toolchain. The same was also true for the toolchain selection in
the build settings tab.

Change-Id: I62e4c7ae0175da7c1b5ffb7f89e321a371a6e8e0
2017-11-15 16:18:19 -05:00
Doug Schaefer
b7b1d41f08 Fixes for scanner info for Makefile projects.
Using ESP-IDF (the ESP32 FreeRTOS SDK) on MSYS2 as a test bed.
Making sure the indexer picks up as much as it can. Removed -j
since that messes up build output parsing. Add UI so you can put
it back if you want.

Change-Id: I767c739dce1412c75fb56d0bb1efceb913883a5f
2017-11-10 14:49:16 -05:00
Doug Schaefer
45019ea780 Add settings to Makefile build configs to build at project root.
Often Makefile projects are intended to be built from the project
root directory, such as ESP32 IDF projects. This adds a setting to
control that.

Change-Id: I151ebf60a7609461d24e192a9d6418fccb737055
2017-11-09 20:35:17 -05:00
Doug Schaefer
4ce1f1ca16 Add Makefile Projects to collection of core build project types.
Reuses the old makeNature. Reuses the StandardBuildConfiguration.
Generates a pretty simple project for now. Also handles the case
where you don't want to generate anything, just create an empty or
on an existing source tree.

Change-Id: I2f3cddc85d55792a2c537e37d4bc236a3073d930
2017-11-08 14:11:31 -05:00
Doug Schaefer
ffdb004e67 Adjust Arduino to new GCCToolChain API and add type and id/name.
Change-Id: Ia089985425c7f1a6fe347c41a6a01e5ab16d8208
2017-11-07 13:57:03 -05:00
Doug Schaefer
b495a5faae Hook up the clang toolchain now split out from GCC.
Change-Id: I6edba9e689d903546be3a65060c4ac1b9871167f
2017-11-07 13:13:12 -05:00
Doug Schaefer
76e1842644 Implement ordering of toolchains.
Introduce toolchain types independent of providers.

Change-Id: I2cf3145920fcf4e7132468b6e653d7ea3e211127
2017-11-07 11:01:15 -05:00
Doug Schaefer
69404fdf89 CMake - check for build files, clean up some UX.
Starting for Ninja, check for build.ninja file on whether to run
CMake again. Need to do same for makefiles. Change default to run
cmake --build instead of hardcoding ninja or make. Added message
to the end of the build to know when it's done.

Change-Id: Ibbb352ef7c64f6e1fcbe122ef0b73f2c91bb1aa7
2017-11-05 12:14:39 -05:00
Doug Schaefer
45fb622c51 Add the core build gcc ui plugin to the gcc build feature.
Change-Id: I309bf8c785107ad8edd68664d175c7e94a900ea4
2017-11-04 22:31:41 -04:00
Doug Schaefer
87cd8401f4 Hook up the error parser properly in the build configuration.
So we can have the error partitions that work with double clicking
in the build console.

Change-Id: I357f4efb8fd16232b78b18958c9863071feeebcc
2017-11-03 16:48:20 -04:00
Jeff Johnston
bd88f34dde Bug 526730 - Autotools should not run autotool commands in the Container
- modify runCommand and runScript methods in AutotoolsNewMakeGenerator
  class to take an ICommandLauncher to use
- modify AutotoolsNewMakeGenerator regenerateMakefile method to
  pass a local CommandLauncher when running autotool commands, but
  using one from the CommandLauncherManager when running configure
  or config.status to do the configuration
- modify RemoteCommandLauncher to add a constructor that includes
  the ICommandLauncher to use if the project is not remote
- fix AbstractAutotoolsHandler to use local CommandLauncher

Change-Id: Ib3f0deff3cca4b7b40459b5dd691d73dcbf2a87c
Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
2017-11-02 11:20:35 -04:00
Doug Schaefer
89cb1076e4 Improve when build like autotools is trying to execute a script.
The new Autotools core build executes autoreconf which is a perl
script. We've been assuming up until now they were always
Windows exes or bats. If there's no proper extension, try
finding sh and passing the command to it.

Change-Id: I71ba66d7658db0bdc45608abc356b5efe80669af
2017-11-01 10:42:18 -04:00
Doug Schaefer
3935339cf7 Fix API baseline errors from Command Launcher changes.
Change-Id: Ibc5ba38669832f6baa67ff49ce4fe08ab1f5a14a
2017-10-31 15:57:56 -04:00
Doug Schaefer
bfe7f8f3d7 Fix up MSYS2 autodetect in to use new GCCToolChain API.
Make sure we pass the path to gcc as well as the environment
with the MSYS2/MINGW* path.

Also mark the old API deprecated. Not sure it even works
anymore so we need to move things over.

Change-Id: I1df10a4a77dbdd9027788bc404ae367421673e26
2017-10-31 14:35:42 -04:00
Chin Huat Ang
a974ba9c9e Bug 525591: autotools: Initial core build implementation
Add core, UI and feature plugins for the new autotools project which
uses template wizard and core build.

The template wizard currently supports generating a simple autotools
project as described using a template manifest. 

The project generator sets new autotools nature associated with new
autotools build config provider.

The generated autotools project has been tested to compile fine with gcc
(x86_64-linux-gnu-gcc) toolchain.

Change-Id: I8349999d551bb693725a246340cf46266150fadc
Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
2017-10-30 14:33:06 -04:00
Jeff Johnston
c96d126b86 Bug 513589 - Add support to build CDT projects in a Docker Container
- add IOptionalBuildObjectPropertiesContainer interface to use for
  objects that supply optional build properties
- add new IOptionalBuildProperties interface that defines
  optional build properties donated by external plug-ins
- add new
- change IConfiguration to an IOptionalBuildObjectPropertiesContainer
- change IManagedProject to be an
  IOptionalBuildObjectPropertiesContainer
- fix ProcessClosure to ensure that readers are not null before
  accessing them
- fix Container launch delegate to look at project optional
  build properties for active configuration to fetch connection
  and image info and use said info to find a matching
  launch or create a new one
- have Container launch delegate use the image name as part of
  the launch config name
- have Container launch short-cut also use the project's
  optional build properties for the active config to get
  connection and image information before any defaulting
- change AutotoolsNewMarkerGenerator to store the command
  launcher as an ICommandLauncher
- add new CommandLauncherFactory extension to cdt.core that
  allows plug-ins to specify a CommandLauncherFactory that
  will return an ICommandLauncher based on the project
- add macros for new extension to CCorePlugin
- add new CommandLauncherManager class that loads
  CommandLauncherFactory extensions and is used to give
  an ICommandLauncher wrapper that will go through the list
  of CommandLauncherFactory extensions until one returns
  non-null ICommandLauncher
- add code to RemoteCommandLauncher so it will use the
  CommandLauncherManager to get the local launcher
- also change RemoteCommandLauncher to check at execution
  time whether the command is local and in that case use
  the local command launcher
- add new ICommandLauncherFactory interface
- add new ContainerCommandLauncher to launch
- add new ContainerCommandLauncherFactory class for returning
  a ContainerCommandLauncher instance to launch commands
  in a Docker Container
- change MakeBuilder to use CommandLauncherManager to get
  its ICommandLauncher
- change CommandBuilder to use CommandLauncherManager too
- ditto for Builder and AbstractBuiltinSpecsDetector and
  ExternalToolInvoker
- change Configuration to load/store optional build properties
  as well as return the properties to get/set
- ditto for MultiConfiguration
- change ManagedProject to implement IOptionalBuildOptionProperties
  interface
- ditto for ProjectType
- create new OptionalBuildProperties class to store optional
  build properties for a configuration
- bump cdt.docker.launcher to 1.1.0
- use CommandLauncherFactory extension to define
  ContainerCommandLauncherFactory
- add optional ContainerPropertyTab which allows the end-user to
  optionally choose to build a C/C++ project in a Container
  and specify the connection/image to use
- in LanguageSettingsSerializableSettings class, call the
  CommandLauncherManager getLanguageSettingEntries method
  to get the massaged language setting entries based on the
  current list
- in LanguageSettingsProviderSerializer, try and get the
  pooled entries using the cfg description so that it will
  have the project and can use the CommandLauncherManager
  to get entries from image
- in ContainerCommandLauncherFactory move cached headers under
  a HEADERS directory in the plug-in area
  - create a sub-directory for the connection and a sub-directory
    for the image based on cleansed names
  - store the real names of the connection and image to use
    later in the DockerHeaderPreferencePage
- modify LanguageSettingsEntriesTab to force the horizontal
  scroll bar to appear (this is a bug in SWT SashForm support
  and the fix here isn't quite correct, but is better)
- add new DockerHeaderPreferencePage that allows user to
  remove cached headers from images
- change C/C++ Docker preferences to be titled: Docker Container
- fix LanguageSettingsWorkspaceProvider.getSettingEntries method
  to use the CommandLauncherManager so entries will be transformed
  to use cached headers
- add BaseDatabindingModel class
- add DataVolumeModel class to model a volume mount
- add ContainerPropertyVolumes model to model volume specification
  and selected volumes
- add properties to ContainerCommandLauncher to represent
  volumes and selected volumes for a configuration
- add ContainerDataVolumeDialog for specifying a volume
  mount by the end-user
- add a null detector for cfgDescription in
  LanguageSettingsSerializableProvider
- fix AutotoolsNewMakeGenerator.getWinOSType to not specify "." for
  working dir
- fix GCCBuiltinSpecsDetectorCygwin to not map paths to Cygwin if
  the current configuration is enabled for container build
- add logic to ContainerCommandLauncher to look for Windows
  file formats and change them to unix format and map
  any "." working dir to be /tmp
- fix ContainerLauncherConfigurationDelegate similarly
- fix AbstractBuiltinSpecsDetector to pass in the current
  configuration description when getting the CommandLauncher
  since the current configuration may not be the active
  configuration
- change ContainerPropertyTab to add Elf and GNU Elf binary parsers
  when build in Container is chosen so that output executables
  are treated as Binaries by the CDT project
- add documentationl for the ContainerPropertyTab in Build Settings and
  the Data Volume dialog pop-up it brings up
- change CommandBuilder to accept a project as an argument
  to its constructor and to pass this as an argument to
  the CommandLauncherManager
- have StepBuilder pass project when creating a CommandBuilder

Change-Id: Ia78488b93056e6ec7ca83a6c87b3a9d2b9424943
2017-10-22 05:38:51 -04:00
Doug Schaefer
50756f3f18 Fix bugs with emscripten and scannerInfo.
Change-Id: I54d3691426a48c2a6f71fee4188364e57eea402d
2017-10-19 12:52:38 -04:00
Doug Schaefer
416fed4d94 Make CMake support more resilient.
Add c++ to GCCToolChain since that's what CMake uses by default for
MinGW. Synchronize the scannerInfoCache loading. Double check for
toolchain files at load time for configs that don't have any.

Change-Id: I8071e285ce5deb1448cabd45f394c62fe6a7f2f4
2017-10-18 12:41:40 -04:00
Doug Schaefer
affb599f24 Allow for changing manually setting toolchains for build configs.
A number of changes that clean up how build configs are done. Now
build settings are stored with the build config instead of in launch
configs. That makes it less launch bar specific. Add build settings
UI to change the toolchain used for a given launch config.

Also changed CMake so it's IToolchain based instead of property which
doesn't work when multiple IToolchains match.

Change-Id: I958d90ede3c1f873ab1530c2b2880808e8f7abef
2017-10-12 16:03:58 -04:00
Doug Schaefer
11dcec43f2 Add UI tests plugin for CMake. Fix a couple of bugs it found.
Also restructures the pom.xmls to put the modules in the top level
so we can order them to have the test plugins build after them.

Change-Id: I2f0e4ebd252791fb8844cdf0f635d574946207aa
2017-10-06 16:36:51 -04:00
Doug Schaefer
5228d19300 UI for adding toolchains for Core Build. New Generic Target Wizard.
Provide a way to add new toolchains. Also start of UI to allow for
reordering them to help with toolchain selection for targets.

New Generic Target Wizard for the new wizard2 extension point for the
Launch Bar Target UI.

Change-Id: I60635ab27dad5b69df72c339337473183dcf711a
2017-09-28 13:42:58 -04:00
Jeff Johnston
a985a9753f Bug 522077 - New Autotools project doesn't open source file by default
- add open file process to Autotools C ANSI hello world template.xml
- add open file process to Autotools CPP ANSI hello work template.xml
- add open file process to Autotools Shared library template.xml

Change-Id: I2fcba56973374d00006f8ce5664581f3fcc419cf
(cherry picked from commit 41e54f1656)
2017-09-11 11:49:01 -04:00
Doug Schaefer
d8cc0751ae Update feature versions to CDT 9.4.
Also remove remaining pom.xmls for feature projects.

Change-Id: I78d6335f92d70ad2699b8a25801ff72d2935aefe
2017-09-11 11:18:42 -04:00
Doug Schaefer
c3f3da9f25 Core Build - add support for Generic target
Adapts to LaunchBar's new Build Tab extension.

Change-Id: Icad41a7083f4389a546234d2835a9c4b60fa0eae
2017-09-07 15:52:28 -04:00
Doug Schaefer
35135aa605 Bug 519529 - fix handling of quotes in the GCCToolChain scanner info.
Some Arduino boards have properties that feed into defines that have
spaces in them. The boards.txt property file adds quotes around those
things. When resolving the recipe property it results in -D gcc
options that have embedded spaces in them. That messes up the
ProcessBuilder and the command fails. We'll just strip the quotes from
all the command args since they aren't needed in this scenario anyway.

Change-Id: I41086ee264b8715823b3eab7931df4371b9ec873
(cherry picked from commit fc7b2f781c)
2017-08-10 10:06:42 -04:00
Philippe NOEL
10b3a4ea3a Bug 520360 - First created target does not appear in BuildTargetDialog
Change-Id: Ief40f2ee09d3714c65526086db993f6c630dda81
Signed-off-by: Philippe NOEL <philippe.noel@st.com>
2017-08-02 09:28:32 +02:00
Jonah Graham
594e65c8c0 Bug 520163: Use camel case for new command line argument
Change-Id: I2e70fd288e0cda8a0fc8d7e8ce53622c4db50abb
2017-07-27 13:53:22 +01:00
Jonah Graham
df31b110d0 Bug 520163: Provide a way to exclude Scanner Errors from headless build
Implemented by allowing users to specify type of error
markers to consider, as well as ability to print out
the error markers that are causing build to fail.

Change-Id: Iaa0b41be9ec1c1ff5268734697f361dac6fec49e
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
2017-07-27 13:06:50 +01:00
Jonah Graham
68a609fe44 Bug 517908: Don't convert #undef into #include <#undef> anymore
Change-Id: I24b18e050ac91668bd63626ed39f1bf8807f8feb
2017-06-07 04:20:23 -04:00
Jonah Graham
7f8440b6b2 Bug 516813: don't mark all targets as secondary
Change-Id: I9da30b0504f1f89e927b9f735fc98a09bfea08b5
2017-05-17 14:34:09 +01:00
Doug Schaefer
43e62924a1 Bug 498171 Propagate scanner info fix for Arduino.
Change-Id: I3ed23049f0364d8fe989f1fa0d8a9b7b47378f32
2017-05-16 20:57:17 -04:00
Jonah Graham
f14ee6a61d Bug 314428: speedup build console - better handle duplicate markers
This changes the algorithm used to handle duplicate markers when build
is running.

Change-Id: I8d8b61edd80ae4da4c0e0eea3806b0efecb570e0
2017-05-12 11:50:08 -04:00
Doug Schaefer
582a7c10d5 Bug 515990 - Fix constant reindexing in CMake projects
There were issues with how the Core Build calculated whether reindexing
was required due to compiler settings changes. Also if a source file
was built more than once in a CMake build, it ended up always
triggering a reindexing since the second instance looked like a
settings change. We now only use the last compile command for a file.

Change-Id: Icf2922e527ae20e0c3b0dae898d981d334013109
2017-05-02 10:14:13 -04:00
Jonah Graham
cc0955b823 Bug 515560: Avoid indexer race condition by joining the indexer
Change-Id: I13bd33adba4eb790fae0c31d2c1378e19a59f4ff
2017-04-24 07:31:54 -04:00
Doug Schaefer
cfdb9c2ad8 Fix issues with CMake. Arguments not passed. Local GCC prefix wrong
I added cmake arguments in the launch configuration for CMake
projects but didn't add it to the command line.

Also indexing wasn't working on my Mac. llvm-cc overrode the standard
local cc. Added the local compile commands if the toolchain is local.

Change-Id: I914c52dd42fbf84b87cd0e8c7504f024c2449a82
2017-04-21 11:10:48 -04:00
Jonah Graham
0fc24a0c78 Bug 515374: Stop using user.home as a temporary directory in tests
Change-Id: I20533ba4910ae9d691f51533183b4f475eaa5bbc
2017-04-19 03:36:54 -04:00
cartu38 opendev
a27309d507 Bug 514385: defaultValue-generation for a build-option
Change-Id: I15550a75206baf906285d3fc7becb491cac13ffa
Signed-off-by: cartu38 opendev <cartu38.opendev@gmail.com>
2017-04-18 09:06:51 +01:00
Jeff Johnston
795a90288b Bug 497670 - Support compiler provided "fix-it" hints
- add new FixitErrorParser that extends RegexErrorParser and is
  used to replace the error parser for GNUCErrorParser
- add new FixManager class to bind a fixit message with its
  problem marker
- modify ProblemMarkerFilterManager to register the last
  accepted ProblemMarkerInfo for a particular resource so
  the FixitErrorParser can find the last error marker for
  the file that precedes the fixit message
- FixitErrorParser looks for fix-it messages and binds them
  via FixitManager to the last error marker for the file
- add new Fixit class to contain the details of a gcc fix-it
- add new QuickFixForFixit which applies the gcc fix-it for the
  file
- add new (.*) regex in codan.ui.checkers patterns that will
  trigger before any other error and will look for the
  fix-it message format
- change cdt.core to expose cdt.internal.errorparsers to
  codan.checkers.ui
- change codan.core to expose codan.internal.core.model to
  codan.checkers.ui
- fix CDocumentProvider.setOverlay method to not overlay
  a CMarkerAnnotation that has a quick fix
- when deleting all C problem markers, also make a call
  to FixManager.deleteAllMarkers() so markers aren't
  left referenced

Change-Id: Ibf8ff7d8addb1bf092dc4ef35de0d92de0309589
2017-04-17 20:01:27 -04:00
cartu38 opendev
6b88578458 Bug 514244: ability to add custom wizard page prior project creation one
See : https://www.eclipse.org/forums/index.php/t/1084842/

Original (WizardNewProjectCreationPage) getStartingPage() cast within
getMainPageData() method was obviously forcing first wizard page type
... provided basic trick is opening some opportunities more !

Change-Id: Ie9b7c4ef63040df6a419af8348f088be79cc2611
Signed-off-by: cartu38 opendev <cartu38.opendev@gmail.com>
2017-03-27 12:24:26 +01:00
Alexander Kurtakov
2268403e02 autotools: Restore API.
It's unused but still we have to keep it.

Change-Id: I9f23e09c0ce62bf88f6cc490a7c0c31852b6fd16
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
2017-03-25 03:05:46 -04:00