[buck] change order of the commands passed to buck, make sure user provided ones are last (and overrides the others)

Summary: When we have clashing args to bug (for instance -j and -Xbuck --num-threads) CLI passed -Xbuck args should win.

Reviewed By: jvillard

Differential Revision: D20557060

fbshipit-source-id: 726fc501a
master
Martin Trojer 5 years ago committed by Facebook GitHub Bot
parent cdb9281f1f
commit 870d18a42b

@ -362,20 +362,20 @@ let capture_buck_args =
"*//cxx.modules_default=false" "*//cxx.modules_default=false"
; "--config" ; "--config"
; "*//cxx.modules=false" ] ; "*//cxx.modules=false" ]
( List.rev_append Config.buck_build_args ( ( match Config.xcode_developer_dir with
( if not (List.is_empty Config.buck_blacklist) then
[ "--config"
; Printf.sprintf "*//infer.blacklist_regex=(%s)"
(String.concat ~sep:")|(" Config.buck_blacklist) ]
else [] )
@ ( match Config.xcode_developer_dir with
| Some d -> | Some d ->
["--config"; Printf.sprintf "apple.xcode_developer_dir=%s" d] ["--config"; Printf.sprintf "apple.xcode_developer_dir=%s" d]
| None -> | None ->
[] ) [] )
@ (if Config.keep_going then ["--keep-going"] else []) @ (if Config.keep_going then ["--keep-going"] else [])
@ ["-j"; Int.to_string Config.jobs] @ ["-j"; Int.to_string Config.jobs]
@ match Config.load_average with Some l -> ["-L"; Float.to_string l] | None -> [] ) @ (match Config.load_average with Some l -> ["-L"; Float.to_string l] | None -> [])
@ List.rev_append Config.buck_build_args
( if not (List.is_empty Config.buck_blacklist) then
[ "--config"
; Printf.sprintf "*//infer.blacklist_regex=(%s)"
(String.concat ~sep:")|(" Config.buck_blacklist) ]
else [] ) )
let run_buck_build prog buck_build_args = let run_buck_build prog buck_build_args =

Loading…
Cancel
Save