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
34 # definition for a MACRO name. used to create regular expressions below.
35 _MacroNamePattern
= "[A-Z][A-Z0-9_]*"
37 ## Regular expression for matching macro used in DSC/DEC/INF file inclusion
38 gMacroRefPattern
= re
.compile("\$\(({})\)".format(_MacroNamePattern
), re
.UNICODE
)
39 gMacroDefPattern
= re
.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")
40 gMacroNamePattern
= re
.compile("^{}$".format(_MacroNamePattern
))
42 # definition for a GUID. used to create regular expressions below.
43 _HexChar
= r
"[0-9a-fA-F]"
44 _GuidPattern
= r
"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex
=_HexChar
)
46 ## Regular expressions for GUID matching
47 gGuidPattern
= re
.compile(r
'{}'.format(_GuidPattern
))
48 gGuidPatternEnd
= re
.compile(r
'{}$'.format(_GuidPattern
))
50 ## Regular expressions for HEX matching
51 g4HexChar
= re
.compile(r
'{}{{4}}'.format(_HexChar
))
52 gHexPattern
= re
.compile(r
'0[xX]{}+'.format(_HexChar
))
53 gHexPatternAll
= re
.compile(r
'0[xX]{}+$'.format(_HexChar
))
55 ## Regular expressions for string identifier checking
56 gIdentifierPattern
= re
.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re
.UNICODE
)
57 ## Regular expression for GUID c structure format
58 _GuidCFormatPattern
= r
"{{\s*0[xX]{Hex}{{1,8}}\s*,\s*0[xX]{Hex}{{1,4}}\s*,\s*0[xX]{Hex}{{1,4}}" \
59 r
"\s*,\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}}" \
62 r
"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}\s*}}\s*}}".format(Hex
=_HexChar
)
63 gGuidCFormatPattern
= re
.compile(r
"{}".format(_GuidCFormatPattern
))
66 # A global variable for whether current build in AutoGen phase or not.
71 # The Conf dir outside the workspace dir
77 # The relative default database file path
79 gDatabasePath
= ".cache/build.db"
82 # Build flag for binary build
101 # Pcd name for the Pcd which used in the Conditional directives
102 gConditionalPcds
= []
106 gBinCacheSource
= None
108 gPlatformHashFile
= None
110 gPackageHashFile
= None
111 gModuleHashFile
= None
112 gCMakeHashFile
= None
113 gHashChainStatus
= None
114 gModulePreMakeCacheStatus
= None
115 gModuleMakeCacheStatus
= None
117 gModuleAllCacheStatus
= None
118 gModuleCacheHit
= None
120 gEnableGenfdsMultiThread
= True
121 gSikpAutoGenCache
= set()
122 # Common lock for the file access in multiple process AutoGens