]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Common/GlobalData.py
8eb72aa1d6f589705ddeb25765e9dbd2c0a39572
2 # This file is used to define common static strings used by INF/DEC/DSC files
4 # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 # SPDX-License-Identifier: BSD-2-Clause-Patent
12 gCaseInsensitive
= False
19 # PCD name and value pair for fixed at build and feature flag
21 # PCDs with type that are not fixed at build and feature flag
22 gPlatformOtherPcds
= {}
23 gActivePlatform
= None
24 gCommandLineDefines
= {}
26 gCommandMaxLength
= 4096
27 # for debug trace purpose when problem occurs
33 # definition for a MACRO name. used to create regular expressions below.
34 _MacroNamePattern
= "[A-Z][A-Z0-9_]*"
36 ## Regular expression for matching macro used in DSC/DEC/INF file inclusion
37 gMacroRefPattern
= re
.compile("\$\(({})\)".format(_MacroNamePattern
), re
.UNICODE
)
38 gMacroDefPattern
= re
.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")
39 gMacroNamePattern
= re
.compile("^{}$".format(_MacroNamePattern
))
41 # definition for a GUID. used to create regular expressions below.
42 _HexChar
= r
"[0-9a-fA-F]"
43 _GuidPattern
= r
"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex
=_HexChar
)
45 ## Regular expressions for GUID matching
46 gGuidPattern
= re
.compile(r
'{}'.format(_GuidPattern
))
47 gGuidPatternEnd
= re
.compile(r
'{}$'.format(_GuidPattern
))
49 ## Regular expressions for HEX matching
50 g4HexChar
= re
.compile(r
'{}{{4}}'.format(_HexChar
))
51 gHexPattern
= re
.compile(r
'0[xX]{}+'.format(_HexChar
))
52 gHexPatternAll
= re
.compile(r
'0[xX]{}+$'.format(_HexChar
))
54 ## Regular expressions for string identifier checking
55 gIdentifierPattern
= re
.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re
.UNICODE
)
56 ## Regular expression for GUID c structure format
57 _GuidCFormatPattern
= r
"{{\s*0[xX]{Hex}{{1,8}}\s*,\s*0[xX]{Hex}{{1,4}}\s*,\s*0[xX]{Hex}{{1,4}}" \
58 r
"\s*,\s*{{\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \
59 r
"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \
60 r
"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}" \
61 r
"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}\s*}}\s*}}".format(Hex
=_HexChar
)
62 gGuidCFormatPattern
= re
.compile(r
"{}".format(_GuidCFormatPattern
))
65 # A global variable for whether current build in AutoGen phase or not.
70 # The Conf dir outside the workspace dir
76 # The relative default database file path
78 gDatabasePath
= ".cache/build.db"
81 # Build flag for binary build
100 # Pcd name for the Pcd which used in the Conditional directives
101 gConditionalPcds
= []
105 gBinCacheSource
= None
109 gEnableGenfdsMultiThread
= True
110 gSikpAutoGenCache
= set()
112 # Dictionary for tracking Module build status as success or failure
113 # Top Dict: Key: Arch Type Value: Dictionary
114 # Second Dict: Key: AutoGen Obj Value: 'SUCCESS'\'FAIL'\'FAIL_METAFILE'
115 gModuleBuildTracking
= dict()
117 # Dictionary of booleans that dictate whether a module or
118 # library can be skiped
119 # Top Dict: Key: Arch Type Value: Dictionary
120 # Second Dict: Key: Module\Library Name Value: True\False
121 gBuildHashSkipTracking
= dict()
123 # Common dictionary to share module cache intermediate result and state
125 # Common lock for the module cache intermediate data
127 # Common lock for the file access in multiple process AutoGens
129 # Common dictionary to share platform libraries' constant Pcd
131 # Common dictionary to share platform libraries' reference info