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
else {\r
envToolChainInfo.addTargets(str);\r
}\r
else {\r
envToolChainInfo.addTargets(str);\r
}\r
- str = getValue("TAGNAME", targetFileInfo);\r
+ str = getValue("TOOL_CHAIN_TAG", targetFileInfo);\r
if (str == null || str.trim().equals("")) {\r
envToolChainInfo.addTagnames("*");\r
}\r
if (str == null || str.trim().equals("")) {\r
envToolChainInfo.addTagnames("*");\r
}\r
}\r
GlobalData.setToolChainEnvInfo(envToolChainInfo);\r
\r
}\r
GlobalData.setToolChainEnvInfo(envToolChainInfo);\r
\r
- str = getValue("TOOLS_DEFINITION_FILE", targetFileInfo);\r
+ str = getValue("TOOL_CHAIN_CONF", targetFileInfo);\r
if (str != null) {\r
toolsDefFilename = str;\r
}\r
if (str != null) {\r
toolsDefFilename = str;\r
}\r
getProject().setProperty("TARGET", targetList[i]);\r
String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
for(int j = 0; j < toolchainList.length; j ++){\r
getProject().setProperty("TARGET", targetList[i]);\r
String[] toolchainList = GlobalData.getToolChainInfo().getTagnames();\r
for(int j = 0; j < toolchainList.length; j ++){\r
+ //\r
+ // check if any tool is defined for current target + toolchain + arch\r
+ // don't do anything if no tools found\r
+ // \r
+ if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {\r
+ System.out.println("!!!Warning: No build issued. No tools found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");\r
+ continue;\r
+ }\r
+\r
//\r
// Prepare for toolchain related common properties\r
// TOOLCHAIN\r
//\r
// Prepare for toolchain related common properties\r
// TOOLCHAIN\r
moduleToolChainFamilyOption.put(fpdModuleId, toolChainOption);\r
}\r
\r
moduleToolChainFamilyOption.put(fpdModuleId, toolChainOption);\r
}\r
\r
+ public static boolean isCommandSet(String target, String toolchain, String arch) {\r
+ String[] commands = getToolChainInfo().getCommands();\r
+\r
+ for (int i = 0; i < commands.length; ++i) {\r
+ if (toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()}) != null) {\r
+ return true;\r
+ }\r
+ }\r
+\r
+ return false;\r
+ }\r
+\r
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {\r
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);\r
ToolChainMap toolChainConfig = toolsDef.getConfig(); \r
public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException {\r
ToolChainKey toolChainKey = new ToolChainKey(commandDescription);\r
ToolChainMap toolChainConfig = toolsDef.getConfig(); \r
private Map<ToolChainKey, String> map = null;\r
\r
public ToolChainMap() {\r
private Map<ToolChainKey, String> map = null;\r
\r
public ToolChainMap() {\r
- //this.map = new TreeMap<ToolChainKey, String>();\r
this.map = new HashMap<ToolChainKey, String>();\r
}\r
\r
this.map = new HashMap<ToolChainKey, String>();\r
}\r
\r
- public String put(String key, String delimiter, String value)throws EdkException {\r
+ public String put(String key, String delimiter, String value) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key, delimiter);\r
} catch (Exception e) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key, delimiter);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
return (String)map.put(toolChainKey, value);\r
}\r
\r
}\r
return (String)map.put(toolChainKey, value);\r
}\r
\r
- public String put(String key, String value) throws EdkException {\r
+ public String put(String key, String value) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
return (String)map.put(toolChainKey, value);\r
}\r
\r
}\r
return (String)map.put(toolChainKey, value);\r
}\r
\r
- public String put(String[] key, String value) throws EdkException {\r
+ public String put(String[] key, String value) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
return (String)map.put(toolChainKey, value);\r
}\r
}\r
return (String)map.put(toolChainKey, value);\r
}\r
return (String)map.put(key, value);\r
}\r
\r
return (String)map.put(key, value);\r
}\r
\r
- public String get(String key) throws EdkException {\r
+ public String get(String key) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
return get(toolChainKey);\r
}\r
\r
}\r
return get(toolChainKey);\r
}\r
\r
- public String get(String key, String delimiter) throws EdkException {\r
+ public String get(String key, String delimiter) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key, delimiter);\r
} catch (Exception e) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key, delimiter);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
return get(toolChainKey);\r
}\r
\r
}\r
return get(toolChainKey);\r
}\r
\r
- public String get(String[] key) throws EdkException {\r
+ public String get(String[] key) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
ToolChainKey toolChainKey;\r
\r
try {\r
toolChainKey = new ToolChainKey(key);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
return get(toolChainKey);\r
}\r
\r
}\r
return get(toolChainKey);\r
}\r
\r
- public String get(ToolChainKey key) throws EdkException {\r
+ public String get(ToolChainKey key) {\r
String result = map.get(key);\r
if (result != null || map.containsKey(key)) {\r
return result;\r
String result = map.get(key);\r
if (result != null || map.containsKey(key)) {\r
return result;\r
try {\r
tmpKey = new ToolChainKey(keySet);\r
} catch (Exception e) {\r
try {\r
tmpKey = new ToolChainKey(keySet);\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
\r
int level = matchLevel;\r
}\r
\r
int level = matchLevel;\r
continue;\r
}\r
} catch (Exception e) {\r
continue;\r
}\r
} catch (Exception e) {\r
- throw new EdkException(e.getMessage());\r
}\r
\r
result = map.get(tmpKey);\r
}\r
\r
result = map.get(tmpKey);\r
public Set<ToolChainKey> keySet() {\r
return (Set<ToolChainKey>)map.keySet();\r
}\r
public Set<ToolChainKey> keySet() {\r
return (Set<ToolChainKey>)map.keySet();\r
}\r
- \r
-// public String toString() {\r
-// return map.toString();\r
-// }\r