@@ -255,32 +255,32 @@ fileprivate struct CommandLineSpecPerfTests: CoreBasedTests, PerfTests {
255
255
var ( table, namespace) = clangSpec. macroTableForBuildOptionDefaults ( core)
256
256
257
257
// We also add some other settings that are more contextual in nature.
258
- table. push ( namespace. lookupMacroDeclaration ( " CURRENT_ARCH " ) as! StringMacroDeclaration , literal: " x86_64 " )
259
- table. push ( namespace. lookupMacroDeclaration ( " arch " ) as! StringMacroDeclaration , literal: " x86_64 " )
260
- table. push ( namespace. lookupMacroDeclaration ( " CURRENT_VARIANT " ) as! StringMacroDeclaration , literal: " normal " )
261
- table. push ( namespace. lookupMacroDeclaration ( " PRODUCT_NAME " ) as! StringMacroDeclaration , literal: " Product " )
262
- table. push ( namespace. lookupMacroDeclaration ( " TEMP_DIR " ) as! PathMacroDeclaration , literal: " /tmp " )
263
- table. push ( namespace. lookupMacroDeclaration ( " PROJECT_TEMP_DIR " ) as! PathMacroDeclaration , literal: " /tmp/ptmp " )
264
- table. push ( namespace. lookupMacroDeclaration ( " OBJECT_FILE_DIR " ) as! PathMacroDeclaration , literal: " /tmp/output/obj " )
265
- table. push ( namespace. lookupMacroDeclaration ( " BUILT_PRODUCTS_DIR " ) as! PathMacroDeclaration , literal: " /tmp/output/sym " )
266
- table. push ( namespace. lookupMacroDeclaration ( " GCC_PREFIX_HEADER " ) as! PathMacroDeclaration , literal: " /tmp/prefix.h " )
267
- table. push ( namespace. lookupMacroDeclaration ( " DERIVED_FILE_DIR " ) as! PathMacroDeclaration , literal: " /tmp/derived " )
258
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " CURRENT_ARCH " ) as? StringMacroDeclaration ) , literal: " x86_64 " )
259
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " arch " ) as? StringMacroDeclaration ) , literal: " x86_64 " )
260
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " CURRENT_VARIANT " ) as? StringMacroDeclaration ) , literal: " normal " )
261
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " PRODUCT_NAME " ) as? StringMacroDeclaration ) , literal: " Product " )
262
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " TEMP_DIR " ) as? PathMacroDeclaration ) , literal: " /tmp " )
263
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " PROJECT_TEMP_DIR " ) as? PathMacroDeclaration ) , literal: " /tmp/ptmp " )
264
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " OBJECT_FILE_DIR " ) as? PathMacroDeclaration ) , literal: " /tmp/output/obj " )
265
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " BUILT_PRODUCTS_DIR " ) as? PathMacroDeclaration ) , literal: " /tmp/output/sym " )
266
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " GCC_PREFIX_HEADER " ) as? PathMacroDeclaration ) , literal: " /tmp/prefix.h " )
267
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " DERIVED_FILE_DIR " ) as? PathMacroDeclaration ) , literal: " /tmp/derived " )
268
268
table. push ( try namespace. declareUserDefinedMacro ( " PER_ARCH_CFLAGS_i386 " ) , namespace. parseLiteralStringList ( [ " -DX86.32 " ] ) )
269
269
table. push ( try namespace. declareUserDefinedMacro ( " PER_ARCH_CFLAGS_x86_64 " ) , namespace. parseLiteralStringList ( [ " -DX86.64 " ] ) )
270
- table. push ( namespace. lookupMacroDeclaration ( " PER_ARCH_CFLAGS " ) as! StringListMacroDeclaration , BuiltinMacros . namespace. parseStringList ( " $(PER_ARCH_CFLAGS_$(CURRENT_ARCH) " ) )
270
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " PER_ARCH_CFLAGS " ) as? StringListMacroDeclaration ) , BuiltinMacros . namespace. parseStringList ( " $(PER_ARCH_CFLAGS_$(CURRENT_ARCH) " ) )
271
271
table. push ( try namespace. declareUserDefinedMacro ( " OTHER_CFLAGS_normal " ) , namespace. parseLiteralStringList ( [ " -DFrom_OTHER_CFLAGS_normal " ] ) )
272
272
table. push ( try namespace. declareUserDefinedMacro ( " OTHER_CFLAGS_profile " ) , namespace. parseLiteralStringList ( [ " -DFrom_OTHER_CFLAGS_profile " ] ) )
273
- table. push ( namespace. lookupMacroDeclaration ( " PER_VARIANT_CFLAGS " ) as! StringListMacroDeclaration , BuiltinMacros . namespace. parseStringList ( " $(OTHER_CFLAGS_$(CURRENT_VARIANT) " ) )
274
- table. push ( namespace. lookupMacroDeclaration ( " USE_HEADERMAP " ) as! BooleanMacroDeclaration , literal: true )
275
- table. push ( namespace. lookupMacroDeclaration ( " HEADERMAP_USES_VFS " ) as! BooleanMacroDeclaration , literal: true )
276
- table. push ( namespace. lookupMacroDeclaration ( " CLANG_ENABLE_MODULES " ) as! BooleanMacroDeclaration , literal: true )
273
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " PER_VARIANT_CFLAGS " ) as? StringListMacroDeclaration ) , BuiltinMacros . namespace. parseStringList ( " $(OTHER_CFLAGS_$(CURRENT_VARIANT) " ) )
274
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " USE_HEADERMAP " ) as? BooleanMacroDeclaration ) , literal: true )
275
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " HEADERMAP_USES_VFS " ) as? BooleanMacroDeclaration ) , literal: true )
276
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " CLANG_ENABLE_MODULES " ) as? BooleanMacroDeclaration ) , literal: true )
277
277
table. push ( try namespace. declareStringListMacro ( " GLOBAL_CFLAGS " ) , literal: [ " -DFrom_GLOBAL_CFLAGS " ] )
278
- table. push ( namespace. lookupMacroDeclaration ( " GCC_GENERATE_PROFILING_CODE " ) as! BooleanMacroDeclaration , literal: true )
279
- table. push ( namespace. lookupMacroDeclaration ( " GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS " ) as! StringListMacroDeclaration , literal: [ " defn1 " , " defn2 " ] )
280
- table. push ( namespace. lookupMacroDeclaration ( " GCC_OTHER_CFLAGS_NOT_USED_IN_PRECOMPS " ) as! StringListMacroDeclaration , literal: [ " -DFrom_GCC_OTHER_CFLAGS_NOT_USED_IN_PRECOMPS " ] )
278
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " GCC_GENERATE_PROFILING_CODE " ) as? BooleanMacroDeclaration ) , literal: true )
279
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS " ) as? StringListMacroDeclaration ) , literal: [ " defn1 " , " defn2 " ] )
280
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " GCC_OTHER_CFLAGS_NOT_USED_IN_PRECOMPS " ) as? StringListMacroDeclaration ) , literal: [ " -DFrom_GCC_OTHER_CFLAGS_NOT_USED_IN_PRECOMPS " ] )
281
281
282
282
// Override CLANG_DEBUG_MODULES, to be independent of recent changes to the Clang.xcspec.
283
- table. push ( namespace. lookupMacroDeclaration ( " CLANG_DEBUG_MODULES " ) as! BooleanMacroDeclaration , literal: false )
283
+ table. push ( try #require ( namespace. lookupMacroDeclaration ( " CLANG_DEBUG_MODULES " ) as? BooleanMacroDeclaration ) , literal: false )
284
284
285
285
let producer = try MockCommandProducer ( core: core, productTypeIdentifier: " com.apple.product-type.framework " , platform: nil , fs: PseudoFS ( ) )
286
286
0 commit comments