From 4d6a5677f0f4af0193bb42f5d2938287efaaf91b Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 22 May 2014 10:48:11 +0200 Subject: Fix native_compute for systems with a limited size for the command line. The call to the native compiler can fail due to the sheer amounts of -I options passed to it. Indeed, it is easy to get the command line to exceed 512KB, thus causing various operating systems to reject it. This commit avoids the issue by only passing the -I options that matter for the currently compiled code. Note that, in the worst case, this commit is still not sufficient on Windows (32KB max), but this worst case should be rather uncommon and thus can be ignored for now. For the record, the command-line size mandated by Posix is 4KB. --- kernel/nativelib.mli | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kernel/nativelib.mli') diff --git a/kernel/nativelib.mli b/kernel/nativelib.mli index e577a9032..a2633ac2c 100644 --- a/kernel/nativelib.mli +++ b/kernel/nativelib.mli @@ -18,8 +18,7 @@ val get_ml_filename : unit -> string * string val compile : string -> global list -> int * string -val compile_library : Names.dir_path -> - global list -> string list -> string -> int +val compile_library : Names.dir_path -> global list -> string -> int val call_linker : ?fatal:bool -> string -> string -> code_location_updates option -> unit -- cgit v1.2.3