Revert "Makefile: correct faligned-new test"

Summary:
This reverting #2699 to fix clang build.
Closes https://github.com/facebook/rocksdb/pull/2723

Differential Revision: D5610207

Pulled By: yiwu-arbug

fbshipit-source-id: 6857f4556d6d18f17b74cf81fa936d1dc0bd364c
main
yiwu-arbug 7 years ago committed by Facebook Github Bot
parent b87ee6f773
commit ad77ee0ea0
  1. 11
      Makefile

@ -259,11 +259,18 @@ default: all
WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
-Wno-unused-parameter
CCFALIGNED := $(shell $(CXX) --version | awk 'NR==1 { split($$3, ver, "."); if (($$1 == "clang" && ver[1] >= 4) || ($$2 == "(GCC)" && ver[1] >= 7)) { print "yes" } }')
CCVERSION = $(shell $(CXX) -dumpversion)
CCNAME = $(shell $(CXX) --version | awk 'NR==1' | cut -f1 -d " ")
ifeq ($(CCFALIGNED), yes)
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

Loading…
Cancel
Save