for LTO, you must switch the linker to use ld.lld.  When provided as relative name, clang adds ld. prefix.  An absolute name to the AOCC linker can be used to get AOCC optimizations
@@ -4,8 +4,10 @@ TESTNAME = lto_teams
TESTSRC_MAIN = lto_teams.c
TESTSRC_AUX =
TESTSRC_ALL = $(TESTSRC_MAIN) $(TESTSRC_AUX)
+# ALT_LINKER = <PATH to AOCC ld.lld>
+ALT_LINKER = lld
-CFLAGS = -O3 -flto=thin
+CFLAGS = -O3 -flto=thin -fuse-ld=$(ALT_LINKER)
CLANG = clang
OMP_BIN = $(AOMP)/bin/$(CLANG)
CC = $(OMP_BIN) $(VERBOSE)
