Skip to content

Commit 7f212a3

Browse files
committed
fixup! [libc][math] Optimize nearest integer functions using builtins when available
Fix builtin detection on Android due to missing _start being an error with LLD from Android NDK r26d.
1 parent 8970edf commit 7f212a3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libc/cmake/modules/compiler_features/check_builtin_ceil_floor_rint_trunc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ double try_builtin_floor(double x) { return __builtin_floor(x); }
88
double try_builtin_rint(double x) { return __builtin_rint(x); }
99
double try_builtin_trunc(double x) { return __builtin_trunc(x); }
1010

11-
int main() {}
11+
extern "C" void _start() {}

libc/cmake/modules/compiler_features/check_builtin_round.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ float try_builtin_roundf(float x) { return __builtin_roundf(x); }
22

33
double try_builtin_round(double x) { return __builtin_round(x); }
44

5-
int main() {}
5+
extern "C" void _start() {}

libc/cmake/modules/compiler_features/check_builtin_roundeven.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ float try_builtin_roundevenf(float x) { return __builtin_roundevenf(x); }
22

33
double try_builtin_roundeven(double x) { return __builtin_roundeven(x); }
44

5-
int main() {}
5+
extern "C" void _start() {}

0 commit comments

Comments
 (0)