[buck integration] Add buck flavor option to use for getting dependencies

Reviewed By: jvillard

Differential Revision: D5584372

fbshipit-source-id: e733154
master
Dulma Churchill 8 years ago committed by Facebook Github Bot
parent de6c396800
commit 931d4442c8

@ -705,6 +705,11 @@ and annotation_reachability_custom_pairs =
Example format: for custom annotations com.my.annotation.{Source1,Source2,Sink1}
{ "sources" : ["Source1", "Source2"], "sink" : "Sink1" }|}
and append_buck_flavors =
CLOpt.mk_string_list ~long:"append-buck-flavors"
~in_help:CLOpt.([(Capture, manual_buck_flavors)])
"Additional Buck flavors to append to targets discovered by the $(b,--buck-compilation-database) option."
and array_level =
CLOpt.mk_int ~deprecated:["arraylevel"] ~long:"array-level" ~default:0 ~meta:"int"
{|Level of treating the array indexing and pointer arithmetic:
@ -1868,6 +1873,8 @@ and annotation_reachability = !annotation_reachability
and annotation_reachability_custom_pairs = !annotation_reachability_custom_pairs
and append_buck_flavors = !append_buck_flavors
and array_level = !array_level
and ast_file = !ast_file

@ -74,6 +74,8 @@ val anonymous_block_num_sep : string
val anonymous_block_prefix : string
val append_buck_flavors : string list
val assign : string
val attributes_dir_name : string

@ -82,7 +82,7 @@ let call_buck_query_for_dependencies targets =
"*** command failed:@\n*** %s@\n*** %s@." buck_query_cmd
(Unix.Exit_or_signal.to_string_hum status)
| Ok ()
-> output
-> List.map ~f:(fun name -> string_of_target {name; flavors= Config.append_buck_flavors}) output
let get_dependency_targets args =
let targets, no_targets = List.partition_tf ~f:is_target_string args in

Loading…
Cancel
Save