Don't pass -g to cl; it doesn't like it! (#120)
The Microsoft C compiler doesn't recognise -g. For now, easier just not to compile with any debugging information on MSVC. Signed-off-by: David Allsopp <david.allsopp@metastack.com>
This commit is contained in:
parent
624b32b241
commit
7ec081419c
|
@ -459,3 +459,9 @@ let best_mode t : Mode.t =
|
||||||
match t.ocamlopt with
|
match t.ocamlopt with
|
||||||
| Some _ -> Native
|
| Some _ -> Native
|
||||||
| None -> Byte
|
| None -> Byte
|
||||||
|
|
||||||
|
let cc_g (ctx : t) =
|
||||||
|
if !Clflags.g && ctx.ccomp_type <> "msvc" then
|
||||||
|
["-g"]
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
|
|
@ -154,3 +154,6 @@ val compiler : t -> Mode.t -> Path.t option
|
||||||
|
|
||||||
(** The best compilation mode for this context *)
|
(** The best compilation mode for this context *)
|
||||||
val best_mode : t -> Mode.t
|
val best_mode : t -> Mode.t
|
||||||
|
|
||||||
|
(** [\["-g"\]] if [!Clflags.g] and [\[\]] otherwise *)
|
||||||
|
val cc_g : t -> string list
|
||||||
|
|
|
@ -100,7 +100,7 @@ module Gen(P : Params) = struct
|
||||||
(Build.paths h_files
|
(Build.paths h_files
|
||||||
>>>
|
>>>
|
||||||
Build.fanout
|
Build.fanout
|
||||||
(SC.expand_and_eval_set ~dir lib.c_flags ~standard:(Utils.g ()))
|
(SC.expand_and_eval_set ~dir lib.c_flags ~standard:(Context.cc_g ctx))
|
||||||
requires
|
requires
|
||||||
>>>
|
>>>
|
||||||
Build.run ~context:ctx
|
Build.run ~context:ctx
|
||||||
|
@ -125,7 +125,7 @@ module Gen(P : Params) = struct
|
||||||
(Build.paths h_files
|
(Build.paths h_files
|
||||||
>>>
|
>>>
|
||||||
Build.fanout
|
Build.fanout
|
||||||
(SC.expand_and_eval_set ~dir lib.cxx_flags ~standard:(Utils.g ()))
|
(SC.expand_and_eval_set ~dir lib.cxx_flags ~standard:(Context.cc_g ctx))
|
||||||
requires
|
requires
|
||||||
>>>
|
>>>
|
||||||
Build.run ~context:ctx
|
Build.run ~context:ctx
|
||||||
|
|
Loading…
Reference in New Issue