Skip to content

Commit

Permalink
Revert "Makefile: correct faligned-new test"
Browse files Browse the repository at this point in the history
Summary:
This reverting facebook#2699 to fix clang build.
Closes facebook#2723

Differential Revision: D5610207

Pulled By: yiwu-arbug

fbshipit-source-id: 6857f4556d6d18f17b74cf81fa936d1dc0bd364c
  • Loading branch information
yiwu-arbug authored and facebook-github-bot committed Aug 11, 2017
1 parent b87ee6f commit ad77ee0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad77ee0

Please sign in to comment.