Skip to content

Commit

Permalink
demonstrate lto bug with clang-18
Browse files Browse the repository at this point in the history
  • Loading branch information
stsp committed Mar 6, 2024
1 parent 91e12e0 commit 09aaf85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdir build
cd build
../configure
make -j 9
5 changes: 3 additions & 2 deletions fdpp/clang.mak
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ ifeq ($(USE_UBSAN),1)
DBGFLAGS += -fsanitize=undefined -fno-sanitize=alignment,function,vptr
endif

CXXFLAGS = $(TARGETOPT) $(CPPFLAGS) $(WFLAGS) $(DBGFLAGS) $(TARGETOPT_XTRA)
CXXFLAGS = $(TARGETOPT) $(CPPFLAGS) $(WFLAGS) $(DBGFLAGS) $(TARGETOPT_XTRA) \
-flto=auto -ffat-lto-objects
CFLAGS = -Wall $(DBGFLAGS)
CLCFLAGS = -c -fpic -Wall $(DBGFLAGS) -xc++
LDFLAGS = -shared -Wl,--build-id=sha1
LDFLAGS = -shared -Wl,--build-id=sha1 -flto=auto

ifeq ($(XFAT),32)
CPPFLAGS += -DWITHFAT32
Expand Down

0 comments on commit 09aaf85

Please sign in to comment.