[PATCH] D42668: [Analysis] Disable calls to *_finite and other glibc-only functions on Android.

Chih-Hung Hsieh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 15:30:38 PST 2018


chh marked 3 inline comments as done.
chh added inline comments.


================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:413
   // The following functions are available on at least Linux:
   if (!T.isOSLinux()) {
     TLI.setUnavailable(LibFunc_dunder_strdup);
----------------
minseong.kim wrote:
> srhines wrote:
> > efriedma wrote:
> > > Instead of going through this process repeatedly, could we just change this line to "if (!T.isOSLinux() || T.isAndroid())"?
> > I agree that we should just be nuking all of the *_finite() functions, but many of these other functions are indeed available on Android, so we can't just change this single guard here.
> > 
> > Chih-hung, we should follow up with the bionic folks to ensure that these functions are available for all NDK platforms too. In cases like fseeko64/etc., where it only appears in API level 24, it also wouldn't be correct to lower to any of these libcalls for a target API level < 24.
> In terms of having the separate list of unsupported libcalls for Android, it looks reasonable to me as the two lists of libcalls might not be exactly the same now and in the future.
I keep only the memalign function, which is available on Android.



https://reviews.llvm.org/D42668





More information about the llvm-commits mailing list