///\r
/// Tool Chain Related, try to refine and put some logic process to ToolChainFactory\r
///\r
- public synchronized static ToolChainInfo getToolChainInfo() {\r
+ public synchronized static ToolChainInfo getToolChainInfo() throws EdkException {\r
if (toolChainInfo == null) {\r
toolChainInfo = toolsDef.getConfigInfo().intersection(toolChainEnvInfo);\r
if (toolChainPlatformInfo != null) {\r
}\r
toolChainInfo.addCommands(toolsDef.getConfigInfo().getCommands());\r
toolChainInfo.normalize();\r
+\r
+ if (toolChainInfo.getTargets().length == 0) {\r
+ throw new EdkException("No valid target specified! Please check your TARGET definition in Tools/Conf/target.txt.");\r
+ }\r
+\r
+ if (toolChainInfo.getTagnames().length == 0) {\r
+ throw new EdkException("No valid tool chain specified! Please check your TOOL_CHAIN_TAG definition in Tools/Conf/target.txt.");\r
+ }\r
+\r
+ if (toolChainInfo.getArchs().length == 0) {\r
+ throw new EdkException("No valid ARCH specified! Please check your TARGET_ARCH definition in Tools/Conf/target.txt.");\r
+ }\r
+\r
+ if (toolChainInfo.getCommands().length == 0) {\r
+ throw new EdkException("No valid COMMAND specified! Please check your TARGET definition in Tools/Conf/tools_def.txt.");\r
+ }\r
+\r
EdkLog.log("Init", EdkLog.EDK_ALWAYS, "Current build tool chain information summary: ");\r
EdkLog.log("Init", EdkLog.EDK_ALWAYS, toolChainInfo + "");\r
}\r
msaFamilyBuildOption.put(moduleId, toolChainOption);\r
}\r
\r
- public static boolean isCommandSet(String target, String toolchain, String arch) {\r
+ public static boolean isCommandSet(String target, String toolchain, String arch) throws EdkException {\r
String[] commands = getToolChainInfo().getCommands();\r
\r
for (int i = 0; i < commands.length; ++i) {\r