[buck] always create multilinks for attribute files

Summary:
The only path to the `MergeCaptured.slink` function is when we should merge, so
it doesn't make sense to check `Config.merge` again. In the case of `infer run
--flavors -- buck ...`, this would create regular symlinks instead of the much
faster multilinks.

Reviewed By: jberdine

Differential Revision: D5574020

fbshipit-source-id: df710ca
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 931d4442c8
commit 5074388e25

@ -101,7 +101,7 @@ let rec slink ~stats ~skiplevels src dst =
(Filename.concat dst item))
items )
else if skiplevels > 0 then ()
else if Config.merge && Filename.check_suffix dst ".attr" then add_multilink_attr ~stats src dst
else if Filename.check_suffix dst ".attr" then add_multilink_attr ~stats src dst
else create_link ~stats src dst
(** Determine if the destination should link to the source.

@ -180,9 +180,7 @@ let clean_results_dir () =
let check_captured_empty mode =
let clean_command_opt = clean_compilation_command mode in
(* if merge is passed, the captured folder will be empty at this point,
but will be filled later on. *)
if Utils.directory_is_empty Config.captured_dir && not Config.merge then (
if Utils.directory_is_empty Config.captured_dir then (
( match clean_command_opt with
| Some clean_command
-> L.user_warning "@\nNothing to compile. Try running `%s` first.@." clean_command

Loading…
Cancel
Save