From 53f251ec8461fa498134ed43dc6d8e9fb426e7d4 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 17 Apr 2013 13:43:59 -0400 Subject: [PATCH] Bug 405904 - Gprof linker options not activated until 2nd build - Add a check after calling applicability calculator to see if the option passed in isElementExtension() in which case look for it's id as if it is a superclass id. Change-Id: Id9fb007a138dfc4fc056c465bbb1842bba4fe4ba Reviewed-on: https://git.eclipse.org/r/11991 Reviewed-by: Jeff Johnston IP-Clean: Jeff Johnston Tested-by: Jeff Johnston --- .../org/eclipse/cdt/managedbuilder/internal/core/Tool.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java index d1189ad7c74..93b00d76f6b 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java @@ -2585,6 +2585,11 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch !(applicabilityCalculator instanceof BooleanExpressionApplicabilityCalculator)) { if (option.getSuperClass() != null) option = getOptionBySuperClassId(option.getSuperClass().getId()); + // bug #405904 - if the option is an extension element (first time we build), + // use the option id as a superclass id, otherwise we won't find the option we may have just + // set and will end up with the default setting + else if (option.isExtensionElement()) + option = getOptionBySuperClassId(option.getId()); else option = getOptionById(option.getId()); }