summaryrefslogtreecommitdiff
path: root/utils/ccomp.ml
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2015-01-24 16:35:32 +0000
committerGabriel Scherer <gabriel.scherer@gmail.com>2015-01-24 16:35:32 +0000
commita4029d876b52822fc1bee78c2011ea5e34b46950 (patch)
tree0daca1c33a28fc473e55776634b61ac049956908 /utils/ccomp.ml
parent95f626c9ffb683c47e1aa82d7d7865bc4e2a0ddc (diff)
downloadocaml-a4029d876b52822fc1bee78c2011ea5e34b46950.tar.gz
PR#6720: propagate -g to the C compiler
(Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15795 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'utils/ccomp.ml')
-rw-r--r--utils/ccomp.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/ccomp.ml b/utils/ccomp.ml
index 7da604b56d..4bea26866b 100644
--- a/utils/ccomp.ml
+++ b/utils/ccomp.ml
@@ -51,7 +51,7 @@ let quote_optfile = function
let compile_file ~output_name name =
command
(Printf.sprintf
- "%s%s -c %s %s %s %s"
+ "%s%s -c %s %s %s %s %s"
(match !Clflags.c_compiler with
| Some cc -> cc
| None ->
@@ -61,6 +61,7 @@ let compile_file ~output_name name =
(match output_name with
| Some n -> " -o " ^ Filename.quote n
| None -> "")
+ (if !Clflags.debug then "-g" else "")
(String.concat " " (List.rev !Clflags.all_ccopts))
(quote_prefixed "-I" (List.rev !Clflags.include_dirs))
(Clflags.std_include_flag "-I")