Skip to content

Commit 395ae26

Browse files
committed
Add FreeBSD target_* support.
1 parent 527fb68 commit 395ae26

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/lit.cfg

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -611,13 +611,20 @@ if run_vendor == 'apple':
611611
"%s ld -L%s" %
612612
(xcrun_prefix, os.path.join(test_resource_dir, config.target_sdk_name)))
613613

614-
elif run_os == 'linux-gnu':
615-
# Linux
616-
lit_config.note("Testing Linux " + config.variant_triple)
614+
elif run_os == 'linux-gnu' or run_os.startswith('freebsd'):
615+
# Linux/FreeBSD
616+
if run_os == 'linux-gnu':
617+
config.target_sdk_name = "linux"
618+
elif run_os.startswith('freebsd'):
619+
config.target_sdk_name = "freebsd"
620+
621+
lit_config.note("Testing " + config.target_sdk_name + " " +
622+
config.variant_triple)
623+
617624
config.target_object_format = "elf"
618625
config.target_runtime = "native"
619626
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")
620-
config.target_sdk_name = "linux"
627+
621628
config.target_build_swift = (
622629
'%s -target %s %s %s %s %s'
623630
% (config.swiftc, config.variant_triple, resource_dir_opt, mcp_opt,

0 commit comments

Comments
 (0)