]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/WorkspaceCommon.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / WorkspaceCommon.py
index 55d01fa4b21113e9b24599c3b468d5cd89ee3195..0cc83110efd5e72ea384516c19b3bc925f1a7198 100644 (file)
@@ -2,13 +2,7 @@
 # Common routines used by workspace\r
 #\r
 # Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution.  The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 \r
 from __future__ import absolute_import\r
@@ -90,10 +84,7 @@ def GetDeclaredPcd(Platform, BuildDatabase, Arch, Target, Toolchain, additionalP
 #  @retval: List of dependent libraries which are InfBuildData instances\r
 #\r
 def GetLiabraryInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain):\r
-    if Module.AutoGenVersion >= 0x00010005:\r
-        return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain)\r
-    else:\r
-        return _ResolveLibraryReference(Module, Platform)\r
+    return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain)\r
 \r
 def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain, FileName = '', EdkLogger = None):\r
     ModuleType = Module.ModuleType\r
@@ -250,32 +241,8 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha
             SortedLibraryList.append(Item)\r
 \r
     #\r
-    # Build the list of constructor and destructir names\r
+    # Build the list of constructor and destructor names\r
     # The DAG Topo sort produces the destructor order, so the list of constructors must generated in the reverse order\r
     #\r
     SortedLibraryList.reverse()\r
     return SortedLibraryList\r
-\r
-def _ResolveLibraryReference(Module, Platform):\r
-    LibraryConsumerList = [Module]\r
-\r
-    # "CompilerStub" is a must for Edk modules\r
-    if Module.Libraries:\r
-        Module.Libraries.append("CompilerStub")\r
-    LibraryList = []\r
-    while len(LibraryConsumerList) > 0:\r
-        M = LibraryConsumerList.pop()\r
-        for LibraryName in M.Libraries:\r
-            Library = Platform.LibraryClasses[LibraryName, ':dummy:']\r
-            if Library is None:\r
-                for Key in Platform.LibraryClasses.data:\r
-                    if LibraryName.upper() == Key.upper():\r
-                        Library = Platform.LibraryClasses[Key, ':dummy:']\r
-                        break\r
-                if Library is None:\r
-                    continue\r
-\r
-            if Library not in LibraryList:\r
-                LibraryList.append(Library)\r
-                LibraryConsumerList.append(Library)\r
-    return LibraryList\r