X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FGenBuild%2Forg%2Ftianocore%2Fbuild%2FGenBuildTask.java;h=e968fce041ab36cf4eca61daa75e1fc8e9221367;hp=bac506abfa3f0161ff999a6c096b326474b77f2a;hb=52cbbdbc1680859f5303150d0699a1ebfaa485a4;hpb=196ad8d77c4a256e6a9b432541d688d2f40f4614 diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java index bac506abfa..e968fce041 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -16,6 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. package org.tianocore.build; import java.io.File; +import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; import java.util.LinkedHashSet; @@ -194,14 +195,29 @@ public class GenBuildTask extends Ant { // If single module : intersection MSA supported ARCHs and tools def!! // else, get arch from pass down // - String[] archList = new String[0]; - if ( getProject().getProperty("ARCH") != null ) { - archList = getProject().getProperty("ARCH").split(" "); + Set archListSupByToolChain = new LinkedHashSet(); + String[] archs = GlobalData.getToolChainInfo().getArchs(); + + for (int i = 0; i < archs.length; i ++) { + archListSupByToolChain.add(archs[i]); + } + + Set archSet = new LinkedHashSet(); + + if ( getProject().getProperty("ARCH") != null) { + String[] fpdArchList = getProject().getProperty("ARCH").split(" "); + + for (int i = 0; i < fpdArchList.length; i++) { + if (archListSupByToolChain.contains(fpdArchList[i])) { + archSet.add(fpdArchList[i]); + } + } } else { - archList = GlobalData.getToolChainInfo().getArchs(); + archSet = archListSupByToolChain; } - + + String[] archList = archSet.toArray(new String[archSet.size()]); // // Judge if arch is all supported by current module. If not, throw Exception. @@ -216,6 +232,7 @@ public class GenBuildTask extends Ant { } for (int k = 0; k < archList.length; k++) { + getProject().setProperty("ARCH", archList[k]); FpdModuleIdentification fpdModuleId = new FpdModuleIdentification(moduleId, archList[k]); @@ -223,8 +240,9 @@ public class GenBuildTask extends Ant { // // Whether the module is built before // - if (GlobalData.isModuleBuilt(fpdModuleId)) { - return ; + if ((moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false) + || GlobalData.isModuleBuilt(fpdModuleId)) { + return; } else { GlobalData.registerBuiltModule(fpdModuleId);