import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;\r
import org.tianocore.build.toolchain.ToolChainElement;\r
import org.tianocore.build.toolchain.ToolChainMap;\r
+import org.tianocore.build.toolchain.ToolChainInfo;\r
import org.w3c.dom.NamedNodeMap;\r
import org.w3c.dom.Node;\r
import org.w3c.dom.NodeList;\r
parseToolChainFamilyOptions();\r
parseToolChainOptions();\r
\r
+ //\r
+ // check if the tool chain is valid or not\r
+ // \r
+ checkToolChain();\r
+\r
saq.push(map);\r
\r
//\r
}\r
}\r
}\r
+\r
+\r
+ private void checkToolChain() throws EdkException {\r
+ ToolChainInfo toolChainInfo = GlobalData.getToolChainInfo();\r
+\r
+ if (toolChainInfo.getTargets().length == 0) {\r
+ throw new EdkException("No valid target found! "+\r
+ "Please check the TARGET definition in Tools/Conf/target.txt, "+\r
+ "or the <BuildTarget>, <BuildOptions> in the FPD file.");\r
+ }\r
+\r
+ if (toolChainInfo.getTagnames().length == 0) {\r
+ throw new EdkException("No valid tool chain found! "+\r
+ "Please check the TOOL_CHAIN_TAG definition in Tools/Conf/target.txt, "+\r
+ "or the <BuildOptions> in the FPD file.");\r
+ }\r
+\r
+ if (toolChainInfo.getArchs().length == 0) {\r
+ throw new EdkException("No valid architecture found! "+\r
+ "Please check the TARGET_ARCH definition in Tools/Conf/target.txt, "+\r
+ "or the <SupportedArchitectures>, <BuildOptions> in the FPD file.");\r
+ }\r
+\r
+ if (toolChainInfo.getCommands().length == 0) {\r
+ throw new EdkException("No valid COMMAND found! Please check the tool chain definitions "+\r
+ "in Tools/Conf/tools_def.txt.");\r
+ }\r
+ }\r
}\r