Skip to content

Commit 37701cb

Browse files
committed
test: do not link against libcmt on Win32
Since we do not support building in `/MT` or `/MTd` mode currently, ensure that we link against the dynamic runtime. This allows us to properly run tests without getting lucky in the internal structures of libc aligning up across the variants.
1 parent 0fe7e14 commit 37701cb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/lit.cfg

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -804,12 +804,10 @@ elif run_os in ['windows-msvc']:
804804
config.target_runtime = 'native'
805805

806806
config.target_build_swift = \
807-
('%r -target %s %s %s %s %s' % (config.swiftc, \
808-
config.variant_triple, \
809-
resource_dir_opt, \
810-
config.swift_test_options, \
811-
config.swift_driver_test_options, \
812-
swift_execution_tests_extra_flags))
807+
('%r -target %s %s %s %s %s -Xlinker -nodefaultlib:libcmt' % \
808+
(config.swiftc, config.variant_triple, resource_dir_opt, \
809+
config.swift_test_options, config.swift_driver_test_options,\
810+
swift_execution_tests_extra_flags))
813811

814812
config.target_run = ''
815813

0 commit comments

Comments
 (0)