Page MenuHomePhabricator

Fix cmake check for futimens when deploying to earlier macOS releases.
ClosedPublic

Authored by ributzka on Aug 22 2017, 2:36 PM.

Details

Summary

macOS 10.13 added a new API (futimens). This API is only available on macOS 10.13 and later, but the cmake check we have in place only tests if the symbol is present and ignores the availability attribute. Luckily we have new warning for this and by making this warning an error the cmake check will return the correct result.

See also rdar://problem/33992750.

I had to include HandleLLVMOptions.cmake into config-ix.cmake to make this work. I am not sure if this is the correct approach. I think we should do this anyways, because we should run all the checks with the same options that we use to actually compile LLVM.

Is there a reason why we are not doing this already?

In the initial patch I am making the warning an error for all platforms. Should I make this change Darwin specific?

Diff Detail

Repository
rL LLVM

Event Timeline

ributzka created this revision.Aug 22 2017, 2:36 PM

gentle ping :-)

beanz edited edge metadata.Aug 28 2017, 3:09 PM

LGTM.

beanz accepted this revision.Aug 28 2017, 3:09 PM
This revision is now accepted and ready to land.Aug 28 2017, 3:09 PM
This revision was automatically updated to reflect the committed changes.

Thanks Chris.

Committed as r311949.