[Tests] Enable C++ interop for Runtime in the overlay verification test.

The Runtime module requires C++ interop enabled, because that's
the only way to robustly fix things so that it is able to declare various
types and constants without clashing with system headers.

To make this work, we also need to add a missing invocation to sil-opt to
make it pick the correct C++ runtime library.

rdar://143050566
This commit is contained in:
Alastair Houghton
2025-01-23 18:22:45 +00:00
parent 7c7f9fd956
commit 100f2615cb
2 changed files with 5 additions and 2 deletions

View File

@@ -794,6 +794,7 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
}
Invocation.getLangOptions().EnableCXXInterop = options.EnableCxxInterop;
Invocation.computeCXXStdlibOptions();
Invocation.getLangOptions().UnavailableDeclOptimizationMode =
options.UnavailableDeclOptimization;