mirror of https://github.com/acidanthera/audk.git
Changed the code to read the correct configuration name in target.txt file;
Fixed an issue which caused building platform with un-defined tools. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@833 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dd23984c3d
commit
c773bec060
|
@ -267,7 +267,7 @@ public class FrameworkBuildTask extends Task{
|
|||
else {
|
||||
envToolChainInfo.addTargets(str);
|
||||
}
|
||||
str = getValue("TAGNAME", targetFileInfo);
|
||||
str = getValue("TOOL_CHAIN_TAG", targetFileInfo);
|
||||
if (str == null || str.trim().equals("")) {
|
||||
envToolChainInfo.addTagnames("*");
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ public class FrameworkBuildTask extends Task{
|
|||
}
|
||||
GlobalData.setToolChainEnvInfo(envToolChainInfo);
|
||||
|
||||
str = getValue("TOOLS_DEFINITION_FILE", targetFileInfo);
|
||||
str = getValue("TOOL_CHAIN_CONF", targetFileInfo);
|
||||
if (str != null) {
|
||||
toolsDefFilename = str;
|
||||
}
|
||||
|
|
|
@ -242,6 +242,15 @@ public class GenBuildTask extends Ant {
|
|||
getProject().setProperty("TARGET", targetList[i]);
|
||||
String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();
|
||||
for(int j = 0; j < toolchainList.length; j ++){
|
||||
//
|
||||
// check if any tool is defined for current target + toolchain + arch
|
||||
// don't do anything if no tools found
|
||||
//
|
||||
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {
|
||||
System.out.println("!!!Warning: No build issued. No tools found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Prepare for toolchain related common properties
|
||||
// TOOLCHAIN
|
||||
|
|
|
@ -689,6 +689,18 @@ public class GlobalData {
|
|||
moduleToolChainFamilyOption.put(fpdModuleId, toolChainOption);
|
||||
}
|
||||
|
||||
public static boolean isCommandSet(String target, String toolchain, String arch) {
|
||||
String[] commands = getToolChainInfo().getCommands();
|
||||
|
||||
for (int i = 0; i < commands.length; ++i) {
|
||||
if (toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()}) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {
|
||||
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);
|
||||
ToolChainMap toolChainConfig = toolsDef.getConfig();
|
||||
|
|
|
@ -31,39 +31,38 @@ public class ToolChainMap {
|
|||
private Map<ToolChainKey, String> map = null;
|
||||
|
||||
public ToolChainMap() {
|
||||
//this.map = new TreeMap<ToolChainKey, String>();
|
||||
this.map = new HashMap<ToolChainKey, String>();
|
||||
}
|
||||
|
||||
public String put(String key, String delimiter, String value)throws EdkException {
|
||||
public String put(String key, String delimiter, String value) {
|
||||
ToolChainKey toolChainKey;
|
||||
|
||||
try {
|
||||
toolChainKey = new ToolChainKey(key, delimiter);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return (String)map.put(toolChainKey, value);
|
||||
}
|
||||
|
||||
public String put(String key, String value) throws EdkException {
|
||||
public String put(String key, String value) {
|
||||
ToolChainKey toolChainKey;
|
||||
|
||||
try {
|
||||
toolChainKey = new ToolChainKey(key);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return (String)map.put(toolChainKey, value);
|
||||
}
|
||||
|
||||
public String put(String[] key, String value) throws EdkException {
|
||||
public String put(String[] key, String value) {
|
||||
ToolChainKey toolChainKey;
|
||||
|
||||
try {
|
||||
toolChainKey = new ToolChainKey(key);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return (String)map.put(toolChainKey, value);
|
||||
}
|
||||
|
@ -72,40 +71,40 @@ public class ToolChainMap {
|
|||
return (String)map.put(key, value);
|
||||
}
|
||||
|
||||
public String get(String key) throws EdkException {
|
||||
public String get(String key) {
|
||||
ToolChainKey toolChainKey;
|
||||
|
||||
try {
|
||||
toolChainKey = new ToolChainKey(key);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return get(toolChainKey);
|
||||
}
|
||||
|
||||
public String get(String key, String delimiter) throws EdkException {
|
||||
public String get(String key, String delimiter) {
|
||||
ToolChainKey toolChainKey;
|
||||
|
||||
try {
|
||||
toolChainKey = new ToolChainKey(key, delimiter);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return get(toolChainKey);
|
||||
}
|
||||
|
||||
public String get(String[] key) throws EdkException {
|
||||
public String get(String[] key) {
|
||||
ToolChainKey toolChainKey;
|
||||
|
||||
try {
|
||||
toolChainKey = new ToolChainKey(key);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return get(toolChainKey);
|
||||
}
|
||||
|
||||
public String get(ToolChainKey key) throws EdkException {
|
||||
public String get(ToolChainKey key) {
|
||||
String result = map.get(key);
|
||||
if (result != null || map.containsKey(key)) {
|
||||
return result;
|
||||
|
@ -116,7 +115,7 @@ public class ToolChainMap {
|
|||
try {
|
||||
tmpKey = new ToolChainKey(keySet);
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
int level = matchLevel;
|
||||
|
@ -134,7 +133,7 @@ public class ToolChainMap {
|
|||
continue;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new EdkException(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
result = map.get(tmpKey);
|
||||
|
@ -157,9 +156,5 @@ public class ToolChainMap {
|
|||
public Set<ToolChainKey> keySet() {
|
||||
return (Set<ToolChainKey>)map.keySet();
|
||||
}
|
||||
|
||||
// public String toString() {
|
||||
// return map.toString();
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue