]> git.proxmox.com Git - mirror_edk2.git/commitdiff
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 782b2714d33d88ace7c7110b5308ebb5f08f3b61..9c94fb6ea6cb19988d08a7e7da9f09d3ed89026e 100644 (file)
@@ -616,32 +616,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
         </targetfiles>\r
 \r
         <sequential>\r
         </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
           <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
               <LINK.ARG/>\r
-              <!-- <argument value="/ENTRY:_ModuleEntryPoint"/> -->\r
               <EntryPoint value="_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
               <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
               <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
               <OutputFile value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/>\r
+              <FileList dir="" files="${OBJECTS}"/>\r
             </command>\r
           </cc>\r
         </sequential>\r
             </command>\r
           </cc>\r
         </sequential>\r
index d3df8cf7a660f153acc1138741b1e7c1adafb1b3..c4c53e04b9346f232b706d5e6db72a8cda6b9116 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
       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
         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
         }\r
         getProject().setProperty("LIBS", str);\r
        \r
index 2d91991b8a9b92fe07eac3d8d33c5eff4ff5896b..2104a51e622b735289ce53df57db64e3e21122ea 100644 (file)
@@ -237,8 +237,8 @@ public class GenBuildTask extends Task {
         // Update flags like CC_FLAGS, LIB_FLAGS etc.\r
         //\r
         flagsSetup();\r
         // 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
         //\r
         // If ComponentType is USER_DEFINED,\r
         // then call the exist BaseName_build.xml directly.\r
index 611758a4effd0950e5e20f5e8a2f19badbef3e08..e457d6dbe97598daa78ec276d0511585bce34805 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
       @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
         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
       @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
     }\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
       @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
     }\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
       @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
     }\r
 \r
     /**\r