Skip to content

Commit

Permalink
Fix LTO warning by enabling parallel compilation
Browse files Browse the repository at this point in the history
The previous use of -flto caused a warning:
"lto-wrapper: warning: using serial compilation of 2 LTRANS jobs"

To resolve this and enable parallel compilation, -flto=auto is now used
This option leverages GNU make's job server when available and falls
back to autodetection of CPU threads.
  • Loading branch information
eleanorLYJ committed Dec 21, 2024
1 parent 6647215 commit e005458
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CFLAGS += -flto
endif
endif
ifeq ("$(CC_IS_GCC)", "1")
CFLAGS += -flto
CFLAGS += -flto=auto
endif
ifeq ("$(CC_IS_CLANG)", "1")
CFLAGS += -flto=thin -fsplit-lto-unit
Expand Down

0 comments on commit e005458

Please sign in to comment.