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 gPlatformFinalPcds
= {}
22 # PCDs with type that are not fixed at build and feature flag
23 gPlatformOtherPcds
= {}
24 gActivePlatform
= None
25 gCommandLineDefines
= {}
27 gCommandMaxLength
= 4096
28 # for debug trace purpose when problem occurs
35 # definition for a MACRO name. used to create regular expressions below.
36 _MacroNamePattern
= "[A-Z][A-Z0-9_]*"
38 ## Regular expression for matching macro used in DSC/DEC/INF file inclusion
39 gMacroRefPattern
= re
.compile("\$\(({})\)".format(_MacroNamePattern
), re
.UNICODE
)
40 gMacroDefPattern
= re
.compile("^(DEFINE|EDK_GLOBAL)[ \t]+")
41 gMacroNamePattern
= re
.compile("^{}$".format(_MacroNamePattern
))
43 # definition for a GUID. used to create regular expressions below.
44 _HexChar
= r
"[0-9a-fA-F]"
45 _GuidPattern
= r
"{Hex}{{8}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{4}}-{Hex}{{12}}".format(Hex
=_HexChar
)
47 ## Regular expressions for GUID matching
48 gGuidPattern
= re
.compile(r
'{}'.format(_GuidPattern
))
49 gGuidPatternEnd
= re
.compile(r
'{}$'.format(_GuidPattern
))
51 ## Regular expressions for HEX matching
52 g4HexChar
= re
.compile(r
'{}{{4}}'.format(_HexChar
))
53 gHexPattern
= re
.compile(r
'0[xX]{}+'.format(_HexChar
))
54 gHexPatternAll
= re
.compile(r
'0[xX]{}+$'.format(_HexChar
))
56 ## Regular expressions for string identifier checking
57 gIdentifierPattern
= re
.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re
.UNICODE
)
58 ## Regular expression for GUID c structure format
59 _GuidCFormatPattern
= r
"{{\s*0[xX]{Hex}{{1,8}}\s*,\s*0[xX]{Hex}{{1,4}}\s*,\s*0[xX]{Hex}{{1,4}}" \
60 r
"\s*,\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}}" \
63 r
"\s*,\s*0[xX]{Hex}{{1,2}}\s*,\s*0[xX]{Hex}{{1,2}}\s*}}\s*}}".format(Hex
=_HexChar
)
64 gGuidCFormatPattern
= re
.compile(r
"{}".format(_GuidCFormatPattern
))
67 # A global variable for whether current build in AutoGen phase or not.
72 # The Conf dir outside the workspace dir
78 # The relative default database file path
80 gDatabasePath
= ".cache/build.db"
83 # Build flag for binary build
102 # Pcd name for the Pcd which used in the Conditional directives
103 gConditionalPcds
= []
107 gBinCacheSource
= None
109 gPlatformHashFile
= None
111 gPackageHashFile
= None
112 gModuleHashFile
= None
113 gCMakeHashFile
= None
114 gHashChainStatus
= None
115 gModulePreMakeCacheStatus
= None
116 gModuleMakeCacheStatus
= None
118 gModuleAllCacheStatus
= None
119 gModuleCacheHit
= None
121 gEnableGenfdsMultiThread
= True
122 gSikpAutoGenCache
= set()
123 # Common lock for the file access in multiple process AutoGens