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

Pass -g to ocamlc compiling C files when tagged with "debug" #6720

Open
vicuna opened this issue Dec 17, 2014 · 8 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link

commented Dec 17, 2014

Original bug ID: 6720
Reporter: @whitequark
Status: acknowledged (set by @damiendoligez on 2017-03-01T13:32:54Z)
Resolution: reopened
Priority: normal
Severity: tweak
Category: compiler driver
Tags: patch
Monitored by: @whitequark

Bug description

E.g.:

flag ["c"; "compile"; "debug"] & A"-g";

File attachments

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 17, 2014

Comment author: @gasche

Implemented in trunk.

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 23, 2014

Comment author: @whitequark

This is actually not useful, because ocamlc -g does not pass -g through to the compiler.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 6, 2015

Comment author: @whitequark

Attached a patch which fixes this.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 24, 2015

Comment author: @gasche

Fixed in trunk.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 24, 2015

Comment author: @whitequark

I think this needs to be backported to 4.02, as 6641 and 6720 was also backported.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 24, 2015

Comment author: @gasche

I was uneasy about pushing this to the stable branch because it's not just a new feature but changes an existing behavior (that people may or may not rely). I just did it, though.

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 17, 2015

Comment author: @alainfrisch

The MSVC compiler doesn't recognize "-g". It doesn't fail on it, but simply report a warning:

cl : Command line warning D9002 : ignoring unknown option '-g'

I don't know if it is preferable to simply do nothing with MSVC ports, or rather to pass another debug-related option. I reopen the ticket so that we don't loose track of this.

(Note that -o also produces a warning:

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
)

@vicuna

This comment has been minimized.

Copy link
Author

commented Mar 1, 2017

Comment author: @damiendoligez

Note that this is not about ocamlbuild any more, but about the interaction between ocamlc/ocamlopt and the C compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.