blob: ff48ffce548be65f31644949f0f4f8f66b14eaee [file] [log] [blame]
# Make a local copy of the substitutions.
config.substitutions = list(config.substitutions)
config.substitutions.insert(0, ('%build-irgen-test-overlays',
'%target-swift-frontend -enable-objc-interop -disable-objc-attr-requires-foundation-module -emit-module -o %t -sdk %S/Inputs %S/Inputs/ObjectiveC.swift && '
'%target-swift-frontend -enable-objc-interop -emit-module -o %t -sdk %S/Inputs %S/Inputs/Foundation.swift -I %t'))
def get_target_os():
import re
(run_cpu, run_vendor, run_os, run_version) = re.match('([^-]+)-([^-]+)-([^0-9]+)(.*)', config.variant_triple).groups()
return run_os
if get_target_os() in ['windows-msvc']:
config.substitutions.insert(0, ('%target-abi', 'WIN'))
config.substitutions.insert(0, ('%target-import-type', 'INDIRECT'))
else:
# FIXME(compnerd) do all the targets we currently support use SysV ABI?
config.substitutions.insert(0, ('%target-abi', 'SYSV'))
config.substitutions.insert(0, ('%target-import-type', 'DIRECT'))