[C++] Add option to exclude header models from compilation

Summary: Can be useful in case there is compilation issue with the models

Reviewed By: jvillard

Differential Revision: D5208830

fbshipit-source-id: f31d84f
master
Andrzej Kotulski 8 years ago committed by Facebook Github Bot
parent bfccb5222e
commit cf8d5483db

@ -767,11 +767,21 @@ and copy_propagation =
CLOpt.mk_bool ~deprecated:["copy-propagation"] ~long:"copy-propagation" CLOpt.mk_bool ~deprecated:["copy-propagation"] ~long:"copy-propagation"
"Perform copy-propagation on the IR" "Perform copy-propagation on the IR"
and cxx = and cxx, cxx_infer_headers =
CLOpt.mk_bool ~deprecated:["cxx-experimental"] ~long:"cxx" let cxx_infer_headers =
~default:true CLOpt.mk_bool ~long:"cxx-infer-headers"
~in_help:CLOpt.[Capture, manual_clang] ~default:true
"Analyze C++ methods" ~in_help:CLOpt.[Capture, manual_clang]
"Include C++ header models during compilation, set by $(b,--cxx). Infer swaps some C++ \
headers for its own in order to get a better model of, eg, the standard library. This \
can sometimes cause compilation failures." in
let cxx = CLOpt.mk_bool_group ~long:"cxx"
~default:true
~in_help:CLOpt.[Capture, manual_clang]
"Analyze C++ methods"
[cxx_infer_headers] [] in
cxx, cxx_infer_headers
and ( and (
bo_debug, bo_debug,
@ -1846,6 +1856,7 @@ and copy_propagation = !copy_propagation
and crashcontext = !crashcontext and crashcontext = !crashcontext
and create_harness = !android_harness and create_harness = !android_harness
and cxx = !cxx and cxx = !cxx
and cxx_infer_headers = !cxx_infer_headers
and debug_level_analysis = !debug_level_analysis and debug_level_analysis = !debug_level_analysis
and debug_level_capture = !debug_level_capture and debug_level_capture = !debug_level_capture
and debug_level_linters = !debug_level_linters and debug_level_linters = !debug_level_linters

@ -208,6 +208,7 @@ val copy_propagation : bool
val crashcontext : bool val crashcontext : bool
val create_harness : bool val create_harness : bool
val cxx : bool val cxx : bool
val cxx_infer_headers : bool
val debug_level_analysis : int val debug_level_analysis : int
val debug_level_capture : int val debug_level_capture : int
val debug_level_linters : int val debug_level_linters : int

@ -31,7 +31,7 @@ let plugin_name = "BiniouASTExporter";
/** whether to amend include search path with C++ model headers */ /** whether to amend include search path with C++ model headers */
let infer_cxx_models = Config.cxx; let infer_cxx_models = Config.cxx_infer_headers;
let value_of_argv_option argv opt_name => let value_of_argv_option argv opt_name =>
List.fold List.fold

Loading…
Cancel
Save