From 1549f5163ddd610803d3795f3eb7430dc3666080 Mon Sep 17 00:00:00 2001 From: jwang36 Date: Sun, 8 Oct 2006 16:07:32 +0000 Subject: [PATCH] Changed the way of using precompiled header in the build process. Now the use of precompiled header is controlled by tools_def.txt. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1690 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkNt32Pkg/Sec/SecMain_build.xml | 5 + Tools/Conf/BuildMacro.xml | 149 +++++++----------- Tools/Conf/tools_def.template | 18 ++- .../org/tianocore/build/GenBuildTask.java | 3 + .../build/ModuleBuildFileGenerator.java | 7 + 5 files changed, 82 insertions(+), 100 deletions(-) diff --git a/EdkNt32Pkg/Sec/SecMain_build.xml b/EdkNt32Pkg/Sec/SecMain_build.xml index 0b2996ad34..5a27f5c1b9 100644 --- a/EdkNt32Pkg/Sec/SecMain_build.xml +++ b/EdkNt32Pkg/Sec/SecMain_build.xml @@ -74,6 +74,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + + + + diff --git a/Tools/Conf/BuildMacro.xml b/Tools/Conf/BuildMacro.xml index b149cd6964..dc5bcfb5ea 100644 --- a/Tools/Conf/BuildMacro.xml +++ b/Tools/Conf/BuildMacro.xml @@ -14,9 +14,59 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Macro for intialize some properties. This Macro build will be called before source file build. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -60,25 +110,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - - - - - - - - - - - - - - + @@ -112,44 +148,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -170,22 +168,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - - - - - - - - - - - + @@ -645,25 +632,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - - - - - - - - - - - - - - + @@ -722,25 +695,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - - - - - - - - - - - - - - + diff --git a/Tools/Conf/tools_def.template b/Tools/Conf/tools_def.template index 33a22e43c0..53f2648d6e 100644 --- a/Tools/Conf/tools_def.template +++ b/Tools/Conf/tools_def.template @@ -353,19 +353,22 @@ RELEASE_VS2005PRO_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF *_MYTOOLS_IA32_PP_NAME = cl.exe *_MYTOOLS_IA32_ASM_NAME = ml.exe *_MYTOOLS_IA32_ASM_EXT = .asm +*_MYTOOLS_IA32_PCH_NAME = cl.exe *_MYTOOLS_IA32_*_PATH = C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin *_MYTOOLS_IA32_*_DPATH = C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE *_MYTOOLS_IA32_ASMLINK_PATH = C:\WINDDK\3790.1830\bin\bin16\ *_MYTOOLS_IA32_PP_FLAGS = /nologo /P /TC /FI${DEST_DIR_DEBUG}/AutoGen.h -DEBUG_MYTOOLS_IA32_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm -RELEASE_MYTOOLS_IA32_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 +DEBUG_MYTOOLS_IA32_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch +RELEASE_MYTOOLS_IA32_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch DEBUG_MYTOOLS_IA32_ASM_FLAGS = /nologo /W3 /WX /c /coff /Cx /Zd /W0 /Zi RELEASE_MYTOOLS_IA32_ASM_FLAGS = /nologo /W3 /WX /c /coff /Cx /Zd /W0 *_MYTOOLS_IA32_SLINK_FLAGS = /nologo /LTCG DEBUG_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /MACHINE:I386 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text +DEBUG_MYTOOLS_IA32_PCH_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch +RELEASE_MYTOOLS_IA32_PCH_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /O1ib2 /GL /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Gs8192 /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch ################## # x64 definitions @@ -377,6 +380,7 @@ RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF / *_MYTOOLS_X64_DLINK_NAME = link.exe *_MYTOOLS_X64_ASMLINK_NAME = link.exe *_MYTOOLS_X64_PP_NAME = cl.exe +*_MYTOOLS_X64_PCH_NAME = cl.exe *_MYTOOLS_X64_SLINK_FLAGS = /nologo /LTCG @@ -386,12 +390,14 @@ RELEASE_MYTOOLS_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF / *_MYTOOLS_X64_ASMLINK_PATH = C:\WINDDK\3790.1830\bin\bin16\ *_MYTOOLS_X64_PP_FLAGS = /nologo /P /TC /FI${DEST_DIR_DEBUG}/AutoGen.h -DEBUG_MYTOOLS_X64_CC_FLAGS = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Zi /Gm /EHs-c- /GF -RELEASE_MYTOOLS_X64_CC_FLAGS = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF +DEBUG_MYTOOLS_X64_CC_FLAGS = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Zi /Gm /EHs-c- /GF /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch +RELEASE_MYTOOLS_X64_CC_FLAGS = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch DEBUG_MYTOOLS_X64_ASM_FLAGS = /nologo /W3 /WX /c /Cx /Zd /Zi RELEASE_MYTOOLS_X64_ASM_FLAGS = /nologo /W3 /WX /c /Cx /Zd DEBUG_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /DEBUG RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /Machine:AMD64 /LTCG /DLL /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text +DEBUG_MYTOOLS_X64_PCH_FLAGS = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Zi /Gm /EHs-c- /GF /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch +RELEASE_MYTOOLS_X64_PCH_FLAGS = /nologo /X /W4 /WX /c /Gs8192 /GS- /D UNICODE /O1ib2s /GL /Gy /D EFIX64 /DOLDSMM=1 /D EFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /EHs-c- /GF /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch ################## # IPF definitions @@ -402,6 +408,7 @@ RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /O *_MYTOOLS_IPF_CC_NAME = cl.exe *_MYTOOLS_IPF_SLINK_NAME = lib.exe *_MYTOOLS_IPF_DLINK_NAME = link.exe +*_MYTOOLS_IPF_PCH_NAME = cl.exe *_MYTOOLS_IPF_SLINK_FLAGS = /nologo /LTCG @@ -410,9 +417,10 @@ RELEASE_MYTOOLS_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4086 /OPT:REF /O *_MYTOOLS_IPF_*_PATH = C:\WINDDK\3790.1830\bin\win64\x86 *_MYTOOLS_IPF_PP_FLAGS = /nologo /P /TC -*_MYTOOLS_IPF_CC_FLAGS = /GS- /nologo /W4 /WX /EHs-c- /Gy /c /D EFI64 /O1i /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h +*_MYTOOLS_IPF_CC_FLAGS = /GS- /nologo /W4 /WX /EHs-c- /Gy /c /D EFI64 /O1i /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /Yu${DEST_DIR_DEBUG}/AutoGen.h /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch *_MYTOOLS_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 *_MYTOOLS_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /OPT:REF /IGNORE:4086 /MAP /MACHINE:IA64 /ENTRY:${ENTRYPOINT} /SUBSYSTEM:CONSOLE /MAP:${DEST_DIR_DEBUG}/${BASE_NAME}.map /PDB:${DEST_DIR_DEBUG}/${BASE_NAME}.pdb +*_MYTOOLS_IPF_PCH_FLAGS = /GS- /nologo /W4 /WX /EHs-c- /Gy /c /D EFI64 /O1i /DEFI_FIRMWARE_VENDOR=L\"INTEL\" /DSTRING_ARRAY_NAME=${BASE_NAME}Strings /FI${DEST_DIR_DEBUG}/AutoGen.h /TC /Yc /Fp${DEST_DIR_OUTPUT}/AutoGen.h.gch ################## # EBC definitions diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 99767ab4f2..d614e67865 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -480,6 +480,9 @@ public class GenBuildTask extends Ant { String cmdPath = GlobalData.getCommandSetting(key, fpdModuleId); key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_NAME; String cmdName = GlobalData.getCommandSetting(key, fpdModuleId); + if (cmdName.length() == 0) { + continue; + } File cmdFile = new File(cmdPath + File.separatorChar + cmdName); getProject().setProperty(cmd[m], cmdFile.getPath().replaceAll("(\\\\)", "/")); diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java index c02bc1fce8..195ffdef71 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java @@ -374,6 +374,13 @@ public class ModuleBuildFileGenerator { // Initialize some properties by user // Element initEle = document.createElement("Build_Init"); + Element initIncEle = document.createElement("EXTRA.INC"); + for (int i = 0; i < includes.length; i++) { + Element includeEle = document.createElement("includepath"); + includeEle.setAttribute("path", includes[i]); + initIncEle.appendChild(includeEle); + } + initEle.appendChild(initIncEle); root.appendChild(initEle); String moduleDir = project.getProperty("MODULE_DIR");