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