Skip to content

Commit a86a540

Browse files
committed
[test] Invert stdlib_dir conditional sense.
In #32903, a substitution pseudovariable was introduced to refer to the path containing Swift.swiftmodule. Since builds on Linux put this file in a path with a subdirectory named after the architecture name -- and presumably builds on mac OS do not, a conditional was required to distinguish these two cases. However, builds on OpenBSD for example also put Swift.swiftmodule in a similar subdirectory like Linux. Thus, invert the sense of this conditional to encompass both Linux, OpenBSD, and make mac OS the specific case, which it is here.
1 parent 8f7b1d7 commit a86a540

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/lit.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,10 +1441,10 @@ config.substitutions.append(('%target-sdk-name', config.target_sdk_name))
14411441

14421442
# Add 'stdlib_dir' as the path to the stdlib resource directory
14431443
stdlib_dir = os.path.join(config.swift_lib_dir, "swift")
1444-
if platform.system() == 'Linux' or platform.system() == 'Windows':
1445-
stdlib_dir = os.path.join(stdlib_dir, config.target_sdk_name, run_cpu)
1446-
else:
1444+
if platform.system() == 'Darwin':
14471445
stdlib_dir = os.path.join(stdlib_dir, config.target_sdk_name)
1446+
else:
1447+
stdlib_dir = os.path.join(stdlib_dir, config.target_sdk_name, target_arch)
14481448
config.substitutions.append(('%stdlib_dir', stdlib_dir))
14491449

14501450
# Add 'stdlib_module' as the path to the stdlib .swiftmodule file

0 commit comments

Comments
 (0)