diff options
author | wuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-13 10:47:11 +0000 |
---|---|---|
committer | wuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-13 10:47:11 +0000 |
commit | 3c696250f53e857cb54293e90b9e8e10ef4d18b7 (patch) | |
tree | 9336207e9fedd734d5ff1cc2aecaffe17fc0299b | |
parent | 726c26e43b941b4976798509a77b288f5f6b6cb5 (diff) | |
download | edk2-platforms-3c696250f53e857cb54293e90b9e8e10ef4d18b7.tar.xz |
Enhance Arch check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@975 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 1c97da2825..ec2fd1ad2f 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,7 +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 = GlobalData.getToolChainInfo().getArchs();
+ Set<String> archListSupByToolChain = new LinkedHashSet<String>();
+ String[] archs = GlobalData.getToolChainInfo().getArchs();
+
+ for (int i = 0; i < archs.length; i ++) {
+ archListSupByToolChain.add(archs[i]);
+ }
+
+ Set<String> archSet = new LinkedHashSet<String>();
+
+ 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 {
+ archSet = archListSupByToolChain;
+ }
+
+ String[] archList = archSet.toArray(new String[archSet.size()]);
//
// Judge if arch is all supported by current module. If not, throw Exception.
@@ -209,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]);
|