# 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
# @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
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