|
@@ -26,7 +26,15 @@ end
|
|
|
|
|
|
let handle_native_lib com lib =
|
|
let handle_native_lib com lib =
|
|
com.native_libs.all_libs <- lib#get_file_path :: com.native_libs.all_libs;
|
|
com.native_libs.all_libs <- lib#get_file_path :: com.native_libs.all_libs;
|
|
- com.load_extern_type <- com.load_extern_type @ [lib#get_file_path,lib#build];
|
|
|
|
|
|
+ let build path =
|
|
|
|
+ (* The first build has to load, afterwards we install a direct lib#build call. *)
|
|
|
|
+ lib#load;
|
|
|
|
+ com.load_extern_type <- List.map (fun (name,f) ->
|
|
|
|
+ name,if name = lib#get_file_path then lib#build else f
|
|
|
|
+ ) com.load_extern_type;
|
|
|
|
+ lib#build path;
|
|
|
|
+ in
|
|
|
|
+ com.load_extern_type <- com.load_extern_type @ [lib#get_file_path,build];
|
|
if not (Define.raw_defined com.defines "haxe.noNativeLibsCache") then begin
|
|
if not (Define.raw_defined com.defines "haxe.noNativeLibsCache") then begin
|
|
let cs = com.cs in
|
|
let cs = com.cs in
|
|
let init () =
|
|
let init () =
|
|
@@ -54,7 +62,7 @@ let handle_native_lib com lib =
|
|
name,if name = lib#get_file_path then build else f
|
|
name,if name = lib#get_file_path then build else f
|
|
) com.load_extern_type
|
|
) com.load_extern_type
|
|
| None ->
|
|
| None ->
|
|
- lib#load
|
|
|
|
|
|
+ ()
|
|
)
|
|
)
|
|
end else
|
|
end else
|
|
(* Offline mode, just read library as usual. *)
|
|
(* Offline mode, just read library as usual. *)
|