From 95c4c2fd5f7f14490224ac629c3df724491ffb94 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 17 Oct 2023 07:50:17 +0000 Subject: subproject: vndk: Parametrize paths per CPU family Parametrize the path to the prebuilt shared libraries and to the inclusion path to support both x86_64 and aarch64. Signed-off-by: Jacopo Mondi --- subprojects/packagefiles/vndk/meson.build | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'subprojects/packagefiles') diff --git a/subprojects/packagefiles/vndk/meson.build b/subprojects/packagefiles/vndk/meson.build index b2430654..6df26936 100644 --- a/subprojects/packagefiles/vndk/meson.build +++ b/subprojects/packagefiles/vndk/meson.build @@ -4,17 +4,23 @@ project('vndk', 'cpp', version : 'vndk-v34') cpu_family = host_machine.cpu_family() -if cpu_family != 'x86_64' - error('vndk only supports x86_64 cpu_family') +if cpu_family == 'x86_64' + cpu = 'x86_64' + prebuilt_path = cpu / 'arch-x86_64/shared' +elif cpu_family == 'aarch64' + cpu = 'arm64' + prebuilt_path = cpu / 'arch-arm64-armv8-a/shared' +else + error('Architecture: ' + cpu_family + ' not supported') endif prebuild_libraries = [ - meson.current_source_dir() / cpu_family / 'arch-x86_64/shared/llndk-stub', - meson.current_source_dir() / cpu_family / 'arch-x86_64/shared/vndk-sp', - meson.current_source_dir() / cpu_family / 'arch-x86_64/shared/vndk-core', + meson.current_source_dir() / prebuilt_path / 'llndk-stub', + meson.current_source_dir() / prebuilt_path / 'vndk-sp', + meson.current_source_dir() / prebuilt_path / 'vndk-core', ] -include_base = cpu_family / 'include' +include_base = cpu / 'include' cxx = meson.get_compiler('cpp') libhardware_dep = declare_dependency( -- cgit v1.2.1