]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - BaseTools/Source/Python/Common/GlobalData.py
BaseTool: Add cache for the result of SkipAutogen.
[mirror_edk2.git] / BaseTools / Source / Python / Common / GlobalData.py
... / ...
CommitLineData
1## @file\r
2# This file is used to define common static strings used by INF/DEC/DSC files\r
3#\r
4# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
5# This program and the accompanying materials\r
6# are licensed and made available under the terms and conditions of the BSD License\r
7# which accompanies this distribution. The full text of the license may be found at\r
8# http://opensource.org/licenses/bsd-license.php\r
9#\r
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13import re\r
14\r
15gIsWindows = None\r
16\r
17gEdkCompatibilityPkg = "EdkCompatibilityPkg"\r
18gWorkspace = "."\r
19gEdkSource = "EdkCompatibilityPkg"\r
20gEfiSource = "."\r
21gEcpSource = "EdkCompatibilityPkg"\r
22\r
23gOptions = None\r
24gCaseInsensitive = False\r
25gAllFiles = None\r
26gCommand = None\r
27gSKUID_CMD = None\r
28\r
29gGlobalDefines = {}\r
30gPlatformDefines = {}\r
31# PCD name and value pair for fixed at build and feature flag\r
32gPlatformPcds = {}\r
33# PCDs with type that are not fixed at build and feature flag\r
34gPlatformOtherPcds = {}\r
35gActivePlatform = None\r
36gCommandLineDefines = {}\r
37gEdkGlobal = {}\r
38gOverrideDir = {}\r
39gCommandMaxLength = 4096\r
40# for debug trace purpose when problem occurs\r
41gProcessingFile = ''\r
42gBuildingModule = ''\r
43gSkuids = []\r
44gDefaultStores = []\r
45\r
46# definition for a MACRO name. used to create regular expressions below.\r
47_MacroNamePattern = "[A-Z][A-Z0-9_]*"\r
48\r
49## Regular expression for matching macro used in DSC/DEC/INF file inclusion\r
50gMacroRefPattern = re.compile("\$\(({})\)".format(_MacroNamePattern), re.UNICODE)\r
51gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
52gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
53\r
54# definition for a GUID. used to create regular expressions below.\r
55_HexChar = r"[0-9a-fA-F]"\r
56_GuidPattern = r"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex=_HexChar)\r
57\r
58## Regular expressions for GUID matching\r
59gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
60gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
61\r
62## Regular expressions for HEX matching\r
63g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r
64gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r
65gHexPatternAll = re.compile(r'0[xX]{}+$'.format(_HexChar))\r
66\r
67## Regular expressions for string identifier checking\r
68gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)\r
69\r
70#\r
71# A global variable for whether current build in AutoGen phase or not.\r
72#\r
73gAutoGenPhase = False\r
74\r
75#\r
76# The Conf dir outside the workspace dir\r
77#\r
78gConfDirectory = ''\r
79\r
80gBuildDirectory = ''\r
81#\r
82# The relative default database file path\r
83#\r
84gDatabasePath = ".cache/build.db"\r
85\r
86#\r
87# Build flag for binary build\r
88#\r
89gIgnoreSource = False\r
90\r
91#\r
92# FDF parser\r
93#\r
94gFdfParser = None\r
95\r
96BuildOptionPcd = []\r
97\r
98#\r
99# Mixed PCD name dict\r
100#\r
101MixedPcd = {}\r
102\r
103# Structure Pcd dict\r
104gStructurePcd = {}\r
105\r
106# Pcd name for the Pcd which used in the Conditional directives\r
107gConditionalPcds = []\r
108\r
109gUseHashCache = None\r
110gBinCacheDest = None\r
111gBinCacheSource = None\r
112gPlatformHash = None\r
113gPackageHash = {}\r
114gModuleHash = {}\r
115gEnableGenfdsMultiThread = False\r
116gSikpAutoGenCache = set()\r