mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
build: Check and set perf --log-fd option
Linux perf tool version 3.2 introduced a new option "--log-fd" defaults to 0, which leads to error "Failed opening logfd: Illegal argument" when executing perf tests. Set logfd to stderr to let perf test work. Issue #1538
This commit is contained in:
parent
293678847b
commit
ef0775fec8
10
configure
vendored
10
configure
vendored
@ -363,6 +363,16 @@ then
|
||||
err "either clang or gcc is required"
|
||||
fi
|
||||
|
||||
if [ ! -z "$CFG_PERF" ]
|
||||
then
|
||||
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
|
||||
if [ -z "$HAVE_PERF_LOGFD" ];
|
||||
then
|
||||
CFG_PERF_WITH_LOGFD=1
|
||||
putvar CFG_PERF_WITH_LOGFD
|
||||
fi
|
||||
fi
|
||||
|
||||
step_msg "making directories"
|
||||
|
||||
for i in \
|
||||
|
@ -58,7 +58,11 @@ ifneq ($(findstring linux,$(CFG_OSTYPE)),)
|
||||
CFG_LDENV := LD_LIBRARY_PATH
|
||||
CFG_DEF_SUFFIX := .linux.def
|
||||
ifdef CFG_PERF
|
||||
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
|
||||
ifneq ($(CFG_PERF_WITH_LOGFD),)
|
||||
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3 --log-fd 2
|
||||
else
|
||||
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3
|
||||
endif
|
||||
else
|
||||
ifdef CFG_VALGRIND
|
||||
CFG_PERF_TOOL :=\
|
||||
|
Loading…
Reference in New Issue
Block a user