提交 4f81ab38 编写于 作者: C Cholerae Hu 提交者: Facebook Github Bot

Makefile: fix for GCC 7+ and clang 4+

Summary:
maysamyabandeh IslamAbdelRahman PTAL

Fix https://github.com/facebook/rocksdb/issues/2672Signed-off-by: NCholerae Hu <huyingqian@pingcap.com>
Closes https://github.com/facebook/rocksdb/pull/2681

Differential Revision: D5561515

Pulled By: ajkr

fbshipit-source-id: 676187802ebd8a87a6c051bb565818a1bf89d0a9
上级 92afe830
......@@ -255,6 +255,19 @@ default: all
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
-Wno-unused-parameter
CCVERSION = $(shell $(CXX) -dumpversion)
CCNAME = $(shell $(CXX) --version | awk 'NR==1' | cut -f1 -d " ")
ifeq ($(CCNAME), clang)
ifeq ($(CCVERSION), 4*)
CXXFLAGS += -faligned-new
endif
else
ifeq ($(CCVERSION), 7)
CXXFLAGS += -faligned-new
endif
endif
ifndef DISABLE_WARNING_AS_ERROR
WARNING_FLAGS += -Werror
endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册