Skip to content

Commit f7e8436

Browse files
zaniebindygreg
authored andcommitted
pythongh-128437: Add BOLT_COMMON_FLAGS with -update-debug-sections (pythongh-128455)
Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
1 parent b9bd610 commit f7e8436

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

configure

+16-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+16-2
Original file line numberDiff line numberDiff line change
@@ -2160,14 +2160,28 @@ AS_VAR_IF([enable_shared], [yes], [
21602160
BOLT_BINARIES="${BOLT_BINARIES} \$(INSTSONAME)"
21612161
])
21622162

2163+
AC_ARG_VAR(
2164+
[BOLT_COMMON_FLAGS],
2165+
[Common arguments to llvm-bolt when instrumenting and applying]
2166+
)
2167+
2168+
AC_MSG_CHECKING([BOLT_COMMON_FLAGS])
2169+
if test -z "${BOLT_COMMON_FLAGS}"
2170+
then
2171+
AS_VAR_SET(
2172+
[BOLT_COMMON_FLAGS],
2173+
[-update-debug-sections]
2174+
)
2175+
fi
2176+
21632177
AC_ARG_VAR(
21642178
[BOLT_INSTRUMENT_FLAGS],
21652179
[Arguments to llvm-bolt when instrumenting binaries]
21662180
)
21672181
AC_MSG_CHECKING([BOLT_INSTRUMENT_FLAGS])
21682182
if test -z "${BOLT_INSTRUMENT_FLAGS}"
21692183
then
2170-
BOLT_INSTRUMENT_FLAGS=
2184+
BOLT_INSTRUMENT_FLAGS="${BOLT_COMMON_FLAGS}"
21712185
fi
21722186
AC_MSG_RESULT([$BOLT_INSTRUMENT_FLAGS])
21732187

@@ -2181,7 +2195,7 @@ then
21812195
AS_VAR_SET(
21822196
[BOLT_APPLY_FLAGS],
21832197
[m4_normalize("
2184-
-update-debug-sections
2198+
${BOLT_COMMON_FLAGS}
21852199
-reorder-blocks=ext-tsp
21862200
-reorder-functions=cdsort
21872201
-split-functions

0 commit comments

Comments
 (0)