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 uses wrong compiler for C files #4421

Closed
vicuna opened this issue Oct 15, 2007 · 0 comments
Closed

ocamlbuild uses wrong compiler for C files #4421

vicuna opened this issue Oct 15, 2007 · 0 comments

Comments

@vicuna
Copy link

vicuna commented Oct 15, 2007

Original bug ID: 4421
Reporter: jessicah
Assigned to: ertai
Status: closed (set by @xavierleroy on 2011-05-29T10:20:01Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.10.0
Fixed in version: 3.11.2+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Related to: #4613

Bug description

When trying to compile C files as part of an ocaml native project, ocamlbuild always uses ocamlc.opt to compile the C files, which is incorrect. The compiler options passed by ocamlopt.opt and ocamlc.opt are different for compiling C files, and this difference ended up causing a lot of problems trying to track down where the errors were coming from trying to link my project.

Even specifying in my _tags file:

true: native, -byte
false: byte

it still refused to build C files with ocamlopt.opt. In the end, I had to override the compiler with -cc, and pass the options to the C compiler ocamlopt would normally pass to gcc with -ccopt.

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