Skip to content

Commit 11c1ed5

Browse files
authored
Merge pull request #173 from hanxizh9910/fix-clang-lto-linker-mismatch
Use llvm-ar when building with clang LTO
2 parents 03c2d4c + 654c21a commit 11c1ed5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ OPTIMIZATION?=-O3
2424
ifeq ($(OPTIMIZATION),-O3)
2525
ifeq (clang,$(CLANG))
2626
OPTIMIZATION+=-flto
27+
# Use llvm-ar for LTO bitcode compatibility when archiving with clang.
28+
AR=llvm-ar
2729
else
2830
OPTIMIZATION+=-flto=auto -ffat-lto-objects
2931
endif

0 commit comments

Comments
 (0)