Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross-compilation of C++ interpreter API to 32-bit architecture #3810

Merged
merged 5 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/yocto_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
- sdk_url: https://nextcloud.slint.dev/s/BTL5NtLACjgS7Pf/download/poky-glibc-x86_64-core-image-weston-cortexa15t2hf-neon-qemuarm-toolchain-4.0.9.sh
env_setup: environment-setup-cortexa15t2hf-neon-poky-linux-gnueabi
target: armv7-unknown-linux-gnueabihf
extra_args: -DSLINT_FEATURE_INTERPRETER=OFF
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand All @@ -43,5 +42,5 @@ jobs:
# f5c3908b7ec5131b7b19ff642b5975660c7484f8
export BINDGEN_EXTRA_CLANG_ARGS=$OECORE_TUNE_CCARGS
mkdir ${{ runner.workspace }}/cppbuild
cmake -GNinja -B ${{ runner.workspace }}/cppbuild -S . -DRust_CARGO_TARGET=${{ matrix.target }} -DSLINT_BUILD_TESTING=ON -DSLINT_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Debug -DSLINT_FEATURE_RENDERER_SKIA=ON -DSLINT_FEATURE_BACKEND_QT=OFF -DSLINT_FEATURE_BACKEND_LINUXKMS=ON ${{ matrix.extra_args }}
cmake -GNinja -B ${{ runner.workspace }}/cppbuild -S . -DRust_CARGO_TARGET=${{ matrix.target }} -DSLINT_BUILD_TESTING=ON -DSLINT_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Debug -DSLINT_FEATURE_RENDERER_SKIA=ON -DSLINT_FEATURE_BACKEND_QT=OFF -DSLINT_FEATURE_BACKEND_LINUXKMS=ON -DSLINT_FEATURE_INTERPRETER=ON
cmake --build ${{ runner.workspace }}/cppbuild
5 changes: 3 additions & 2 deletions api/cpp/cbindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,13 +768,13 @@ fn gen_interpreter(
dependencies: &mut Vec<PathBuf>,
) -> anyhow::Result<()> {
let mut config = default_config();
// Avoid Value, just export ValueOpaque.
config.export.exclude = IntoIterator::into_iter([
"Value",
"ValueType",
"PropertyDescriptor",
"Diagnostic",
"PropertyDescriptor",
"Box",
])
.map(String::from)
.collect();
Expand All @@ -795,7 +795,7 @@ fn gen_interpreter(
"StructIteratorOpaque",
"ComponentInstance",
"StructIteratorResult",
"ValueOpaque",
"Value",
"StructOpaque",
"ModelNotifyOpaque",
])
Expand All @@ -821,6 +821,7 @@ fn gen_interpreter(
using slint::interpreter::ValueType;
using slint::interpreter::PropertyDescriptor;
using slint::interpreter::Diagnostic;
template <typename T> using Box = T*;
}",
)
.generate()
Expand Down
Loading
Loading