Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocamlbuild doesn't pass cflags to ocaml compilers when building C stubs #5655

Closed
vicuna opened this issue Jun 19, 2012 · 3 comments
Closed

Comments

@vicuna
Copy link

vicuna commented Jun 19, 2012

Original bug ID: 5655
Reporter: @ygrek
Assigned to: @xclerc
Status: closed (set by @xavierleroy on 2015-12-11T18:07:09Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.1
Target version: 4.00.0+dev
Fixed in version: 4.00.0+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: mehdi @hcarty

Bug description

This can be useful for example to pass -verbose flag to see how C compiler is called.

Steps to reproduce

STR:
$ touch src_c.c src.ml
$ echo src_c.o > libsrc_stubs.clib
$ ocamlbuild -classic-display -clean && ocamlbuild -classic-display -cflags -verbose libsrc_stubs.a src.cmx
/usr/bin/ocamlc.opt -c src_c.c
/usr/bin/ocamlmklib -o src_stubs src_c.o
/usr/bin/ocamldep.opt -modules src.ml > src.ml.depends
/usr/bin/ocamlc.opt -c -verbose -o src.cmo src.ml
/usr/bin/ocamlopt.opt -c -verbose -o src.cmx src.ml

  • /usr/bin/ocamlopt.opt -c -verbose -o src.cmx src.ml
  • as -o 'src.o' '/tmp/camlasm5bc13e.s'

ACR:
-verbose is passed only when compiling ml source, but not C source

EXR:
-verbose passed to all invocations of 'ocamlc -c'. NB help says: " -cflag Add to ocamlc compile flags"

@vicuna
Copy link
Author

vicuna commented Jul 9, 2012

Comment author: @xclerc

Fixed in trunk (revision 12670) and 4.00 (revision 12671) branches.

@vicuna
Copy link
Author

vicuna commented Jul 9, 2012

Comment author: mehdi

I might have missed some bit (I didn't check the source, tbh) but isn't the same fix needed for -lflags?

@vicuna
Copy link
Author

vicuna commented Jul 9, 2012

Comment author: @xclerc

You are right, it cannot hurt (revisions 12675 for trunk, and 12676 for 4.00).

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added this to the 4.00.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant