]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Common/GlobalData.py
BaseTools: Support Structure PCD value assignment in DEC/DSC
[mirror_edk2.git] / BaseTools / Source / Python / Common / GlobalData.py
1 ## @file
2 # This file is used to define common static strings used by INF/DEC/DSC files
3 #
4 # Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
5 # This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php
9 #
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 import re
14
15 gIsWindows = None
16
17 gEdkCompatibilityPkg = "EdkCompatibilityPkg"
18 gWorkspace = "."
19 gEdkSource = "EdkCompatibilityPkg"
20 gEfiSource = "."
21 gEcpSource = "EdkCompatibilityPkg"
22
23 gOptions = None
24 gCaseInsensitive = False
25 gAllFiles = None
26 gCommand = None
27
28 gGlobalDefines = {}
29 gPlatformDefines = {}
30 # PCD name and value pair for fixed at build and feature flag
31 gPlatformPcds = {}
32 # PCDs with type that are not fixed at build and feature flag
33 gPlatformOtherPcds = {}
34 gActivePlatform = None
35 gCommandLineDefines = {}
36 gEdkGlobal = {}
37 gOverrideDir = {}
38 gCommandMaxLength = 4096
39 # for debug trace purpose when problem occurs
40 gProcessingFile = ''
41 gBuildingModule = ''
42
43 ## Regular expression for matching macro used in DSC/DEC/INF file inclusion
44 gMacroRefPattern = re.compile("\$\(([A-Z][_A-Z0-9]*)\)", re.UNICODE)
45 gMacroDefPattern = re.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")
46 gMacroNamePattern = re.compile("^[A-Z][A-Z0-9_]*$")
47 # C-style wide string pattern
48 gWideStringPattern = re.compile('(\W|\A)L"')
49 #
50 # A global variable for whether current build in AutoGen phase or not.
51 #
52 gAutoGenPhase = False
53
54 #
55 # The Conf dir outside the workspace dir
56 #
57 gConfDirectory = ''
58
59 gBuildDirectory = ''
60 #
61 # The relative default database file path
62 #
63 gDatabasePath = ".cache/build.db"
64
65 #
66 # Build flag for binary build
67 #
68 gIgnoreSource = False
69
70 #
71 # FDF parser
72 #
73 gFdfParser = None
74
75 #
76 # If a module is built more than once with different PCDs or library classes
77 # a temporary INF file with same content is created, the temporary file is removed
78 # when build exits.
79 #
80 gTempInfs = []
81
82 BuildOptionPcd = []
83
84 #
85 # Mixed PCD name dict
86 #
87 MixedPcd = {}
88
89 # Structure Pcd dict
90 gStructurePcd = {}
91
92 # Pcd name for the Pcd which used in the Conditional directives
93 gConditionalPcds = []
94
95 gUseHashCache = None
96 gBinCacheDest = None
97 gBinCacheSource = None
98 gPlatformHash = None
99 gPackageHash = {}
100 gModuleHash = {}
101 gEnableGenfdsMultiThread = False