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

output-complete-obj: link runtime C libraries when building shared libraries #1664

Merged
merged 1 commit into from
Feb 17, 2020

Conversation

Octachron
Copy link
Member

Thus PR is an offspring of #1351 : currently, when building a shared library with -output-obj or -output-complete-obj:

ocamlopt -output-obj a.ml -o a.so 

the only difference between -output-obj and output-complete-obj is that -output-complete-obj does not link the C libraries used by the runtime by default. The fact that the complete variant links less objects than the simple variant is not intuitive at all — as illustrated by the discussion in #1351 .

Moreover, @whitequark confirmed that this behavior was not really intended and was inherited from the static linking mode.

Consequently, this small PR proposes to align the behavior of -output-complete-obj to the behavior of output-obj and link these runtime C libraries in the shared library mode.

@xavierleroy
Copy link
Contributor

18 months later, is this PR still relevant? @Octachron, you're in control, do what it takes.

@gasche
Copy link
Member

gasche commented Nov 7, 2019

It looks to me like this PR is still relevant and has not been invalidated by recent developments around -custom, etc., but we need a review from someone that knows about this stuff.

(cc @nojb ?)

@nojb
Copy link
Contributor

nojb commented Nov 7, 2019

I had taken a look at this some time back and it seemed OK. I will do a formal review shortly.

Copy link
Contributor

@nojb nojb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! Please rebase it so that it can be merged.

This commit align the behavior of output-complete-obj and output-obj
when building shared libraries
@Octachron
Copy link
Member Author

I somehow completely missed this ping, sorry! I updated the Change entry and will merge (once the CI is green).

@Octachron Octachron merged commit 8be6e2e into ocaml:trunk Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants