Fix compile lto-wrapper warning for aarch64 (#11926)

Use -flto=auto to use GNU make's job server, if available, or otherwise fall
back to autodetection of the number of CPU threads present in your system.

  Warnings:

  lto-wrapper: warning: using serial compilation of 2 LTRANS jobs
  lto-wrapper: note: see the ‘-flto’ option documentation for more information
  lto-wrapper: warning: using serial compilation of 4 LTRANS jobs
  lto-wrapper: note: see the ‘-flto’ option documentation for more information
  lto-wrapper: warning: using serial compilation of 31 LTRANS jobs
  lto-wrapper: note: see the ‘-flto’ option documentation for more information

Signed-off-by: Rong Tao <rongtao@cestc.cn>
This commit is contained in:
Rong Tao 2023-03-18 00:23:06 +08:00 committed by GitHub
parent 2dd5c3a180
commit d691098349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
OPTIMIZATION?=-O3
ifeq ($(OPTIMIZATION),-O3)
REDIS_CFLAGS+=-flto
REDIS_CFLAGS+=-flto=auto
REDIS_LDFLAGS+=-flto
endif
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv