Skip to content

Commit

Permalink
[3.13] gh-128437: Add BOLT_COMMON_FLAGS with `-update-debug-section…
Browse files Browse the repository at this point in the history
…s` (gh-128455) (gh-128512)

gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)

Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`

(cherry picked from commit b60044b)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
  • Loading branch information
3 people authored Jan 5, 2025
1 parent b2bacbb commit 40fd466
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
18 changes: 16 additions & 2 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2214,14 +2214,28 @@ AS_VAR_IF([enable_shared], [yes], [
BOLT_BINARIES="${BOLT_BINARIES} \$(INSTSONAME)"
])

AC_ARG_VAR(
[BOLT_COMMON_FLAGS],
[Common arguments to llvm-bolt when instrumenting and applying]
)

AC_MSG_CHECKING([BOLT_COMMON_FLAGS])
if test -z "${BOLT_COMMON_FLAGS}"
then
AS_VAR_SET(
[BOLT_COMMON_FLAGS],
[-update-debug-sections]
)
fi

AC_ARG_VAR(
[BOLT_INSTRUMENT_FLAGS],
[Arguments to llvm-bolt when instrumenting binaries]
)
AC_MSG_CHECKING([BOLT_INSTRUMENT_FLAGS])
if test -z "${BOLT_INSTRUMENT_FLAGS}"
then
BOLT_INSTRUMENT_FLAGS=
BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
fi
AC_MSG_RESULT([$BOLT_INSTRUMENT_FLAGS])

Expand All @@ -2235,7 +2249,7 @@ then
AS_VAR_SET(
[BOLT_APPLY_FLAGS],
[m4_normalize("
-update-debug-sections
${BOLT_COMMON_FLAGS}
-reorder-blocks=ext-tsp
-reorder-functions=cdsort
-split-functions
Expand Down

0 comments on commit 40fd466

Please sign in to comment.