summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot/ocamlcbin1179861 -> 1180947 bytes
-rwxr-xr-xboot/ocamldepbin318360 -> 318559 bytes
-rw-r--r--bytecomp/bytelink.ml2
-rw-r--r--parsing/location.ml5
-rw-r--r--parsing/location.mli4
5 files changed, 9 insertions, 2 deletions
diff --git a/boot/ocamlc b/boot/ocamlc
index 2fbd8fb94..85aef73f3 100755
--- a/boot/ocamlc
+++ b/boot/ocamlc
Binary files differ
diff --git a/boot/ocamldep b/boot/ocamldep
index fa3f81340..fb7a64301 100755
--- a/boot/ocamldep
+++ b/boot/ocamldep
Binary files differ
diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
index eae782819..f55181d9f 100644
--- a/bytecomp/bytelink.ml
+++ b/bytecomp/bytelink.ml
@@ -177,7 +177,7 @@ let check_consistency ppf file_name cu =
begin try
let source = List.assoc cu.cu_name !implementations_defined in
Location.print_warning (Location.in_file file_name) ppf
- (Warnings.Multiple_definition(cu.cu_name, file_name, source))
+ (Warnings.Multiple_definition(cu.cu_name, Location.show_filename file_name, Location.show_filename source))
with Not_found -> ()
end;
implementations_defined :=
diff --git a/parsing/location.ml b/parsing/location.ml
index ff39de465..ad13e70e3 100644
--- a/parsing/location.ml
+++ b/parsing/location.ml
@@ -214,8 +214,11 @@ let absolute_path s = (* This function could go into Filename *)
in
aux s
+let show_filename file =
+ if !absname then absolute_path file else file
+
let print_filename ppf file =
- Format.fprintf ppf "%s" (if !absname then absolute_path file else file)
+ Format.fprintf ppf "%s" (show_filename file)
let reset () =
num_loc_lines := 0
diff --git a/parsing/location.mli b/parsing/location.mli
index 0303c0add..1f12366fd 100644
--- a/parsing/location.mli
+++ b/parsing/location.mli
@@ -60,5 +60,9 @@ val highlight_locations: formatter -> t -> t -> bool
val print: formatter -> t -> unit
val print_filename: formatter -> string -> unit
+val show_filename: string -> string
+ (** In -absname mode, return the absolute path for this filename.
+ Otherwise, returns the filename unchanged. *)
+
val absname: bool ref