mirror of https://github.com/acidanthera/audk.git
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:
parent
2b0fe8b4a4
commit
05b52e9665
|
@ -49,6 +49,7 @@ import org.tianocore.build.id.PlatformIdentification;
|
|||
import org.tianocore.build.pcd.action.PlatformPcdPreprocessActionForBuilding;
|
||||
import org.tianocore.build.toolchain.ToolChainElement;
|
||||
import org.tianocore.build.toolchain.ToolChainMap;
|
||||
import org.tianocore.build.toolchain.ToolChainInfo;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
@ -447,6 +448,11 @@ public class FpdParserTask extends Task {
|
|||
parseToolChainFamilyOptions();
|
||||
parseToolChainOptions();
|
||||
|
||||
//
|
||||
// check if the tool chain is valid or not
|
||||
//
|
||||
checkToolChain();
|
||||
|
||||
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
|
||||
///
|
||||
public synchronized static ToolChainInfo getToolChainInfo() throws EdkException {
|
||||
public synchronized static ToolChainInfo getToolChainInfo() {
|
||||
if (toolChainInfo == null) {
|
||||
toolChainInfo = toolsDef.getConfigInfo().intersection(toolChainEnvInfo);
|
||||
if (toolChainPlatformInfo != null) {
|
||||
|
@ -691,22 +691,6 @@ public class GlobalData {
|
|||
toolChainInfo.addCommands(toolsDef.getConfigInfo().getCommands());
|
||||
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, toolChainInfo + "");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue