summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-04-26 02:44:39 +0000
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-04-26 02:44:39 +0000
commit61746a87be58d12489f9c82e2e6e2fd5837626fc (patch)
tree952cf88f5f1d6e1ff6dbf60e4a8ddf67e0d3b9a2 /Tools
parent6cfb0c24a8c22b1379f72f089334112b3d271f9a (diff)
downloadedk2-platforms-61746a87be58d12489f9c82e2e6e2fd5837626fc.tar.xz
Fix a bug on GenBuild and have a minor update on BuildMacro.xml
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@35 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Conf/BuildMacro.xml20
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java8
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java4
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java16
4 files changed, 17 insertions, 31 deletions
diff --git a/Tools/Conf/BuildMacro.xml b/Tools/Conf/BuildMacro.xml
index 782b2714d3..9c94fb6ea6 100644
--- a/Tools/Conf/BuildMacro.xml
+++ b/Tools/Conf/BuildMacro.xml
@@ -616,32 +616,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</targetfiles>
<sequential>
- <!-- <echo>re-generate dll</echo> -->
- <cc userdefine="on">
- <command type="LIB">
- <argument value="${LIB_FLAGS}"/>
- <FileList dir="" files="${OBJECTS}"/>
- <LIB.ARG/>
- <!-- <argument value="/OUT:${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/> -->
- <OutputFile value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/>
- </command>
- </cc>
-
<cc userdefine="on">
<command type="LINK">
<argument value="${LINK_FLAGS}"/>
- <!-- <argument value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/> -->
- <!--<argument value="${LIBS}"/>-->
- <libSet libs="${LIBS} ${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}Local.lib"/>
+ <libset libs="${LIBS}"/>
<LINK.ARG/>
- <!-- <argument value="/ENTRY:_ModuleEntryPoint"/> -->
<EntryPoint value="_ModuleEntryPoint"/>
- <!-- <argument value="/MAP:${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.map"/> -->
<map value="${DEST_DIR_OUTPUT}\@{FILEPATH}\@{FILENAME}.map"/>
- <!-- <argument value="/PDB:${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pdb"/> -->
<pdb value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.pdb"/>
- <!-- <argument value="/OUT:${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/> -->
<OutputFile value="${DEST_DIR_DEBUG}\@{FILEPATH}\@{FILENAME}.dll"/>
+ <FileList dir="" files="${OBJECTS}"/>
</command>
</cc>
</sequential>
diff --git a/Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java b/Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java
index d3df8cf7a6..c4c53e04b9 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/ExpandTask.java
@@ -40,11 +40,13 @@ public class ExpandTask extends Task {
Set <code>LIBS</code> for further build usage.
**/
public void execute() throws BuildException {
-
- String[] libraries = GlobalData.getModuleLibrary(getProject().getProperty("BASE_NAME"));
+ String basename = getProject().getProperty("BASE_NAME");
+ String arch = getProject().getProperty("ARCH");
+ arch = arch.toUpperCase();
+ String[] libraries = GlobalData.getModuleLibrary(basename, arch);
String str = "";
for (int i = 0; i < libraries.length; i ++){
- str += " " + GlobalData.getLibrary(libraries[i]);
+ str += " " + GlobalData.getLibrary(libraries[i], arch);
}
getProject().setProperty("LIBS", str);
diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
index 2d91991b8a..2104a51e62 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
@@ -237,8 +237,8 @@ public class GenBuildTask extends Task {
// Update flags like CC_FLAGS, LIB_FLAGS etc.
//
flagsSetup();
- GlobalData.addLibrary(baseName, getProject().getProperty("BIN_DIR") + File.separatorChar + baseName + ".lib");
- GlobalData.addModuleLibrary(baseName, libraries);
+ GlobalData.addLibrary(baseName, arch, getProject().getProperty("BIN_DIR") + File.separatorChar + baseName + ".lib");
+ GlobalData.addModuleLibrary(baseName, arch, libraries);
//
// If ComponentType is USER_DEFINED,
// then call the exist BaseName_build.xml directly.
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
index 611758a4ef..e457d6dbe9 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
@@ -326,8 +326,8 @@ public class GlobalData {
@param moduleName the base name of the module
@return the libraries which the module depends on
**/
- public synchronized static String[] getModuleLibrary(String moduleName) {
- Set<String> set = moduleLibraryMap.get(moduleName);
+ public synchronized static String[] getModuleLibrary(String moduleName, String arch) {
+ Set<String> set = moduleLibraryMap.get(moduleName + "-" + arch);
return set.toArray(new String[set.size()]);
}
@@ -337,8 +337,8 @@ public class GlobalData {
@param moduleName the base name of the module
@param libraryList the libraries which the module depends on
**/
- public synchronized static void addModuleLibrary(String moduleName, Set<String> libraryList) {
- moduleLibraryMap.put(moduleName, libraryList);
+ public synchronized static void addModuleLibrary(String moduleName, String arch, Set<String> libraryList) {
+ moduleLibraryMap.put(moduleName + "-" + arch, libraryList);
}
/**
@@ -347,8 +347,8 @@ public class GlobalData {
@param library the base name of the library
@return the library absolute file name
**/
- public synchronized static String getLibrary(String library) {
- return libraries.get(library);
+ public synchronized static String getLibrary(String library, String arch) {
+ return libraries.get(library + "-" + arch);
}
/**
@@ -357,8 +357,8 @@ public class GlobalData {
@param library the base name of the library
@param resultPath the library absolute file name
**/
- public synchronized static void addLibrary(String library, String resultPath) {
- libraries.put(library, resultPath);
+ public synchronized static void addLibrary(String library, String arch, String resultPath) {
+ libraries.put(library + "-" + arch, resultPath);
}
/**