diff --git a/examples/simple/build.rs b/examples/simple/build.rs index 7c8633cac..5c1194c87 100644 --- a/examples/simple/build.rs +++ b/examples/simple/build.rs @@ -19,12 +19,17 @@ fn link_ispc() { #[cfg(target_arch = "aarch64")] let target_isas = vec![TargetISA::Neoni32x4]; + let bindgen_opts = ispc_compile::BindgenOptions { + allowlist_functions: vec![std::borrow::Cow::Borrowed(&"add_lists")], + }; + // For a portable program we can explicitly compile for each target ISA // we want. Then ISPC will pick the correct ISA at runtime to call // for the target CPU. ispc_compile::Config::new() .file("src/simple.ispc") .target_isas(target_isas) + .bindgen_options(bindgen_opts) .out_dir("src/") .compile("simple"); }