diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-10-17 07:50:17 +0000 |
---|---|---|
committer | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-10-17 07:50:17 +0000 |
commit | 95c4c2fd5f7f14490224ac629c3df724491ffb94 (patch) | |
tree | 385df21a8e2a84e1791d23ecc68b0ffc5fbd3a37 | |
parent | 54401666eeb78e66bdc7f592251d1f92f6dac83f (diff) |
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 <jacopo.mondi@ideasonboard.com>
-rw-r--r-- | subprojects/packagefiles/vndk/meson.build | 18 |
1 files changed, 12 insertions, 6 deletions
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( |