mirror of
https://github.com/openai/codex.git
synced 2026-11-01 19:33:35 +00:00
25 lines
963 B
Diff
25 lines
963 B
Diff
# What: provide and link MinGW's ARM64 long-double `powl` compatibility shim.
|
|
# Why: Windows ARM64 uses 64-bit long doubles, but LLVM's Bazel source list
|
|
# omits the upstream `powl -> pow` implementation and its default link flags
|
|
# omit the MinGW extension archive that owns the shim.
|
|
|
|
diff --git a/runtimes/mingw/crt_sources.bzl b/runtimes/mingw/crt_sources.bzl
|
|
--- a/runtimes/mingw/crt_sources.bzl
|
|
+++ b/runtimes/mingw/crt_sources.bzl
|
|
@@ -420,4 +420,5 @@
|
|
MINGWEX_ARM64_SRCS = [
|
|
+ "math/arm-common/powl.c",
|
|
"math/sincos.c",
|
|
"math/sincosf.c",
|
|
"math/arm-common/sincosl.c",
|
|
diff --git a/toolchain/args/windows/BUILD.bazel b/toolchain/args/windows/BUILD.bazel
|
|
--- a/toolchain/args/windows/BUILD.bazel
|
|
+++ b/toolchain/args/windows/BUILD.bazel
|
|
@@ -50,5 +50,6 @@ cc_args(
|
|
# For now, we force on ucrt.
|
|
# TODO(cerisier): make this either a constraint or a build setting
|
|
+ "-lmingwex",
|
|
"-lucrt",
|
|
],
|
|
data = [
|