Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ AC_SUBST(VGCONF_PLATFORM_ARM_ARCH)
# but only one gets installed. So if you use an in-place build, both can be
# used. --njn]

# CodSpeed: 64-bit only by default. See m4/codspeed_capstone.m4.
CODSPEED_ONLY64BIT_DEFAULT

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Default lacks CI coverage Both CI builds pass --enable-only64bit, so neither tests what happens when ./configure receives no architecture flag. If the new default stops selecting a single platform, CI could pass while a plain build fails when the secondary Callgrind target compiles without Capstone. Please add a test that configures without either architecture flag and checks that no secondary platform is selected.

Prompt To Fix With AI
This is a comment left during a code review.
Path: configure.ac
Line: 336

Comment:
**Default lacks CI coverage** Both CI builds pass `--enable-only64bit`, so neither tests what happens when `./configure` receives no architecture flag. If the new default stops selecting a single platform, CI could pass while a plain build fails when the secondary Callgrind target compiles without Capstone. Please add a test that configures without either architecture flag and checks that no secondary platform is selected.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex


# Check if a 64-bit only build has been requested
AC_CACHE_CHECK([for a 64-bit only build], vg_cv_only64bit,
[AC_ARG_ENABLE(only64bit,
Expand Down
20 changes: 20 additions & 0 deletions m4/codspeed_capstone.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
# third_party/capstone submodule is compiled by third_party/Makefile.am;
# --with-capstone=PATH (or CAPSTONE_DIR) selects a prebuilt install instead.
AC_DEFUN([CODSPEED_CAPSTONE], [
# Capstone is compiled for the primary platform only, and cycledecode.c does not
# build without it, so a secondary (bi-arch) Callgrind cannot be built.
if test -n "$VGCONF_PLATFORM_SEC_CAPS"; then
AC_MSG_ERROR([Callgrind cycle estimation needs Capstone, which is only built
for the primary platform ($VGCONF_PLATFORM_PRI_CAPS), not for the secondary one
($VGCONF_PLATFORM_SEC_CAPS). Configure with --enable-only64bit or --enable-only32bit.])
fi

AC_ARG_WITH([capstone],
[AS_HELP_STRING([--with-capstone=PATH],
[use a prebuilt Capstone install for Callgrind cycle estimation instead
Expand Down Expand Up @@ -49,6 +57,18 @@ AC_SUBST([CAPSTONE_CFLAGS])
AC_SUBST([CAPSTONE_LIBS])
])

# CODSPEED_ONLY64BIT_DEFAULT
# --------------------------
# Default to --enable-only64bit unless --enable-only64bit or --enable-only32bit
# was given either way: see the secondary platform check in CODSPEED_CAPSTONE.
#
# Must be called before Valgrind's AC_ARG_ENABLE(only64bit).
AC_DEFUN([CODSPEED_ONLY64BIT_DEFAULT], [
if test -z "${enable_only64bit+set}" -a -z "${enable_only32bit+set}"; then
enable_only64bit=yes
fi
])

# CODSPEED_C_STD_GNU17
# --------------------
# Export CODSPEED_C_STD, the dialect the Callgrind tool is compiled with. Under
Expand Down
Loading