@@ -105,7 +105,6 @@ fn build_wasm_runtime() -> PathBuf {
105105 let out_dir = env:: var_os ( "OUT_DIR" ) . unwrap ( ) ;
106106
107107 let target_dir = Path :: new ( "" ) . join ( & out_dir) . join ( "target" ) ;
108- let toolchain_dir = Path :: new ( "" ) . join ( & out_dir) . join ( "toolchain" ) ;
109108
110109 let in_repo_dir = get_wasm_runtime_path ( ) ;
111110
@@ -126,20 +125,21 @@ fn build_wasm_runtime() -> PathBuf {
126125
127126 let mut cargo_cmd = std:: process:: Command :: new ( & cargo_bin) ;
128127 let mut cmd = cargo_cmd
128+ . arg ( "hyperlight" )
129129 . arg ( "build" )
130+ . arg ( "--target-dir" )
131+ . arg ( & target_dir)
130132 . arg ( "--profile" )
131133 . arg ( cargo_profile)
132134 . arg ( "-v" )
133- . arg ( "--target-dir" )
134- . arg ( & target_dir)
135135 . current_dir ( & in_repo_dir)
136136 . env_clear ( )
137- // On windows when `gdb` features is enabled this is not set correctly
138- . env ( "CFLAGS_x86_64_unknown_none" , "-fPIC" )
139- . envs ( env_vars)
140- . env ( "PATH" , path_with ( & toolchain_dir) )
141- . env ( "HYPERLIGHT_GUEST_TOOLCHAIN_ROOT" , & toolchain_dir) ;
137+ . envs ( env_vars) ;
142138
139+ // should this go in cargo hyperlight?
140+ // On windows when `gdb` features is enabled this is not set correctly
141+ //.env("CFLAGS_x86_64_unknown_none", "-fPIC")
142+
143143 // Add --features gdb if the gdb feature is enabled for this build script
144144 if std:: env:: var ( "CARGO_FEATURE_GDB" ) . is_ok ( ) {
145145 cmd = cmd. arg ( "--features" ) . arg ( "gdb" ) ;
@@ -152,7 +152,7 @@ fn build_wasm_runtime() -> PathBuf {
152152 panic ! ( "could not compile wasm_runtime" ) ;
153153 }
154154 let resource = target_dir
155- . join ( "x86_64-unknown -none" )
155+ . join ( "x86_64-hyperlight -none" )
156156 . join ( profile)
157157 . join ( "wasm_runtime" ) ;
158158
0 commit comments