Skip to content

Commit 1785a09

Browse files
committed
Silence warning about "using serial compilation"
On Ubuntu, one sees warnings like this: ``` lto-wrapper: warning: using serial compilation of 13 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information lto-wrapper: warning: using serial compilation of 15 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information lto-wrapper: warning: using serial compilation of 16 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information lto-wrapper: warning: using serial compilation of 16 LTRANS jobs lto-wrapper: note: see the ‘-flto’ option documentation for more information ``` This seems to be the default behavior if the option `-flto` is not given a value (c.f. https://stackoverflow.com/a/72222512/28972686). Giving it a value of "auto" makes the warning go away and lets the compilation toolchain decide how much parallism it can use.
1 parent e2c35ec commit 1785a09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ CXX ?= g++
3636
NVCC ?= nvcc
3737
HIPCC ?= hipcc
3838

39-
CXXFLAGS ?= -O3 -std=c++17 -fopenmp
39+
CXXFLAGS ?= -O3 -std=c++17 -fopenmp -flto=auto
4040
NVCCFLAGS ?= -O3 --std c++17 -Wno-deprecated-gpu-targets
4141
HIPCCFLAGS ?= -O3
4242

0 commit comments

Comments
 (0)