From fadf72ce0d252fc59890c1a2ffe95db14e4add88 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 3 Feb 2016 19:16:03 +0100 Subject: Added gcc cmd-line option -include. The -include option is passed to the preprocessor and -include is equivalent to writting #include "" as first line in the primary source file. Bug 18066. --- driver/Driver.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'driver') diff --git a/driver/Driver.ml b/driver/Driver.ml index 81f28309..83078256 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -446,6 +446,8 @@ Preprocessing options: -D= Define preprocessor symbol -U Undefine preprocessor symbol -Wp, Pass option to the preprocessor + -include Process as if #include \"\" appears at the first + line of the primary source file. Language support options (use -fno- to turn off -f) : -fbitfields Emulate bit fields in structs [off] -flongdouble Treat 'long double' as 'double' [off] @@ -569,6 +571,7 @@ let cmdline_actions = Prefix "-U", Self(fun s -> prepro_options := s :: !prepro_options); Prefix "-Wp,", Self (fun s -> prepro_options := List.rev_append (explode_comma_option s) !prepro_options); + Exact "-include", String (fun s -> prepro_options := s :: "-include" :: !prepro_options); (* Language support options -- more below *) Exact "-fall", Self (fun _ -> set_all language_support_options); Exact "-fnone", Self (fun _ -> unset_all language_support_options); -- cgit