Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Core Build

Ok, thanks. I managed to get my builder to work as expected, and have moved on to getting the indexer setup correctly.

 

/Jesper

 

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Doug Schaefer
Sent: den 29 augusti 2017 17:31
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Core Build

 

Hi Jesper, I’m glad you have time to look at Core Build. There are lot of things that still need to be figured out and you are definitely running into those. I’m not sure I understand them yet either J. I think the Intel guys have similar questions so I hope this helps them too.

 

Comments below prefixed with Doug>. Haven’t quite figured out how to do this properly in this new Outlook I have.

 

:D

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jesper Eskilson
Sent: Monday, August 28, 2017 11:15 AM
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
Subject: [cdt-dev] Core Build

 

Hi,

 

I'm making another attempt at playing around with Core Build, but having trouble understanding how everything is meant to stick together. I've looked around at the Qt and Arduino integrations, but I keep stumbling on things here and there.

 

Some stuff that I don't really understand:

 

* Do I need to (or should I) have my own builder? I expect to do all building using our internal build tools, so no CMake/GNU make etc. will be involved.

Doug> All the build mechanics are implemented in ICBuildConfigurations. So you’d need to implement the equivalent to CMakeBuildConfiguration where you can implement the build method to do whatever you need to do. Which configurations are used for a given project is based on project natures.

* What is the expected workflow of creating a new project? When and by whom are the toolchains and build configurations expected to be created? There is some off-hand remark in the ICBuildConfiguration about "Adapting IBuildConfiguration to this interface will get you one of these. From here, adapt to the specific interface that you need and the configuration will provide one.​", but it is not clear to me what this really means in practise.

Doug> Project creation only sets the desired project nature. The rest is somewhat automatic and probably controversial. Configurations are created with calls to CBuildConfigurationManager.getBuildConfiguration() which get passed the desired IToolChain, or a Map of the properties the desired toolchain needs to match.

Doug> Currently the only place we do that is in the Launch Configuration Delegates buildForLaunch methods. As such, these things are very tied to the Launch Bar. Check CoreBuildLaunchConfigDelegate which implements the TargetedDelegate which gets passed the current ILaunchTarget. The properties on the launch target are used to select the toolchain.

Doug> I’d love to have a more generic way to do this so it isn’t tied to the Launch Bar. I’d also love to have a way to have a bit more control over toolchain selection, especially with targets like Windows that have more than one toolchain.

* The CBuildConfigurationManager seems to assume that the build configuration names (IBuildConfiguration#getName()) are on the form <buildConfigProviderId>/<configName>, or it refuses to adapt the IBuildConfiguration to a ICBuildConfiguration (see CBuildConfigurationManager line 186). Is this correct, and if so, why?

Doug> Yes, the provider manages creation of the ICBuildConfiguration. We need its id so we can find it. IBuildConfigurations are very simple things and only have names. So that’s all we have to store this information.

* My build configurations don't show up in "Build Configuration -> Manager...", nor can I select any build configuration:

Doug> Nope, it does not. Those are the old managedbuild build configurations. I haven’t found a clean way to reuse the UI between the two. I think we need to have a common UI in cdt.ui and switch managedbuild over to extend that. And that probably means getting managed build to extend ICBuildConfiguration. But I haven’t had time to look at that yet and it’s probably a lot of work.

 

cid:807460f9-e107-4e7d-b7cd-995be480a844

 

* I've been able to get my custom builder to run, but it only seems to run on clean/rebuild. Pressing "Build Project" again does not result in another call to the builder. 

Doug> That could be a problem with how the build commands are set up. I think there’s an option somewhere to have it build always. Are you using the core.build’s CBuilder? I think it’s set up correctly.

Doug> But as I mentioned, I use the Launch Bar’s build button all the time to build (or bind a key to Build Active Launch Configuration). “Build Project” should work but barely, especially if an active configuration hasn’t been set.

* Are the Arduino and Qt integrations in CDT master expected to work, or are they still work in progress? I tried creating an Arduino project, but got weird errors about the build not being configured correctly, but it wasn't clear to me if it was because I didn't have any Arduino stuff installed on my machine.

Doug> J, yes, I have a pretty solid community using the Arduino integration. Not sure how many people are using Qt yet.

Doug> And I’m actively using the CMake integration for my ESP32 work and some QNX stuff. This is where I’m starting to run into many of the issues I raised above, things like toolchain selection, and the awkward tie to the LaunchBar, which I may solve by making some sort of user defined Launch Targets.

Doug> The good news is that I need to make CMake and Qt work for my QNX customers so have a vested interest in making this good.

/Jesper

 

 

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.


Back to the top