]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Merge remote-tracking branch 'upstream/master' into HEAD
[stockfish] / src / Makefile
index e3466ea1bb8791979a6430d27cd35f1b15c50315..d7e09c8c682b510872f613c10118b12118b2cea9 100644 (file)
@@ -1,7 +1,5 @@
 # Stockfish, a UCI chess playing engine derived from Glaurung 2.1
 # Stockfish, a UCI chess playing engine derived from Glaurung 2.1
-# Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
-# Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
-# Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+# Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
 #
 # Stockfish is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # Stockfish is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -369,9 +367,11 @@ ifeq ($(COMP),clang)
 
        ifneq ($(KERNEL),Darwin)
        ifneq ($(KERNEL),OpenBSD)
 
        ifneq ($(KERNEL),Darwin)
        ifneq ($(KERNEL),OpenBSD)
+       ifneq ($(KERNEL),FreeBSD)
                LDFLAGS += -latomic
        endif
        endif
                LDFLAGS += -latomic
        endif
        endif
+       endif
 
        ifeq ($(arch),$(filter $(arch),armv7 armv8))
                ifeq ($(OS),Android)
 
        ifeq ($(arch),$(filter $(arch),armv7 armv8))
                ifeq ($(OS),Android)
@@ -482,6 +482,10 @@ ifeq ($(optimize),yes)
                        CXXFLAGS += -mdynamic-no-pic
                endif
        endif
                        CXXFLAGS += -mdynamic-no-pic
                endif
        endif
+
+       ifeq ($(comp),clang)
+               CXXFLAGS += -fexperimental-new-pass-manager
+       endif
 endif
 
 ### 3.4 Bits
 endif
 
 ### 3.4 Bits
@@ -591,7 +595,7 @@ endif
 ifeq ($(optimize),yes)
 ifeq ($(debug), no)
        ifeq ($(comp),clang)
 ifeq ($(optimize),yes)
 ifeq ($(debug), no)
        ifeq ($(comp),clang)
-               CXXFLAGS += -flto=thin
+               CXXFLAGS += -flto
                ifneq ($(findstring MINGW,$(KERNEL)),)
                        CXXFLAGS += -fuse-ld=lld
                else ifneq ($(findstring MSYS,$(KERNEL)),)
                ifneq ($(findstring MINGW,$(KERNEL)),)
                        CXXFLAGS += -fuse-ld=lld
                else ifneq ($(findstring MSYS,$(KERNEL)),)
@@ -611,7 +615,7 @@ ifeq ($(debug), no)
                        LDFLAGS += -save-temps
                endif
        else
                        LDFLAGS += -save-temps
                endif
        else
-               CXXFLAGS += -flto=thin
+               CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS)
        endif
 
                LDFLAGS += $(CXXFLAGS)
        endif