Fixed the build error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1899 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -49,6 +49,7 @@ import org.tianocore.build.id.PlatformIdentification;
|
|||||||
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
||||||
import org.tianocore.build.toolchain.ToolChainElement;
|
import org.tianocore.build.toolchain.ToolChainElement;
|
||||||
import org.tianocore.build.toolchain.ToolChainMap;
|
import org.tianocore.build.toolchain.ToolChainMap;
|
||||||
|
import org.tianocore.build.toolchain.ToolChainInfo;
|
||||||
import org.w3c.dom.NamedNodeMap;
|
import org.w3c.dom.NamedNodeMap;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
@ -447,6 +448,11 @@ public class FpdParserTask extends Task {
|
|||||||
parseToolChainFamilyOptions();
|
parseToolChainFamilyOptions();
|
||||||
parseToolChainOptions();
|
parseToolChainOptions();
|
||||||
|
|
||||||
|
//
|
||||||
|
// check if the tool chain is valid or not
|
||||||
|
//
|
||||||
|
checkToolChain();
|
||||||
|
|
||||||
saq.push(map);
|
saq.push(map);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -768,4 +774,25 @@ public class FpdParserTask extends Task {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void checkToolChain() throws EdkException {
|
||||||
|
ToolChainInfo toolChainInfo = GlobalData.getToolChainInfo();
|
||||||
|
|
||||||
|
if (toolChainInfo.getTargets().length == 0) {
|
||||||
|
throw new EdkException("No valid target specified! Please check your TARGET definition in Tools/Conf/target.txt.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (toolChainInfo.getTagnames().length == 0) {
|
||||||
|
throw new EdkException("No valid tool chain specified! Please check your TOOL_CHAIN_TAG definition in Tools/Conf/target.txt.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (toolChainInfo.getArchs().length == 0) {
|
||||||
|
throw new EdkException("No valid ARCH specified! Please check your TARGET_ARCH definition in Tools/Conf/target.txt.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (toolChainInfo.getCommands().length == 0) {
|
||||||
|
throw new EdkException("No valid COMMAND specified! Please check your TARGET definition in Tools/Conf/tools_def.txt.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -682,7 +682,7 @@ public class GlobalData {
|
|||||||
///
|
///
|
||||||
/// Tool Chain Related, try to refine and put some logic process to ToolChainFactory
|
/// Tool Chain Related, try to refine and put some logic process to ToolChainFactory
|
||||||
///
|
///
|
||||||
public synchronized static ToolChainInfo getToolChainInfo() throws EdkException {
|
public synchronized static ToolChainInfo getToolChainInfo() {
|
||||||
if (toolChainInfo == null) {
|
if (toolChainInfo == null) {
|
||||||
toolChainInfo = toolsDef.getConfigInfo().intersection(toolChainEnvInfo);
|
toolChainInfo = toolsDef.getConfigInfo().intersection(toolChainEnvInfo);
|
||||||
if (toolChainPlatformInfo != null) {
|
if (toolChainPlatformInfo != null) {
|
||||||
@ -691,22 +691,6 @@ public class GlobalData {
|
|||||||
toolChainInfo.addCommands(toolsDef.getConfigInfo().getCommands());
|
toolChainInfo.addCommands(toolsDef.getConfigInfo().getCommands());
|
||||||
toolChainInfo.normalize();
|
toolChainInfo.normalize();
|
||||||
|
|
||||||
if (toolChainInfo.getTargets().length == 0) {
|
|
||||||
throw new EdkException("No valid target specified! Please check your TARGET definition in Tools/Conf/target.txt.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toolChainInfo.getTagnames().length == 0) {
|
|
||||||
throw new EdkException("No valid tool chain specified! Please check your TOOL_CHAIN_TAG definition in Tools/Conf/target.txt.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toolChainInfo.getArchs().length == 0) {
|
|
||||||
throw new EdkException("No valid ARCH specified! Please check your TARGET_ARCH definition in Tools/Conf/target.txt.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toolChainInfo.getCommands().length == 0) {
|
|
||||||
throw new EdkException("No valid COMMAND specified! Please check your TARGET definition in Tools/Conf/tools_def.txt.");
|
|
||||||
}
|
|
||||||
|
|
||||||
EdkLog.log("Init", EdkLog.EDK_ALWAYS, "Current build tool chain information summary: ");
|
EdkLog.log("Init", EdkLog.EDK_ALWAYS, "Current build tool chain information summary: ");
|
||||||
EdkLog.log("Init", EdkLog.EDK_ALWAYS, toolChainInfo + "");
|
EdkLog.log("Init", EdkLog.EDK_ALWAYS, toolChainInfo + "");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user