File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ const ACTORS: &[(&Package, &ID)] = &[
25
25
( "verifreg" , "verifiedregistry" ) ,
26
26
] ;
27
27
28
+ const WASM_FEATURES : & [ & str ] = & [ "+bulk-memory" , "+crt-static" ] ;
29
+
28
30
const NETWORK_ENV : & str = "BUILD_FIL_NETWORK" ;
29
31
30
32
/// Returns the configured network name, checking both the environment and feature flags.
@@ -90,6 +92,10 @@ fn main() -> Result<(), Box<dyn Error>> {
90
92
println ! ( "cargo:rerun-if-changed={}" , file) ;
91
93
}
92
94
95
+ let rustflags =
96
+ WASM_FEATURES . iter ( ) . flat_map ( |flag| [ "-Ctarget-feature=" , * flag, " " ] ) . collect :: < String > ( )
97
+ + "-Clink-arg=--export-table" ;
98
+
93
99
// Cargo build command for all actors at once.
94
100
let mut cmd = Command :: new ( & cargo) ;
95
101
cmd. arg ( "build" )
@@ -98,7 +104,7 @@ fn main() -> Result<(), Box<dyn Error>> {
98
104
. arg ( "--profile=wasm" )
99
105
. arg ( "--locked" )
100
106
. arg ( "--manifest-path=" . to_owned ( ) + manifest_path. to_str ( ) . unwrap ( ) )
101
- . env ( "RUSTFLAGS" , "-Ctarget-feature=+crt-static -Clink-arg=--export-table" )
107
+ . env ( "RUSTFLAGS" , rustflags )
102
108
. env ( NETWORK_ENV , network_name)
103
109
. stdout ( Stdio :: piped ( ) )
104
110
. stderr ( Stdio :: piped ( ) )
You can’t perform that action at this time.
0 commit comments