From 10f00a4960856b9591478a8e55143e123728b61a Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 18 Mar 2024 11:48:19 -0700 Subject: [PATCH] Add CHROMIUM define when building libyuv with GN - tells cpu_id.cc to avoid sys_call Bug: None Change-Id: I61cd87fd130a6106306cf0f0cc3e36028fa5635f Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5378424 Reviewed-by: richard winterton Commit-Queue: Frank Barchard --- BUILD.gn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 2c600b22f..96ef9c17d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -29,7 +29,9 @@ config("libyuv_config") { ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ] } } - defines = [] + + # Define CHROMIUM to tell cpu_id to avoid sandbox unsafe system calls. + defines = [ "CHROMIUM" ] if (!libyuv_use_neon) { defines += [ "LIBYUV_DISABLE_NEON" ] }