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

Clarify how -c and -o are supposed to work. #7677

Closed
vicuna opened this issue Nov 22, 2017 · 6 comments
Closed

Clarify how -c and -o are supposed to work. #7677

vicuna opened this issue Nov 22, 2017 · 6 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Nov 22, 2017

Original bug ID: 7677
Reporter: @dbuenzli
Status: acknowledged (set by @xavierleroy on 2017-11-26T16:25:09Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.06.0
Target version: 4.07.0+dev/beta2/rc1/rc2
Category: documentation
Monitored by: @dbuenzli @yakobowski

Bug description

The release notes of 4.04.0 point to

da56cf6

as explaining that. However it seems that part of this work was invalidated by:

#761

and nowadays trying to use ocamlc -o DEST -c file.c results in the following error:

Options -c and -o are incompatible when compiling C files

It seems build systems using ocaml are doomed for life to need to move the produced file.o manually from the cwd to the desired destination directory.

@vicuna
Copy link
Author

vicuna commented Nov 26, 2017

Comment author: @xavierleroy

Yes, it's a mess. Let's try to at least agree on what behavior is intended. I'll restart the discussion at #761

@vicuna
Copy link
Author

vicuna commented Jan 16, 2018

Comment author: @damiendoligez

If I remember correctly, some C compilers do not support outputting files in a different directory. When given "-o outdir/outfile", they would create "outfile" in the current directory. Hence the restriction added by Fabrice.

@github-actions
Copy link

github-actions bot commented May 7, 2020

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.

@github-actions github-actions bot added the Stale label May 7, 2020
@dbuenzli
Copy link
Contributor

dbuenzli commented May 7, 2020

AFAIR this is still a mess and should be clarified.

@github-actions github-actions bot closed this as completed Jun 8, 2020
@nojb nojb reopened this Jun 8, 2020
@nojb nojb removed the Stale label Jun 8, 2020
@shindere shindere self-assigned this Aug 25, 2020
@shindere
Copy link
Contributor

I just checked and even cl knows how to put object files in a directory
different from the one containing the C source file.

I thus think this issue could and should be fixed and shall work on it.

@shindere
Copy link
Contributor

shindere commented Jan 6, 2021

It is my belief that the present issue has been fixed by #9960, which
has just been merged into trunk. Thus closing.

@shindere shindere closed this as completed Jan 6, 2021
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

4 participants