| Summary: | Unexpected "shared" option appears when restoring defaults | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | David Pochet <dpochet> |
| Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | NEW --- | QA Contact: | Jonah Graham <jonah> |
| Severity: | normal | ||
| Priority: | P3 | CC: | ddk, eostroukhov, mohamed_azab, yevshif |
| Version: | 8.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/106038 https://git.eclipse.org/r/114455 |
||
| Whiteboard: | |||
|
Description
David Pochet
*** Bug 347498 has been marked as a duplicate of this bug. *** This problem is caused by ArtifactTab::performDefaults setting artifact type to shared library (in a call to setProjectType(wrong)) which changes variable values. Subsequent call to "setProjectType(right)" restores proper project type but does not recompute the option values. Apparently, the problem is that only options from "extension elements" get recomputed (see HoldsOptions::adjustOptions). What happens is: 1. Set artifact type to shared (setProjectType(wrong)) will set Linker::shared option to "true" and will redeclare this option in the non-extension Linker "subclass". 2. Set artifact type to exe (setProjectType(right)) will not change the option default value. I see same problem in our toolchain with custom build property and custom option. So (In reply to Eugene Ostroukhov from comment #3) > Apparently, the problem is that only options from "extension elements" get > recomputed (see HoldsOptions::adjustOptions). What happens is: > > 1. Set artifact type to shared (setProjectType(wrong)) will set > Linker::shared option to "true" and will redeclare this option in the > non-extension Linker "subclass". > 2. Set artifact type to exe (setProjectType(right)) will not change the > option default value. > > I see same problem in our toolchain with custom build property and custom > option. This patch: < https://git.eclipse.org/r/#/c/27520/ > makes the updates for all options. Is there a specific problem with this? New Gerrit change created: https://git.eclipse.org/r/106038 New Gerrit change created: https://git.eclipse.org/r/114455 |