File tree 6 files changed +17
-24
lines changed
6 files changed +17
-24
lines changed Original file line number Diff line number Diff line change @@ -811,8 +811,8 @@ def target_variables(target):
811
811
os_arch = target .kernel
812
812
813
813
return namespace (
814
- OS_TARGET = str ( os_target ) ,
815
- OS_ARCH = str ( os_arch ) ,
814
+ OS_TARGET = os_target ,
815
+ OS_ARCH = os_arch ,
816
816
INTEL_ARCHITECTURE = target .cpu in ("x86" , "x86_64" ) or None ,
817
817
)
818
818
Original file line number Diff line number Diff line change @@ -237,6 +237,8 @@ def normalize(obj):
237
237
return [normalize (o ) for o in obj ]
238
238
return obj
239
239
240
+ sanitized_config = normalize (sanitized_config )
241
+
240
242
# Create config.status. Eventually, we'll want to just do the work it does
241
243
# here, when we're able to skip configure tests/use cached results/not rely
242
244
# on autoconf.
@@ -246,7 +248,6 @@ def normalize(obj):
246
248
"""\
247
249
#!%(python)s
248
250
# coding=utf-8
249
- from mozbuild.configure.constants import *
250
251
"""
251
252
)
252
253
% {"python" : config ["PYTHON3" ]}
@@ -271,7 +272,6 @@ def normalize(obj):
271
272
)
272
273
273
274
partial_config = PartialConfigEnvironment (config ["TOPOBJDIR" ])
274
- sanitized_config = normalize (sanitized_config )
275
275
partial_config .write_vars (sanitized_config )
276
276
277
277
# Write out a file so the build backend knows to re-run configure when
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ if CONFIG['INTEL_ARCHITECTURE']:
50
50
'intel/intel_init.c'
51
51
]
52
52
53
- if CONFIG ['CPU_ARCH' ] in ( 'mips32' , 'mips64' ) :
53
+ if CONFIG ['CPU_ARCH' ] == 'mips' :
54
54
DEFINES ['MOZ_PNG_USE_MIPS_MSA' ] = True
55
55
UNIFIED_SOURCES += [
56
56
'mips/filter_msa_intrinsics.c' ,
Original file line number Diff line number Diff line change 6
6
7
7
from mozbuild .util import EnumString
8
8
9
- CompilerType = EnumString .subclass ("CompilerType" )(
9
+ CompilerType = EnumString .subclass (
10
10
"clang" ,
11
11
"clang-cl" ,
12
12
"gcc" ,
13
13
"msvc" ,
14
14
)
15
15
16
- OS = EnumString .subclass ("OS" )(
16
+ OS = EnumString .subclass (
17
17
"Android" ,
18
18
"DragonFly" ,
19
19
"FreeBSD" ,
26
26
"WASI" ,
27
27
)
28
28
29
- Kernel = EnumString .subclass ("Kernel" )(
29
+ Kernel = EnumString .subclass (
30
30
"Darwin" ,
31
31
"DragonFly" ,
32
32
"FreeBSD" ,
62
62
"wasm32" : 32 ,
63
63
}
64
64
65
- CPU = EnumString .subclass ("CPU" )( * CPU_bitness .keys ())
65
+ CPU = EnumString .subclass (* CPU_bitness .keys ())
66
66
67
- Endianness = EnumString .subclass ("Endianness" )(
67
+ Endianness = EnumString .subclass (
68
68
"big" ,
69
69
"little" ,
70
70
)
71
71
72
- WindowsBinaryType = EnumString .subclass ("WindowsBinaryType" )(
72
+ WindowsBinaryType = EnumString .subclass (
73
73
"win32" ,
74
74
"win64" ,
75
75
)
76
76
77
- Abi = EnumString .subclass ("Abi" )(
77
+ Abi = EnumString .subclass (
78
78
"msvc" ,
79
79
"mingw" ,
80
80
)
Original file line number Diff line number Diff line change @@ -824,7 +824,7 @@ def test_expand_variables(self):
824
824
825
825
class TestEnumString (unittest .TestCase ):
826
826
def test_string (self ):
827
- CompilerType = EnumString .subclass ("Test" )( " gcc" , "clang" , "clang-cl" )
827
+ CompilerType = EnumString .subclass ("gcc" , "clang" , "clang-cl" )
828
828
829
829
type = CompilerType ("gcc" )
830
830
self .assertEqual (type , "gcc" )
Original file line number Diff line number Diff line change @@ -1326,19 +1326,12 @@ def __ne__(self, other):
1326
1326
def __hash__ (self ):
1327
1327
return super (EnumString , self ).__hash__ ()
1328
1328
1329
- def __repr__ (self ):
1330
- return f"{ self .__class__ .__name__ } ({ str (self )!r} )"
1331
-
1332
1329
@staticmethod
1333
- def subclass (name ):
1334
- def create_subclass (* possible_values ):
1335
- class EnumStringSubclass (EnumString ):
1336
- POSSIBLE_VALUES = possible_values
1337
-
1338
- EnumStringSubclass .__name__ = name
1339
- return EnumStringSubclass
1330
+ def subclass (* possible_values ):
1331
+ class EnumStringSubclass (EnumString ):
1332
+ POSSIBLE_VALUES = possible_values
1340
1333
1341
- return create_subclass
1334
+ return EnumStringSubclass
1342
1335
1343
1336
1344
1337
def _escape_char (c ):
You can’t perform that action at this time.
0 commit comments