diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2014-08-21 07:12:33 +0000 |
---|---|---|
committer | yingke <yingke@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-21 07:12:33 +0000 |
commit | 07b8564b113431f70ef4fcc469a42be5e4700263 (patch) | |
tree | 4f2d8dc1fc4d79a32d47557333b528529df92786 /BaseTools/Source/Python/AutoGen | |
parent | 231ea883ed13a43157e2ceca5869d02d5d727526 (diff) | |
download | edk2-07b8564b113431f70ef4fcc469a42be5e4700263.tar.gz edk2-07b8564b113431f70ef4fcc469a42be5e4700263.tar.bz2 edk2-07b8564b113431f70ef4fcc469a42be5e4700263.zip |
AutoGen.c can only be generated if the module has intermediate object files generated or links other libraries.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15864 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 6c9a4ffd2f..5dc2cfd7bd 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2607,7 +2607,11 @@ class ModuleAutoGen(AutoGen): AutoGenH = TemplateString()
StringH = TemplateString()
GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer)
- if str(AutoGenC) != "":
+ #
+ # AutoGen.c is generated if there are library classes in inf, or there are object files
+ #
+ if str(AutoGenC) != "" and (len(self.Module.LibraryClasses) > 0
+ or TAB_OBJECT_FILE in self.FileTypes):
AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir)
self._AutoGenFileList[AutoFile] = str(AutoGenC)
self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)
|