X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FGenBuild%2Forg%2Ftianocore%2Fbuild%2Fglobal%2FGlobalData.java;h=51f198571a9241a11999f017d2697e3a75cdb242;hp=f3f0a048d92332936ba114166bc81c0e6a297f8c;hb=23583a8891e878633a430212502dfa97fd143573;hpb=de4bb9f6edc1db82e0616b24e6685b27d2b66061 diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java index f3f0a048d9..51f198571a 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java @@ -230,7 +230,6 @@ public class GlobalData { } } } catch (Exception e) { - e.printStackTrace(); throw new BuildException("Parse workspace Database [" + dbFile.getPath() + "] Error.\n" + e.getMessage()); } } @@ -689,6 +688,19 @@ public class GlobalData { moduleToolChainFamilyOption.put(fpdModuleId, toolChainOption); } + public static boolean isCommandSet(String target, String toolchain, String arch) { + String[] commands = getToolChainInfo().getCommands(); + + for (int i = 0; i < commands.length; ++i) { + String cmdName = toolsDef.getConfig().get(new String[] {target, toolchain, arch, commands[i], ToolChainAttribute.NAME.toString()}); + if (cmdName != null && cmdName.length() != 0) { + return true; + } + } + + return false; + } + public static String getCommandSetting(String[] commandDescription, FpdModuleIdentification fpdModuleId) throws EdkException { ToolChainKey toolChainKey = new ToolChainKey(commandDescription); ToolChainMap toolChainConfig = toolsDef.getConfig();