diff --git a/src/Makefile b/src/Makefile index 8572369b1..4fe40955b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -539,7 +539,10 @@ ifeq ($(optimize),yes) endif ifeq ($(comp),clang) - CXXFLAGS += -fexperimental-new-pass-manager + clangmajorversion = $(shell $(CXX) -dumpversion 2>/dev/null | cut -f1 -d.) + ifeq ($(shell expr $(clangmajorversion) \< 16),1) + CXXFLAGS += -fexperimental-new-pass-manager + endif endif endif