PKGNAME=codex
PKGSEC=utils
PKGDES="Coding agent that runs in terminal"
PKGDEP="bzip2 gcc-runtime git glibc libcap openssl ripgrep xz zlib"
BUILDDEP="rustc llvm gn ninja python-3"

ABTYPE=rust
USECLANG=1
CARGO_AFTER=(
    '--bin' 'codex'
    '--bin' 'codex-responses-api-proxy'
)

# FIXME: error: undefined symbol: aws_lc_0_39_0_SHA256
NOLTO=1

# loongson3:
# ERROR at //build/config/rust.gni:363:3: Assertion failed.
# assert(_is_rust_abi_target_a_known_triple,
# ^-----
# `mips64el-unknown-linux-gnu` needs to be added to `////build/rust/known-target-triples.txt`
# See //build/config/sanitizers/BUILD.gn:8:1: whence it was imported.
# import("//build/config/rust.gni")
# ^-------------------------------
# See //build/config/BUILDCONFIG.gn:369:3: which caused the file to be included.
# "//build/config/sanitizers:default_sanitizer_flags",
# ^-------------------------------------------------- 
FAIL_ARCH="loongson3"
