Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324062 - Headless Builder: Need ability to pass additional tool options
Summary: Headless Builder: Need ability to pass additional tool options
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 7.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: James Blackburn CLA
QA Contact: Chris Recoskie CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 04:54 EDT by James Blackburn CLA
Modified: 2010-09-15 12:23 EDT (History)
1 user (show)

See Also:


Attachments
patch 1 (7.90 KB, patch)
2010-09-02 08:32 EDT, Alex Collins CLA
no flags Details | Diff
patch 2 (15.76 KB, patch)
2010-09-06 11:48 EDT, Alex Collins CLA
jamesblackburn+eclipse: iplog+
Details | Diff
patch for commit (16.40 KB, patch)
2010-09-15 11:59 EDT, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-08-31 04:54:33 EDT
Similar to bug 321588 and bug 310819

We'd like to be able to extend the set of options passed to individual tools via the headless builder. The user would specify the parent tool id, followed by options to be appended to the tool invocation. The options should appear after all other options so that existing switches can be overriden.
Comment 1 Alex Collins CLA 2010-09-02 08:32:07 EDT
Created attachment 178034 [details]
patch 1

patch 1 implements this.

The syntax for specifying options is:

-T toolid optionid=value

This adds the specified value to each option with id (or parent id) equal to optionid, for all tools with id (or parent id) toolid in all project configurations that will be built.
Comment 2 James Blackburn CLA 2010-09-04 08:58:18 EDT
A couple q's on the patch:
  - -T <opt=value> overrides any existing option.  There probably needs to be a way to handle extending an existing option. For example: if passing additional misc.options the user probably wants the ability to add to the existing misc.options string rather than replacing it altogether. Maybe add -Ta, -Tr, -Tp similar to environment extending?
  - The patch only seems to handle String / enum option types. It should probably handle String list based option types, as well as boolean.
  - The patch seems to change the option value permanently. This might be ok, though perhaps it would be better to temporarily extend / override existing options similar to environment / define / include extension?
Comment 3 Alex Collins CLA 2010-09-06 11:48:43 EDT
Created attachment 178274 [details]
patch 2

Thanks for the feedback. This patch adds these features.

It also allows you to set an option multiple times (with different operations). This allows you to do things like prepend and append a value to an option.
Comment 4 James Blackburn CLA 2010-09-15 11:59:42 EDT
Created attachment 178957 [details]
patch for commit

Patch for commit.

- Move the patch to CDT HEAD.
- Be careful only to fetch MB info for CDT projects => NPE
- Don't touch the build configuration if the user isn't using this functionality
- Tidy JavaDOC, externalised strings, warnings
Comment 5 James Blackburn CLA 2010-09-15 12:00:56 EDT
Patch committed to HEAD.