diff options
author | Scott Murray <scott.murray@konsulko.com> | 2024-10-16 14:44:50 -0400 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2024-10-21 18:17:15 +0000 |
commit | 5e6d1ea451cc8c484ec60382c9ff6726d3703016 (patch) | |
tree | a64f27feff97795808f869fc945b4fd23d57d16a | |
parent | 56a7874ff6baf60bc6f8d10a8fa0de43cf60b1a4 (diff) |
agl-persistent-storage-api: set BINDGEN_EXTRA_CLANG_ARGS
The agl-persistent-storage-api build was failing on hosts where the
native headers happened to not work with the clang invocation being
done during binding generation for the rocksdb wrapper crate.
To avoid this, set BINDGEN_EXTRA_CLANG_ARGS to pass in the required
cross-compile environment arguments.
Bug-AGL: SPEC-5264
Change-Id: I54af5846045285b4ccd7af5cc0087193eae79be0
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-demo/+/30416
Tested-by: Jenkins Job builder account
Reviewed-by: Naoto YAMAGUCHI <naoto.yamaguchi@aisin.co.jp>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
-rw-r--r-- | recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb b/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb index 334c6c840..a326c6d81 100644 --- a/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb +++ b/recipes-demo/agl-persistent-storage-api/agl-persistent-storage-api_git.bb @@ -31,6 +31,10 @@ USERADD_PARAM:${PN} = "--system -g 903 -u 903 -o -d / --shell /bin/nologin persi do_compile:prepend() { export ROCKSDB_CXX_STD="--std=c99" export ROCKSDB_INCLUDE_DIR="${RECIPE_SYSROOT}/usr/include" + + # Need to set options for the rust-librocksdb-sys crate's bindgen invocation of clang, + # or there's a good chance it will choke when trying to use the host system's headers. + export BINDGEN_EXTRA_CLANG_ARGS="${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" } do_install:append () { |