]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/Python/Common/GlobalData.py
BaseTools: Hash false success with back to back builds
[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
21# PCDs with type that are not fixed at build and feature flag\r
22gPlatformOtherPcds = {}\r
23gActivePlatform = None\r
24gCommandLineDefines = {}\r
25gEdkGlobal = {}\r
725cdb8f 26gCommandMaxLength = 4096\r
f51461c8
LG
27# for debug trace purpose when problem occurs\r
28gProcessingFile = ''\r
29gBuildingModule = ''\r
e651d06c
LG
30gSkuids = []\r
31gDefaultStores = []\r
f51461c8 32\r
0f17c9fe
CJ
33# definition for a MACRO name. used to create regular expressions below.\r
34_MacroNamePattern = "[A-Z][A-Z0-9_]*"\r
35\r
f51461c8 36## Regular expression for matching macro used in DSC/DEC/INF file inclusion\r
0f17c9fe 37gMacroRefPattern = re.compile("\$\(({})\)".format(_MacroNamePattern), re.UNICODE)\r
f51461c8 38gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
0f17c9fe 39gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
7878f706 40\r
cd67d664 41# definition for a GUID. used to create regular expressions below.\r
256e2d88
CJ
42_HexChar = r"[0-9a-fA-F]"\r
43_GuidPattern = r"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex=_HexChar)\r
cd67d664
CJ
44\r
45## Regular expressions for GUID matching\r
46gGuidPattern = re.compile(r'{}'.format(_GuidPattern))\r
47gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))\r
48\r
0760ed06 49## Regular expressions for HEX matching\r
9e7790a3 50g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r
0760ed06 51gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r
6553c617 52gHexPatternAll = re.compile(r'0[xX]{}+$'.format(_HexChar))\r
9e7790a3 53\r
7da06eee
CJ
54## Regular expressions for string identifier checking\r
55gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)\r
85e5d3cf
FY
56## Regular expression for GUID c structure format\r
57_GuidCFormatPattern = r"{{\s*0[xX]{Hex}{{1,8}}\s*,\s*0[xX]{Hex}{{1,4}}\s*,\s*0[xX]{Hex}{{1,4}}" \\r
58 r"\s*,\s*{{\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r
59 r"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \\r
60 r"\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}}\s*}}\s*}}".format(Hex=_HexChar)\r
62gGuidCFormatPattern = re.compile(r"{}".format(_GuidCFormatPattern))\r
7da06eee 63\r
f51461c8
LG
64#\r
65# A global variable for whether current build in AutoGen phase or not.\r
66#\r
67gAutoGenPhase = False\r
68\r
69#\r
70# The Conf dir outside the workspace dir\r
71#\r
72gConfDirectory = ''\r
73\r
97058144 74gBuildDirectory = ''\r
f51461c8
LG
75#\r
76# The relative default database file path\r
77#\r
78gDatabasePath = ".cache/build.db"\r
79\r
80#\r
81# Build flag for binary build\r
82#\r
83gIgnoreSource = False\r
84\r
85#\r
86# FDF parser\r
87#\r
88gFdfParser = None\r
97fa0ee9 89\r
763e8edf 90BuildOptionPcd = []\r
c8d07c5e 91\r
2a29017e
YZ
92#\r
93# Mixed PCD name dict\r
94#\r
95MixedPcd = {}\r
96\r
ae7b6df8
LG
97# Structure Pcd dict\r
98gStructurePcd = {}\r
8a64c7ea 99gPcdSkuOverrides={}\r
c8d07c5e
YZ
100# Pcd name for the Pcd which used in the Conditional directives\r
101gConditionalPcds = []\r
36d083ef
YZ
102\r
103gUseHashCache = None\r
104gBinCacheDest = None\r
105gBinCacheSource = None\r
106gPlatformHash = None\r
107gPackageHash = {}\r
108gModuleHash = {}\r
37de70b7 109gEnableGenfdsMultiThread = False\r
18ef4e71 110gSikpAutoGenCache = set()\r
0eccea3f
RC
111\r
112# Dictionary for tracking Module build status as success or failure\r
113# False -> Fail : True -> Success\r
114gModuleBuildTracking = dict()\r