Support using @ToolChainFamily in <Filename> to do the filter. This is also to fix...
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / global / SurfaceAreaQuery.java
index 1e95eb2b1a82b64dd6009297a665a01ee52255fa..6afeb30f5a5b5b8251e037f6c7cc41eede187556 100644 (file)
@@ -38,7 +38,6 @@ import org.tianocore.build.id.PackageIdentification;
 import org.tianocore.build.id.PlatformIdentification;\r
 import org.tianocore.build.toolchain.ToolChainInfo;\r
 import org.tianocore.common.exception.EdkException;\r
-import org.tianocore.common.logger.EdkLog;\r
 import org.w3c.dom.Node;\r
 \r
 /**\r
@@ -249,22 +248,32 @@ public class SurfaceAreaQuery {
         returns = get("SourceFiles", xPath);\r
 \r
         if (returns == null || returns.length == 0) {\r
-            return new String[0][0];\r
+            return new String[0][3];\r
         }\r
 \r
         Filename[] sourceFileNames = (Filename[]) returns;\r
         List<String[]> outputList = new ArrayList<String[]>();\r
         for (int i = 0; i < sourceFileNames.length; i++) {\r
             List archList = sourceFileNames[i].getSupArchList();\r
-            if (arch == null || arch.equalsIgnoreCase("") || archList == null || contains(archList, arch)) {\r
-                outputList.add(new String[] {sourceFileNames[i].getToolCode(),sourceFileNames[i].getStringValue()});\r
+            if (arch == null || arch.trim().equalsIgnoreCase("") || archList == null || contains(archList, arch)) {\r
+                outputList.add(new String[] {sourceFileNames[i].getToolCode(), sourceFileNames[i].getStringValue(), sourceFileNames[i].getToolChainFamily()});\r
             }\r
         }\r
 \r
-        String[][] outputString = new String[outputList.size()][2];\r
+        String[][] outputString = new String[outputList.size()][3];\r
         for (int index = 0; index < outputList.size(); index++) {\r
+            //\r
+            // ToolCode (FileType)\r
+            //\r
             outputString[index][0] = outputList.get(index)[0];\r
+            //\r
+            // File name (relative to MODULE_DIR)\r
+            //\r
             outputString[index][1] = outputList.get(index)[1];\r
+            //\r
+            // Tool chain family\r
+            //\r
+            outputString[index][2] = outputList.get(index)[2];\r
         }\r
         return outputString;\r
     }\r