Skip to content
Snippets Groups Projects
Commit c4dec1c5 authored by Daniel Dunbar's avatar Daniel Dunbar
Browse files

Makefiles: Set Clang CPP compiler flags in a single location, instead of...

Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
parent afed099b
No related branches found
No related tags found
No related merge requests found
Showing with 6 additions and 38 deletions
...@@ -32,6 +32,12 @@ LEVEL := $(CLANG_LEVEL)/../.. ...@@ -32,6 +32,12 @@ LEVEL := $(CLANG_LEVEL)/../..
# Include LLVM common makefile. # Include LLVM common makefile.
include $(LEVEL)/Makefile.common include $(LEVEL)/Makefile.common
# Set common Clang build flags.
CPP.Flags += -I$(PROJ_SRC_DIR)/$(CLANG_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include
ifdef CLANG_VENDOR
CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
endif
### ###
# Clang Top Level specific stuff. # Clang Top Level specific stuff.
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
CLANG_LEVEL := ../.. CLANG_LEVEL := ../..
LIBRARYNAME = PrintFunctionNames LIBRARYNAME = PrintFunctionNames
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
# Include this here so we can get the configuration of the targets that have # Include this here so we can get the configuration of the targets that have
# been configured for construction. We have to do this early so we can set up # been configured for construction. We have to do this early so we can set up
# LINK_COMPONENTS before including Makefile.rules # LINK_COMPONENTS before including Makefile.rules
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
CLANG_LEVEL := ../.. CLANG_LEVEL := ../..
TOOLNAME = clang-interpreter TOOLNAME = clang-interpreter
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
NO_INSTALL = 1 NO_INSTALL = 1
# No plugins, optimize startup time. # No plugins, optimize startup time.
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
CLANG_LEVEL := ../.. CLANG_LEVEL := ../..
TOOLNAME = clang-wpa TOOLNAME = clang-wpa
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
NO_INSTALL = 1 NO_INSTALL = 1
# No plugins, optimize startup time. # No plugins, optimize startup time.
......
...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../.. ...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangAST LIBRARYNAME := clangAST
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../.. ...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangAnalysis LIBRARYNAME := clangAnalysis
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -15,11 +15,6 @@ CLANG_LEVEL := ../.. ...@@ -15,11 +15,6 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangBasic LIBRARYNAME := clangBasic
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
ifdef CLANG_VENDOR
CPPFLAGS += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
endif
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
SVN_REVISION := $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..) SVN_REVISION := $(shell $(LLVM_SRC_ROOT)/utils/GetSourceVersion $(PROJ_SRC_DIR)/../..)
......
...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../.. ...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangChecker LIBRARYNAME := clangChecker
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -16,10 +16,5 @@ CLANG_LEVEL := ../.. ...@@ -16,10 +16,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangCodeGen LIBRARYNAME := clangCodeGen
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
ifdef CLANG_VENDOR
CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "'
endif
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -11,6 +11,4 @@ CLANG_LEVEL := ../.. ...@@ -11,6 +11,4 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangDriver LIBRARYNAME := clangDriver
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -11,7 +11,5 @@ CLANG_LEVEL := ../.. ...@@ -11,7 +11,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangFrontend LIBRARYNAME := clangFrontend
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -21,7 +21,5 @@ ifeq ($(ARCH),PowerPC) ...@@ -21,7 +21,5 @@ ifeq ($(ARCH),PowerPC)
CXX.Flags += -maltivec CXX.Flags += -maltivec
endif endif
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -21,7 +21,5 @@ ifeq ($(ARCH),PowerPC) ...@@ -21,7 +21,5 @@ ifeq ($(ARCH),PowerPC)
CXX.Flags += -maltivec CXX.Flags += -maltivec
endif endif
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../.. ...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangParse LIBRARYNAME := clangParse
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../.. ...@@ -15,7 +15,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangRewrite LIBRARYNAME := clangRewrite
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -16,7 +16,5 @@ CLANG_LEVEL := ../.. ...@@ -16,7 +16,5 @@ CLANG_LEVEL := ../..
LIBRARYNAME := clangSema LIBRARYNAME := clangSema
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
include $(CLANG_LEVEL)/Makefile include $(CLANG_LEVEL)/Makefile
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
CLANG_LEVEL := ../.. CLANG_LEVEL := ../..
TOOLNAME = c-index-test TOOLNAME = c-index-test
CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
# No plugins, optimize startup time. # No plugins, optimize startup time.
TOOL_NO_EXPORTS = 1 TOOL_NO_EXPORTS = 1
......
...@@ -16,7 +16,6 @@ else ...@@ -16,7 +16,6 @@ else
TOOLALIAS = clang++ TOOLALIAS = clang++
endif endif
endif endif
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
# Clang tool has no plugins, optimize startup time. # Clang tool has no plugins, optimize startup time.
TOOL_NO_EXPORTS = 1 TOOL_NO_EXPORTS = 1
......
...@@ -12,8 +12,6 @@ LIBRARYNAME = clang ...@@ -12,8 +12,6 @@ LIBRARYNAME = clang
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libclang.exports
CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
# Include this here so we can get the configuration of the targets # Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this # that have been configured for construction. We have to do this
# early so we can set up LINK_COMPONENTS before including Makefile.rules # early so we can set up LINK_COMPONENTS before including Makefile.rules
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment