diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index 337423cfb96cb..56a3474692720 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -3471,6 +3471,14 @@ libc_math_function( ], ) +libc_math_function( + name = "hypotf16", + additional_deps = [ + ":__support_fputil_multiply_add", + ":__support_fputil_sqrt", + ], +) + libc_math_function(name = "ilogb") libc_math_function(name = "ilogbf") diff --git a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl index 41a706d2d92fb..a7acd6159afac 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl +++ b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl @@ -62,7 +62,8 @@ def libc_test( name = name, local_defines = local_defines + LIBC_CONFIGURE_OPTIONS, deps = deps, - copts = copts + libc_common_copts(), + # For complex floating point literals. + copts = copts + libc_common_copts() + ["-fext-numeric-literals"], linkstatic = 1, **kwargs ) diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel index d20922df1b8b5..7f119e3e9b637 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel @@ -286,6 +286,13 @@ math_mpfr_test( ], ) +math_mpfr_test( + name = "hypotf16", + hdrs = [ + "HypotTest.h", + ], +) + math_mpfr_test( name = "llrint", hdrs = ["RoundToIntegerTest.h"], diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel index 4df1c4508d764..6d9d1d6a33255 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel @@ -898,6 +898,11 @@ math_test( hdrs = ["HypotTest.h"], ) +math_test( + name = "hypotf16", + hdrs = ["HypotTest.h"], +) + math_test( name = "ilogb", hdrs = ["ILogbTest.h"],