mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
Disable Zig UBSan and fence musl pkg-config lookup
This commit is contained in:
13
.github/scripts/install-musl-build-tools.sh
vendored
13
.github/scripts/install-musl-build-tools.sh
vendored
@@ -150,7 +150,9 @@ for arg in "\$@"; do
|
||||
args+=("\${arg}")
|
||||
done
|
||||
|
||||
exec "${zig_bin}" cc -target "${zig_target}" "\${args[@]}"
|
||||
# Zig enables UBSan for debug C builds by default. Rust links these objects
|
||||
# without Zig's sanitizer runtime, so keep native dependencies uninstrumented.
|
||||
exec "${zig_bin}" cc -target "${zig_target}" -fno-sanitize=undefined "\${args[@]}"
|
||||
EOF
|
||||
cat >"${cxx}" <<EOF
|
||||
#!/usr/bin/env bash
|
||||
@@ -207,7 +209,9 @@ for arg in "\$@"; do
|
||||
args+=("\${arg}")
|
||||
done
|
||||
|
||||
exec "${zig_bin}" c++ -target "${zig_target}" "\${args[@]}"
|
||||
# Zig enables UBSan for debug C++ builds by default. Rust links these objects
|
||||
# without Zig's sanitizer runtime, so keep native dependencies uninstrumented.
|
||||
exec "${zig_bin}" c++ -target "${zig_target}" -fno-sanitize=undefined "\${args[@]}"
|
||||
EOF
|
||||
chmod +x "${cc}" "${cxx}"
|
||||
|
||||
@@ -270,6 +274,11 @@ echo "PKG_CONFIG_PATH=${pkg_config_path}" >> "$GITHUB_ENV"
|
||||
pkg_config_path_var="PKG_CONFIG_PATH_${TARGET}"
|
||||
pkg_config_path_var="${pkg_config_path_var//-/_}"
|
||||
echo "${pkg_config_path_var}=${libcap_pkgconfig_dir}" >> "$GITHUB_ENV"
|
||||
pkg_config_libdir_var="PKG_CONFIG_LIBDIR_${TARGET}"
|
||||
pkg_config_libdir_var="${pkg_config_libdir_var//-/_}"
|
||||
# Do not let musl cross-builds resolve native libraries from the host glibc
|
||||
# pkg-config directories. libcap is the only target package provided here.
|
||||
echo "${pkg_config_libdir_var}=${libcap_pkgconfig_dir}" >> "$GITHUB_ENV"
|
||||
|
||||
if [[ -n "${sysroot}" && "${sysroot}" != "/" ]]; then
|
||||
echo "PKG_CONFIG_SYSROOT_DIR=${sysroot}" >> "$GITHUB_ENV"
|
||||
|
||||
Reference in New Issue
Block a user