Since r322087, glibc's finite lib calls are generated when possible.
However, they are not supported on Android. This change also
disables other functions not available on Android.
Details
Diff Detail
Event Timeline
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
413 | Instead of going through this process repeatedly, could we just change this line to "if (!T.isOSLinux() || T.isAndroid())"? |
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
413 | 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. |
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
413 | 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. |
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
413 | I keep only the memalign function, which is available on Android. |
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
414 | Maybe instead of !T.isOSLinux() || T.isAndroid(), this should be !T.isOSLinux() || !T.isGNUEnvironment(), so it's clear this is the set of functions specifically available on glibc? | |
421 | If would probably be more clear to write this as "if (!T.isAndroid())". Or maybe move this out into its own if statement. |
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
414 | I tried to use !T.isGNUEnvironment() instead of T.isAndroid(). |
lib/Analysis/TargetLibraryInfo.cpp | ||
---|---|---|
414 | Oh, didn't think of that. Sure, let's limit to Android for now. |
Instead of going through this process repeatedly, could we just change this line to "if (!T.isOSLinux() || T.isAndroid())"?