Fix a bug on GenBuild and have a minor update on BuildMacro.xml
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Apr 2006 02:44:39 +0000 (02:44 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 26 Apr 2006 02:44:39 +0000 (02:44 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@35 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Conf/BuildMacro.xml
Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java
Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java

index 782b271..9c94fb6 100644 (file)
@@ -616,32 +616,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
 \r
         <sequential>\r
-          <!-- <echo>re-generate dll</echo> -->\r
-          <cc userdefine="on">\r
-            <command type="LIB">\r
-              <argument value="${LIB_FLAGS}"/>\r
-              <FileList dir="" files="${OBJECTS}"/>\r
-              <LIB.ARG/>\r
-              <!-- <argument value="/OUT:${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/> -->\r
-              <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/>\r
-            </command>\r
-          </cc>\r
-    \r
           <cc userdefine="on">\r
             <command type="LINK">\r
               <argument value="${LINK_FLAGS}"/>\r
-              <!-- <argument value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/> -->\r
-              <!--<argument value="${LIBS}"/>-->\r
-              <libSet libs="${LIBS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/>\r
+              <libset libs="${LIBS}"/>\r
               <LINK.ARG/>\r
-              <!-- <argument value="/ENTRY:_ModuleEntryPoint"/> -->\r
               <EntryPoint value="_ModuleEntryPoint"/>\r
-              <!-- <argument value="/MAP:${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.map"/> -->\r
               <map value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.map"/>\r
-              <!-- <argument value="/PDB:${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pdb"/> -->\r
               <pdb value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pdb"/>\r
-              <!-- <argument value="/OUT:${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/> -->\r
               <OutputFile value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/>\r
+              <FileList dir="" files="${OBJECTS}"/>\r
             </command>\r
           </cc>\r
         </sequential>\r
index d3df8cf..c4c53e0 100644 (file)
@@ -40,11 +40,13 @@ public class ExpandTask extends Task {
       Set <code>LIBS</code> for further build usage. \r
     **/\r
     public void execute() throws BuildException {\r
-        \r
-        String[] libraries = GlobalData.getModuleLibrary(getProject().getProperty("BASE_NAME"));\r
+        String basename = getProject().getProperty("BASE_NAME");\r
+        String arch = getProject().getProperty("ARCH");\r
+        arch = arch.toUpperCase();\r
+        String[] libraries = GlobalData.getModuleLibrary(basename, arch);\r
         String str = "";\r
         for (int i = 0; i < libraries.length; i ++){\r
-            str += " " + GlobalData.getLibrary(libraries[i]);\r
+            str += " " + GlobalData.getLibrary(libraries[i], arch);\r
         }\r
         getProject().setProperty("LIBS", str);\r
        \r
index 2d91991..2104a51 100644 (file)
@@ -237,8 +237,8 @@ public class GenBuildTask extends Task {
         // Update flags like CC_FLAGS, LIB_FLAGS etc.\r
         //\r
         flagsSetup();\r
-        GlobalData.addLibrary(baseName, getProject().getProperty("BIN_DIR") + File.separatorChar + baseName + ".lib");\r
-        GlobalData.addModuleLibrary(baseName, libraries);\r
+        GlobalData.addLibrary(baseName, arch, getProject().getProperty("BIN_DIR") + File.separatorChar + baseName + ".lib");\r
+        GlobalData.addModuleLibrary(baseName, arch, libraries);\r
         //\r
         // If ComponentType is USER_DEFINED,\r
         // then call the exist BaseName_build.xml directly.\r
index 611758a..e457d6d 100644 (file)
@@ -326,8 +326,8 @@ public class GlobalData {
       @param moduleName the base name of the module\r
       @return the libraries which the module depends on\r
     **/\r
-    public synchronized static String[] getModuleLibrary(String moduleName) {\r
-        Set<String> set = moduleLibraryMap.get(moduleName);\r
+    public synchronized static String[] getModuleLibrary(String moduleName, String arch) {\r
+        Set<String> set = moduleLibraryMap.get(moduleName + "-" + arch);\r
         return set.toArray(new String[set.size()]);\r
     }\r
 \r
@@ -337,8 +337,8 @@ public class GlobalData {
       @param moduleName the base name of the module\r
       @param libraryList the libraries which the module depends on\r
     **/\r
-    public synchronized static void addModuleLibrary(String moduleName, Set<String> libraryList) {\r
-        moduleLibraryMap.put(moduleName, libraryList);\r
+    public synchronized static void addModuleLibrary(String moduleName, String arch, Set<String> libraryList) {\r
+        moduleLibraryMap.put(moduleName + "-" + arch, libraryList);\r
     }\r
 \r
     /**\r
@@ -347,8 +347,8 @@ public class GlobalData {
       @param library the base name of the library\r
       @return the library absolute file name\r
     **/\r
-    public synchronized static String getLibrary(String library) {\r
-        return libraries.get(library);\r
+    public synchronized static String getLibrary(String library, String arch) {\r
+        return libraries.get(library + "-" + arch);\r
     }\r
 \r
     /**\r
@@ -357,8 +357,8 @@ public class GlobalData {
       @param library the base name of the library\r
       @param resultPath the library absolute file name\r
     **/\r
-    public synchronized static void addLibrary(String library, String resultPath) {\r
-        libraries.put(library, resultPath);\r
+    public synchronized static void addLibrary(String library, String arch, String resultPath) {\r
+        libraries.put(library + "-" + arch, resultPath);\r
     }\r
 \r
     /**\r