[Impeller] Switched to static linked libc++ in vulkan validation layers. (flutter/engine#48290)

fixes https://github.com/flutter/flutter/issues/138535
test coverage: existing integration tests in flutter repo which look for validation layers

I also verified locally that the `libc++.so` is no longer present and that it runs correctly.

```
$ find lib/arm64-v8a/
lib/arm64-v8a/
lib/arm64-v8a//libflutter.so
lib/arm64-v8a//libVkLayer_khronos_validation.so
```

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
gaaclarke
2023-11-21 14:06:05 -08:00
committed by GitHub
parent 0b7f44c8c4
commit e80ecd9194
2 changed files with 4 additions and 8 deletions

View File

@@ -464,7 +464,7 @@ foreach(layer_info, layers) {
}
if (is_android) {
libs = [
"c++", # Note: C++ added by Flutter.
"c++_static", # Note: C++ added by Flutter.
"log",
"nativewindow",
]

View File

@@ -499,13 +499,9 @@ action("android_jar") {
"--native_lib",
rebase_path("$validation_layer_out_dir/libVkLayer_khronos_validation.so"),
]
if (current_cpu == "arm64") {
args += [
"--native_lib",
rebase_path("$android_libcpp_root/libs/arm64-v8a/libc++_shared.so",
root_build_dir),
]
} else {
if (current_cpu != "arm64") {
# This may not be necessarily required anymore. It was kept to maintain
# old behavior.
assert(false, "Validation layers not supported for arch.")
}
}