Skip to content

Commit

Permalink
Merge pull request #39923 from anothersimulacrum/make-fix
Browse files Browse the repository at this point in the history
Allow specifying clang version in makefile again
  • Loading branch information
ZhilkinSerg authored Apr 26, 2020
2 parents 4968f19 + abff42a commit dd07502
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ ifneq ($(findstring BSD,$(OS)),)
endif

# This sets CXX and so must be up here
ifeq ($(CLANG), 1)
ifdef CLANG
# Allow setting specific CLANG version
ifeq ($(CLANG), 1)
CLANGCMD = clang++
Expand All @@ -240,7 +240,7 @@ ifeq ($(CLANG), 1)
OTHERS += -stdlib=libc++
LDFLAGS += -stdlib=libc++
endif
ifdef CCACHE
ifeq ($(CCACHE), 1)
CXX = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD)
LD = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD)
else
Expand Down Expand Up @@ -306,7 +306,7 @@ ifeq ($(RELEASE), 1)
endif

ifeq ($(LTO), 1)
ifeq ($(CLANG), 1)
ifdef CLANG
# LLVM's LTO will complain if the optimization level isn't between O0 and
# O3 (inclusive)
OPTLEVEL = -O3
Expand All @@ -316,14 +316,14 @@ ifeq ($(RELEASE), 1)

ifeq ($(LTO), 1)
ifeq ($(NATIVE), osx)
ifeq ($(CLANG), 1)
ifdef CLANG
LTOFLAGS += -flto=full
endif
else
LDFLAGS += -fuse-ld=gold # This breaks in OS X because gold can only produce ELF binaries, not Mach
endif

ifeq ($(CLANG), 1)
ifdef CLANG
LTOFLAGS += -flto
else
LTOFLAGS += -flto=jobserver -flto-odr-type-merging
Expand Down Expand Up @@ -423,7 +423,7 @@ endif

# OSX
ifeq ($(NATIVE), osx)
ifeq ($(CLANG), 1)
ifdef CLANG
OSX_MIN = 10.7
else
OSX_MIN = 10.5
Expand Down

0 comments on commit dd07502

Please sign in to comment.