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

Various fixes #179

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Various fixes #179

wants to merge 3 commits into from

Conversation

ptoscano
Copy link
Contributor

@ptoscano ptoscano commented Sep 7, 2018

Apologies for the single PR, I realized it too late, and a couple of commits would conflict if sent in two PRs...

This series fixes two issues I found so far:

  • broken C dependency discovery when using include files in other directories
  • proper dependencies on C sources for OCaml linking

In case the C sources rely on other files (usually headers) in other
directories, then "c-libpaths" is used when building the target.
OTOH, this will not help during the C dependency discovery, since the
compiler is invoked without those, and thus it will fail.

Hence, use the include paths for a target when running its C dependency
discovery.
Nodes for C sources are added to the DAGs of each target using them,
without creating any edge between these nodes and the targets.
The result is that an OCaml linking task does not wait for all the C
builds to finish, resulting in missing files halting the linking.

Hence, set the proper edge between the CompileC node and the LinkTarget
one, hopefully fixing the dependency.  This also means the hack of
waiting for the .o files is not needed anymore.
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.

1 participant