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

Don't recompile C files unless needed #2601

Merged
merged 1 commit into from May 21, 2015

Conversation

Projects
None yet
3 participants
@lukexi
Copy link
Collaborator

lukexi commented May 21, 2015

A small patch to make sure we don't recompile C code from c-sources: unless needed.

This has been pretty life-saving when working on projects with tons of c-sources — I've been using it for a few months on my main Cabal without issue.

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented May 21, 2015

Can you please also add a short note to the changelog?

unless forRepl $
whenSharedLib forceSharedLib (runGhcProg sharedCcOpts)
unless forRepl $ whenProfLib (runGhcProg profCcOpts)
let oname = odir </> dropExtension filename <.> fromFlagOrDefault "o" (ghcOptObjSuffix vanillaCcOpts)

This comment has been minimized.

@23Skidoo

23Skidoo May 21, 2015

Member

This looks like it should be made a helper function. Also not sure if <.> is available in all versions of filepath that we support.

This comment has been minimized.

@dcoutts

dcoutts May 21, 2015

Member

Pretty sure <.> has been there since the beginning.

This comment has been minimized.

@23Skidoo

23Skidoo May 21, 2015

Member

You're right, I was thinking about -<.>, which was added recently.

This comment has been minimized.

@23Skidoo

23Skidoo May 21, 2015

Member

BTW, replaceExtension also was there from the beginning, so you could use that.

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented May 21, 2015

LGTM in general modulo some comments.

@lukexi lukexi force-pushed the lukexi:master branch 2 times, most recently from 5f0729d to 4ac3274 May 21, 2015

@lukexi lukexi force-pushed the lukexi:master branch from 4ac3274 to bec1f5a May 21, 2015

@lukexi

This comment has been minimized.

Copy link
Collaborator

lukexi commented May 21, 2015

Thanks for the comments — here's a new cut

23Skidoo added a commit that referenced this pull request May 21, 2015

Merge pull request #2601 from lukexi/master
Don't recompile C files unless needed

@23Skidoo 23Skidoo merged commit dd086a0 into haskell:master May 21, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented May 21, 2015

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment