Page MenuHomePhabricator

Remove log2 dependency when building against Android API-9 SDK
ClosedPublic

Authored by pasaulais on May 20 2015, 10:15 AM.

Details

Summary

Android's API-9 SDK is missing log2 builtins. A previous commit added support for building against this API revision but this requires log2l to be present. This patch removes the dependency on log2l when HAVE_LOG2 is zero.

Diff Detail

Repository
rL LLVM

Event Timeline

pasaulais updated this revision to Diff 26157.May 20 2015, 10:15 AM
pasaulais retitled this revision from to Remove log2 dependency when building against Android API-9 SDK.
pasaulais updated this object.
pasaulais edited the test plan for this revision. (Show Details)
pasaulais set the repository for this revision to rL LLVM.
pasaulais added a subscriber: Unknown Object (MLST).May 20 2015, 10:17 AM

Forgot to add suscribers.

chandlerc requested changes to this revision.May 20 2015, 7:51 PM
chandlerc edited edge metadata.

This commit doesn't really make sense to me as at no point does it define HAVE_LOG2....

This revision now requires changes to proceed.May 20 2015, 7:51 PM
This comment was removed by pasaulais.
pasaulais updated this revision to Diff 26211.May 21 2015, 3:19 AM
pasaulais edited edge metadata.

That's true, this commit would require manually setting HAVE_LOG2 to zero on Android. Since HAVE_LOG2 and other macros have been dropped (r231679) I was trying not to pull the autoconf/CMake changes back. I see two solutions:

  1. Use 'log(n) / log(2)' instead of log2l on Android, don't use HAVE_LOG2 at all.
  2. Reintroduce HAVE_LOG2 through CMake and autoconf. Remove the Android-specific changes added by Vince.

I am uploading a new patch that does 1) since that's the least intrusive change.

chandlerc accepted this revision.May 21 2015, 7:16 PM
chandlerc edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.May 21 2015, 7:16 PM

Thanks, Chandler. I don't have commit rights, could you commit it for me?

This revision was automatically updated to reflect the committed changes.
vharron edited edge metadata.May 24 2015, 6:30 AM

I needed this patch so I was able to verify and submit. Thanks Pierre-Andre!

Thanks for committing the patch, Vince!