Skip to content

Commit bbde0c2

Browse files
committed
build: more ndk fixes
1 parent f407448 commit bbde0c2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

build/Build.LibSkia.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,19 @@ void PatchCpuFeaturesTarget()
292292
# Patched by alphaSkia: NDK r26+ removed sources/android/cpufeatures/.
293293
# cpu_features_ndk_compat points at the ndk_compat shim from google/cpu_features
294294
# (https://github.com/google/cpu_features), the official API-compatible replacement.
295+
# cpu_features_include points at the include/ directory of that library, which
296+
# ndk_compat/cpu-features.c needs for cpu_features_macros.h and related headers.
295297
296298
declare_args() {
297299
cpu_features_ndk_compat = ""
300+
cpu_features_include = ""
298301
}
299302
300303
import("../third_party.gni")
301304
302305
third_party("cpu-features") {
303306
if (cpu_features_ndk_compat != "") {
304-
public_include_dirs = [ cpu_features_ndk_compat ]
307+
public_include_dirs = [ cpu_features_ndk_compat, cpu_features_include ]
305308
sources = [ cpu_features_ndk_compat + "/cpu-features.c" ]
306309
} else {
307310
public_include_dirs = [ "$ndk/sources/android/cpufeatures" ]
@@ -383,6 +386,8 @@ void BuildSkia()
383386
{
384387
gnArgs["cpu_features_ndk_compat"] =
385388
(RootDirectory / "externals" / "cpu_features" / "ndk_compat").ToString().Replace('\\', '/');
389+
gnArgs["cpu_features_include"] =
390+
(RootDirectory / "externals" / "cpu_features" / "include").ToString().Replace('\\', '/');
386391
}
387392

388393
GnNinja($"out/{libDir}", "skia", gnArgs, gnFlags, SkiaPath);

0 commit comments

Comments
 (0)