]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - 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
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
16gWorkspace = "."\r
17gOptions = None\r
18gCaseInsensitive = False\r
19gAllFiles = None\r
20gCommand = None\r
21gSKUID_CMD = None\r
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
33gCommandMaxLength = 4096\r
34# for debug trace purpose when problem occurs\r
35gProcessingFile = ''\r
36gBuildingModule = ''\r
37gSkuids = []\r
38gDefaultStores = []\r
39\r
40# definition for a MACRO name. used to create regular expressions below.\r
41_MacroNamePattern = "[A-Z][A-Z0-9_]*"\r
42\r
43## Regular expression for matching macro used in DSC/DEC/INF file inclusion\r
44gMacroRefPattern = re.compile("\$\(({})\)".format(_MacroNamePattern), re.UNICODE)\r
45gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")\r
46gMacroNamePattern = re.compile("^{}$".format(_MacroNamePattern))\r
47\r
48# definition for a GUID. used to create regular expressions below.\r
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
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
56## Regular expressions for HEX matching\r
57g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r
58gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r
59gHexPatternAll = re.compile(r'0[xX]{}+$'.format(_HexChar))\r
60\r
61## Regular expressions for string identifier checking\r
62gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)\r
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
70\r
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
81gBuildDirectory = ''\r
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
96\r
97BuildOptionPcd = []\r
98\r
99#\r
100# Mixed PCD name dict\r
101#\r
102MixedPcd = {}\r
103\r
104# Structure Pcd dict\r
105gStructurePcd = {}\r
106gPcdSkuOverrides={}\r
107# Pcd name for the Pcd which used in the Conditional directives\r
108gConditionalPcds = []\r
109\r
110gUseHashCache = None\r
111gBinCacheDest = None\r
112gBinCacheSource = None\r
113gPlatformHash = None\r
114gPackageHash = {}\r
115gModuleHash = {}\r
116gEnableGenfdsMultiThread = False\r
117gSikpAutoGenCache = set()\r