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
Comments
Comment author: @gasche Implemented in trunk. |
Comment author: @whitequark This is actually not useful, because ocamlc -g does not pass -g through to the compiler. |
Comment author: @whitequark Attached a patch which fixes this. |
Comment author: @gasche Fixed in trunk. |
Comment author: @whitequark I think this needs to be backported to 4.02, as 6641 and 6720 was also backported. |
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. |
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 |
Comment author: @damiendoligez Note that this is not about ocamlbuild any more, but about the interaction between ocamlc/ocamlopt and the C compiler. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
The current situation is that Line 113 in 37c5bd8
If someone cares about passing the right options to MSVC, go ahead and submit a pull request, it's a 1-line change. Meanwhile, I'll close this issue as pretty well addressed already. |
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.:
File attachments
The text was updated successfully, but these errors were encountered: