OCaml Forge

Detail: [#762] verbose build

Feature Requests: Browse | Download .csv | Monitor

[#762] verbose build

Date:
2010-09-28 07:42
Priority:
3
State:
Open
Submitted by:
ygrek (ygrek)
Assigned to:
Sylvain Le Gall (gildor-admin)
Resolution:
None
Due in version:
None
Product:
OASIS
Component:
OASIS
Operating System:
None
 
Summary:
verbose build

Detailed description
Provide the way to pass -verbose option to ocamlc/ocamlopt (cf debug,profile fields in setup.data). Currently there is no predefined tag for it to put in _tags, editing config.data ocamlc variable doesn't work either, only specifying ocamlbuildflags works which is not very obvious.

Followup

Message
Date: 2010-09-30 08:22
Sender: ygrek

Also -annot flag is a good candidate too. Albeit it can be easily enabled via _tags, it is more suitable as a configure option (developers need it, end users don't).
Date: 2010-09-30 08:09
Sender: ygrek

Yes, thanks for the pointer, I didn't notice that ByteOpt/NativeOpt fields exist :)
So feature request boils down to adding verbose as a builtin flag (like debug and profile currently).
Date: 2010-09-28 20:05
Sender: Sylvain Le Gall

You can use this workaround (example on extunix):

+Flag verbose
+ Description: Invoke ocamlc/ocamlopt with -verbose
+ Default: false
+
Library extunix
Path: src/
Modules: ExtUnix
@@ -28,6 +32,9 @@ Library extunix
ioctl_siocgifconf.c, uname.c, fadvise.c, fallocate.c,
tty_ioctl.c, unistd.c
BuildDepends: unix
+ if flag(verbose)
+ ByteOpt: -verbose
+ NativeOpt: -verbose

Executable test
Path: test/
@@ -35,6 +42,9 @@ Executable test
CompiledObject: best
MainIs: test.ml
BuildDepends: extunix, oUnit (>= 1.0.2)
+ if flag(verbose)
+ ByteOpt: -verbose
+ NativeOpt: -verbose

Test main
Command: $test

Is it what you want?
Date: 2010-09-28 19:42
Sender: ygrek

I mean editing setup.data :
ocamlbuildflags ="-cflags -verbose -lflags -verbose"
but this doesn't work when invoking c compiler (which was my goal) so I ended up with
ocamlbuildflags ="-ocamlc 'ocamlc -verbose' -ocamlopt 'ocamlopt -verbose'"
I think the best way would be to define tag "verbose" in myocamlbuild.ml
Date: 2010-09-28 13:19
Sender: Sylvain Le Gall

I am not sure to understand. I tried:

$> OCAMLBUILDFLAGS=-verbose ocaml setup.ml -build

But it doesn't pass the -verbose option to ocamlc/ocamlopt.

Could you give me an example?

Attached Files:

Changes:

Field Old Value Date By
assigned_tonone2010-09-28 13:19gildor-admin