mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -794,6 +794,7 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Invocation.getLangOptions().EnableCXXInterop = options.EnableCxxInterop;
|
Invocation.getLangOptions().EnableCXXInterop = options.EnableCxxInterop;
|
||||||
|
Invocation.computeCXXStdlibOptions();
|
||||||
|
|
||||||
Invocation.getLangOptions().UnavailableDeclOptimizationMode =
|
Invocation.getLangOptions().UnavailableDeclOptimizationMode =
|
||||||
options.UnavailableDeclOptimization;
|
options.UnavailableDeclOptimization;
|
||||||
|
|||||||
@@ -38,11 +38,13 @@ for module_file in os.listdir(sdk_overlay_dir):
|
|||||||
# TODO: fix the DifferentiationUnittest module.
|
# TODO: fix the DifferentiationUnittest module.
|
||||||
if module_name == "DifferentiationUnittest":
|
if module_name == "DifferentiationUnittest":
|
||||||
continue
|
continue
|
||||||
# Backtracing needs its own additional modules in the module path
|
# Runtime needs its own additional modules in the module path, and
|
||||||
|
# also needs C++ interop enabled
|
||||||
if module_name == "Runtime":
|
if module_name == "Runtime":
|
||||||
extra_args = ["-I", os.path.join(source_dir, "stdlib",
|
extra_args = ["-I", os.path.join(source_dir, "stdlib",
|
||||||
"public", "RuntimeModule", "modules"),
|
"public", "RuntimeModule", "modules"),
|
||||||
"-I", os.path.join(source_dir, "include")]
|
"-I", os.path.join(source_dir, "include"),
|
||||||
|
"--enable-experimental-cxx-interop"]
|
||||||
# _Concurrency needs its own additional modules in the module path
|
# _Concurrency needs its own additional modules in the module path
|
||||||
if module_name == "_Concurrency":
|
if module_name == "_Concurrency":
|
||||||
extra_args = ["-I", os.path.join(source_dir, "stdlib",
|
extra_args = ["-I", os.path.join(source_dir, "stdlib",
|
||||||
|
|||||||
Reference in New Issue
Block a user