Files
swift-mirror/test/IRGen/lit.local.cfg
Alastair Houghton 0bc76dae80 [Backtracing] Add warning suppression option, enable it for tests.
The backtracing code will warn you if you attempt to forcibly enable
backtracing for a privileged executable.  This is apparently upsetting
the Driver/filelists.swift test.

Since we want to force it on for tests, so that we will definitely get
backtraces, add an option to suppress warning messages, and turn that
on for tests as well.

rdar://144497613
2025-02-24 12:55:16 +00:00

25 lines
1.5 KiB
INI

# 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 -enable-library-evolution -o %t -sdk %S/Inputs %S/Inputs/ObjectiveC.swift && '
'%target-swift-frontend -enable-objc-interop -emit-module -enable-library-evolution -o %t -sdk %S/Inputs %S/Inputs/Foundation.swift -I %t'))
config.substitutions.insert(0, (r'%build-irgen-test-overlays\(mock-sdk-directory: ([^)]+)\)',
SubstituteCaptures(r'%target-swift-frontend -enable-objc-interop -disable-objc-attr-requires-foundation-module -emit-module -enable-library-evolution -o %t -sdk \1 \1/ObjectiveC.swift && '
r'%target-swift-frontend -enable-objc-interop -emit-module -enable-library-evolution -o %t -sdk \1 \1/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'))