mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-10 10:35:23 +02:00
Bug 580286: Accommodate extra flags with internal builder (#44)
This commit is contained in:
parent
ab7369e810
commit
d8f06c89a9
5 changed files with 16 additions and 18 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core.tests; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core.tests; singleton:=true
|
||||||
Bundle-Version: 8.2.200.qualifier
|
Bundle-Version: 8.2.201.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.testplugin.CTestPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2014 Intel Corporation and others.
|
* Copyright (c) 2006, 2022 Intel Corporation and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Intel Corporation - Initial API and implementation
|
* Intel Corporation - Initial API and implementation
|
||||||
|
* John Dallaway - Accommodate extra flags with internal builder (bug 580286)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.managedbuilder.core.tests;
|
package org.eclipse.cdt.managedbuilder.core.tests;
|
||||||
|
|
||||||
|
@ -1652,13 +1653,6 @@ public class BuildDescriptionModelTests extends TestCase {
|
||||||
type.addResource(tDes.createResource("dir2/h.r"));
|
type.addResource(tDes.createResource("dir2/h.r"));
|
||||||
type.addResource(tDes.createResource("dir2/i.r"));
|
type.addResource(tDes.createResource("dir2/i.r"));
|
||||||
|
|
||||||
type = step.createIOType(false, false, null);
|
|
||||||
type.addResource(tDes.createResource("o1.o"));
|
|
||||||
type.addResource(tDes.createResource("dir3/o2.o"));
|
|
||||||
type.addResource(tDes.createResource("dir4/d/o3.o"));
|
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
step = tDes.createStep(null, null);
|
step = tDes.createStep(null, null);
|
||||||
|
|
||||||
type = step.createIOType(true, false, null);
|
type = step.createIOType(true, false, null);
|
||||||
|
@ -1755,11 +1749,6 @@ public class BuildDescriptionModelTests extends TestCase {
|
||||||
// type.addResource(tDes.createResource(cName + "/t.o"));
|
// type.addResource(tDes.createResource(cName + "/t.o"));
|
||||||
// type.addResource(tDes.createResource(cName + "/y.o"));
|
// type.addResource(tDes.createResource(cName + "/y.o"));
|
||||||
|
|
||||||
// type = step.createIOType(true, false, null);
|
|
||||||
type.addResource(tDes.createResource("o1.o"));
|
|
||||||
type.addResource(tDes.createResource("dir3/o2.o"));
|
|
||||||
type.addResource(tDes.createResource("dir4/d/o3.o"));
|
|
||||||
|
|
||||||
type = step.createIOType(false, false, null);
|
type = step.createIOType(false, false, null);
|
||||||
type.addResource(tDes.createResource(cName + "/" + artifactName));
|
type.addResource(tDes.createResource(cName + "/" + artifactName));
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; singleton:=true
|
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; singleton:=true
|
||||||
Bundle-Version: 9.4.0.qualifier
|
Bundle-Version: 9.4.1.qualifier
|
||||||
Bundle-Activator: org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin
|
Bundle-Activator: org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
* Copyright (c) 2006, 2022 Intel Corporation and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
* Intel Corporation - Initial API and implementation
|
* Intel Corporation - Initial API and implementation
|
||||||
* IBM Corporation
|
* IBM Corporation
|
||||||
* John Dallaway - Handle reduced build step input resource count (bug 366039)
|
* John Dallaway - Handle reduced build step input resource count (bug 366039)
|
||||||
|
* John Dallaway - Accommodate extra flags with internal builder (bug 580286)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
|
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
|
||||||
|
|
||||||
|
@ -1523,6 +1524,7 @@ public class BuildDescription implements IBuildDescription {
|
||||||
* 3. Use the file extensions and the resources in the project
|
* 3. Use the file extensions and the resources in the project
|
||||||
*/
|
*/
|
||||||
ITool tool = step.getTool();
|
ITool tool = step.getTool();
|
||||||
|
boolean toolHasExtraFlags = tool.getCommandLinePattern().contains("${EXTRA_FLAGS}"); //$NON-NLS-1$
|
||||||
IInputType[] inTypes = tool.getInputTypes();
|
IInputType[] inTypes = tool.getInputTypes();
|
||||||
if (inTypes != null && inTypes.length > 0) {
|
if (inTypes != null && inTypes.length > 0) {
|
||||||
for (IInputType type : inTypes) {
|
for (IInputType type : inTypes) {
|
||||||
|
@ -1597,7 +1599,8 @@ public class BuildDescription implements IBuildDescription {
|
||||||
if ((var = var.trim()).length() != 0) {
|
if ((var = var.trim()).length() != 0) {
|
||||||
if (VAR_USER_OBJS.equals(var)) {
|
if (VAR_USER_OBJS.equals(var)) {
|
||||||
String objs[] = getUserObjs(step);
|
String objs[] = getUserObjs(step);
|
||||||
if (objs != null && objs.length != 0) {
|
// if there are user objects and they will not be provided as extra flags
|
||||||
|
if ((!toolHasExtraFlags) && (objs != null) && (objs.length != 0)) {
|
||||||
if (arg == null)
|
if (arg == null)
|
||||||
arg = step.createIOType(true, primaryInput, type);
|
arg = step.createIOType(true, primaryInput, type);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
* Copyright (c) 2006, 2022 Intel Corporation and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Intel Corporation - Initial API and implementation
|
* Intel Corporation - Initial API and implementation
|
||||||
|
* John Dallaway - Accommodate extra flags with internal builder (bug 580286)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
|
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
|
||||||
|
|
||||||
|
@ -358,6 +359,11 @@ public class BuildStep implements IBuildStep {
|
||||||
private String[] getInputResources(IPath cwd, BuildResource[] rcs) {
|
private String[] getInputResources(IPath cwd, BuildResource[] rcs) {
|
||||||
String[] resources = resourcesToStrings(cwd, rcs, null);
|
String[] resources = resourcesToStrings(cwd, rcs, null);
|
||||||
|
|
||||||
|
// if the libraries will be provided as extra flags we do not need to add them here
|
||||||
|
if (fTool.getCommandLinePattern().contains("${EXTRA_FLAGS}")) { //$NON_NLS-1$
|
||||||
|
return resources;
|
||||||
|
}
|
||||||
|
|
||||||
// also need to get libraries
|
// also need to get libraries
|
||||||
String[] libs = null;
|
String[] libs = null;
|
||||||
IOption[] opts = fTool.getOptions();
|
IOption[] opts = fTool.getOptions();
|
||||||
|
|
Loading…
Add table
Reference in a new issue