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

Allow creation of empty .cmxa files on macOS (PR#6550) #1094

Merged
merged 1 commit into from Mar 13, 2017

Conversation

Projects
None yet
3 participants
@mshinwell
Contributor

mshinwell commented Mar 10, 2017

In the event that a user attempts to create an empty .cmxa file on macOS, the "ar" utility fails with an error, complaining about trying to create an empty .a file. Fixing this is useful since it provides consistent cross-platform behaviour and less opportunity for special cases in users' build systems (for example if the presence of archive members is conditional).

I tried to make this atomic by creating a temporary file first, but lo and behold, the "ar" utility has an error for that too: you can't run "ar rc" if the file already exists and isn't a valid archive as far as I can tell. So this isn't atomic, but it's not really any worse than the existing two-step ar/ranlib process.

@mshinwell mshinwell added the bug label Mar 10, 2017

@damiendoligez

This comment has been minimized.

Show comment
Hide comment
@damiendoligez

damiendoligez Mar 13, 2017

Member

Looks good. I'll merge and cherry-pick to 4.05.

Member

damiendoligez commented Mar 13, 2017

Looks good. I'll merge and cherry-pick to 4.05.

@damiendoligez damiendoligez merged commit ad72a67 into ocaml:trunk Mar 13, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment