@@ -24,10 +24,15 @@ main() {
2424 #
2525 local __rust_flags=" --print native-static-libs ${RUSTFLAGS} "
2626
27+ local __extra_features=" "
28+ if [[ -z " ${FFI_DISABLE_FVM} " ]]; then
29+ __extra_features=" --features fvm"
30+ fi
31+
2732 # shellcheck disable=SC2068 # the rest of the parameters should be split
2833 RUSTFLAGS=" ${__rust_flags} " \
2934 cargo build \
30- --release --locked ${@: 2} 2>&1 | tee ${__build_output_log_tmp}
35+ --release --locked ${@: 2} ${__extra_features} 2>&1 | tee ${__build_output_log_tmp}
3136
3237 # parse build output for linker flags
3338 #
@@ -56,7 +61,7 @@ main() {
5661 # shellcheck disable=SC2068 # the rest of the parameters should be split
5762 RUSTFLAGS=" ${__rust_flags} " \
5863 cargo build \
59- --release --locked --target ${__target} ${@: 2} 2>&1 \
64+ --release --locked --target ${__target} ${@: 2} ${__extra_features} 2>&1 \
6065 | tee ${__build_output_log_tmp}
6166
6267 # Create the universal binary/
@@ -75,7 +80,7 @@ main() {
7580 # generate filcrypto.h
7681 # Check if FVM is in the build features - if so, include it in header generation
7782 local __header_features=" c-headers"
78- if echo " ${@: 2 } " | grep -q " fvm " ; then
83+ if [[ -z " ${FFI_DISABLE_FVM } " ]] ; then
7984 __header_features=" c-headers,fvm"
8085 fi
8186 RUSTFLAGS=" ${__rust_flags} " HEADER_DIR=" ." \
0 commit comments