]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/Python/Common/GlobalData.py
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / BaseTools / Source / Python / Common / GlobalData.py
CommitLineData
f51461c8
LG
1## @file\r
2# This file is used to define common static strings used by INF/DEC/DSC files\r
3#\r
0f17c9fe 4# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
2e351cbe 5# SPDX-License-Identifier: BSD-2-Clause-Patent\r
f51461c8
LG
6\r
7import re\r
8\r
9gIsWindows = None\r
f51461c8 10gWorkspace = "."\r
f51461c8
LG
11gOptions = None\r
12gCaseInsensitive = False\r
13gAllFiles = None\r
f0dc69e6 14gCommand = None\r
e651d06c 15gSKUID_CMD = None\r
f51461c8
LG
16\r
17gGlobalDefines = {}\r
18gPlatformDefines = {}\r
19# PCD name and value pair for fixed at build and feature flag\r
20gPlatformPcds = {}\r
bf9230a9 21gPlatformFinalPcds = {}\r
f51461c8
LG
22# PCDs with type that are not fixed at build and feature flag\r
23gPlatformOtherPcds = {}\r
24gActivePlatform = None\r
25gCommandLineDefines = {}\r
26gEdkGlobal = {}\r
725cdb8f 27gCommandMaxLength = 4096\r
f51461c8
LG
28# for debug trace purpose when problem occurs\r
29gProcessingFile = ''\r
30gBuildingModule = ''\r
e651d06c
LG
31gSkuids = []\r
32gDefaultStores = []\r
d35773d5 33gGuidDict = {}\r
f51461c8 34\r
0f17c9fe
CJ
35# definition for a MACRO name. used to create regular expressions below.\r
36_MacroNamePattern = "[A-Z][A-Z0-9_]*"\r
37\r
f51461c8 38## Regular expression for matching macro used in DSC/DEC/INF file inclusion\r
0f17c9fe 39gMacroRefPattern = re.compile("\$\(({})\)".format(_MacroNamePattern), re.UNICODE)\r
f51461c8 40gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
0f17c9fe 41gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
7878f706 42\r
cd67d664 43# definition for a GUID. used to create regular expressions below.\r
256e2d88
CJ
44_HexChar = r"[0-9a-fA-F]"\r
45_GuidPattern = r"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex=_HexChar)\r
cd67d664
CJ
46\r
47## Regular expressions for GUID matching\r
48gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
49gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
50\r
0760ed06 51## Regular expressions for HEX matching\r
9e7790a3 52g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r
0760ed06 53gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r
6553c617 54gHexPatternAll = re.compile(r'0[xX]{}+$'.format(_HexChar))\r
9e7790a3 55\r
7da06eee
CJ
56## Regular expressions for string identifier checking\r
57gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)\r
85e5d3cf
FY
58## Regular expression for GUID c structure format\r
59_GuidCFormatPattern = r"{{\s*0[xX]{Hex}{{1,8}}\s*,\s*0[xX]{Hex}{{1,4}}\s*,\s*0[xX]{Hex}{{1,4}}" \\r
60 r"\s*,\s*{{\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r
61 r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r
62 r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r
63 r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}\s*}}\s*}}".format(Hex=_HexChar)\r
64gGuidCFormatPattern = re.compile(r"{}".format(_GuidCFormatPattern))\r
7da06eee 65\r
f51461c8
LG
66#\r
67# A global variable for whether current build in AutoGen phase or not.\r
68#\r
69gAutoGenPhase = False\r
70\r
71#\r
72# The Conf dir outside the workspace dir\r
73#\r
74gConfDirectory = ''\r
4465cd12 75gCmdConfDir = ''\r
97058144 76gBuildDirectory = ''\r
f51461c8
LG
77#\r
78# The relative default database file path\r
79#\r
80gDatabasePath = ".cache/build.db"\r
81\r
82#\r
83# Build flag for binary build\r
84#\r
85gIgnoreSource = False\r
86\r
87#\r
88# FDF parser\r
89#\r
90gFdfParser = None\r
97fa0ee9 91\r
763e8edf 92BuildOptionPcd = []\r
c8d07c5e 93\r
2a29017e
YZ
94#\r
95# Mixed PCD name dict\r
96#\r
97MixedPcd = {}\r
98\r
ae7b6df8
LG
99# Structure Pcd dict\r
100gStructurePcd = {}\r
8a64c7ea 101gPcdSkuOverrides={}\r
c8d07c5e
YZ
102# Pcd name for the Pcd which used in the Conditional directives\r
103gConditionalPcds = []\r
36d083ef
YZ
104\r
105gUseHashCache = None\r
106gBinCacheDest = None\r
107gBinCacheSource = None\r
108gPlatformHash = None\r
fc8b8dea
SS
109gPlatformHashFile = None\r
110gPackageHash = None\r
111gPackageHashFile = None\r
112gModuleHashFile = None\r
113gCMakeHashFile = None\r
114gHashChainStatus = None\r
115gModulePreMakeCacheStatus = None\r
116gModuleMakeCacheStatus = None\r
117gFileHashDict = None\r
118gModuleAllCacheStatus = None\r
119gModuleCacheHit = None\r
120\r
7809492c 121gEnableGenfdsMultiThread = True\r
18ef4e71 122gSikpAutoGenCache = set()\r
0e7e7a26
SS
123# Common lock for the file access in multiple process AutoGens\r
124file_lock = None\r
fc8b8dea 125\r