blob: c43a525d09bfabd64fcc17a855cda42fbf97de8b [file] [log] [blame]
Josh Gao8feba832016-08-02 15:50:05 -07001LOCAL_PATH := $(call my-dir)
2
3include $(CLEAR_VARS)
4include $(CLEAR_TBLGEN_VARS)
5
Andreas Gampe64da0062016-08-12 19:10:21 -07006# Only do this when Clang is available.
Josh Gao8feba832016-08-02 15:50:05 -07007CLANG_ROOT_PATH := external/clang
Andreas Gampe64da0062016-08-12 19:10:21 -07008ifneq ($(wildcard $(CLANG_ROOT_PATH)/clang.mk),)
9
10LLVM_ROOT_PATH := external/llvm
Josh Gao8feba832016-08-02 15:50:05 -070011include $(CLANG_ROOT_PATH)/clang.mk
12
13LOCAL_MODULE := versioner
14LOCAL_MODULE_TAGS := optional
15LOCAL_MODULE_CLASS := EXECUTABLES
16
17TBLGEN_TABLES := \
18 AttrList.inc \
19 AttrVisitor.inc \
20 Attrs.inc \
21 CommentCommandList.inc \
22 DeclNodes.inc \
23 DiagnosticCommonKinds.inc \
24 StmtNodes.inc \
25
26LOCAL_SRC_FILES := \
27 versioner.cpp \
28 Arch.cpp \
29 DeclarationDatabase.cpp \
Josh Gaof8592a32016-07-26 18:58:27 -070030 Preprocessor.cpp \
Josh Gao8feba832016-08-02 15:50:05 -070031 SymbolDatabase.cpp \
32 Utils.cpp
33
34LOCAL_SHARED_LIBRARIES := libclang libLLVM
35
36include $(CLANG_HOST_BUILD_MK)
37include $(CLANG_TBLGEN_RULES_MK)
38
39# Set these after including the clang makefiles, to avoid getting CFLAGS from them.
40LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter
41LOCAL_CFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
42LOCAL_CPPFLAGS := -std=c++14 -fno-rtti
43
44LOCAL_MODULE_HOST_OS := linux
45
46include $(BUILD_HOST_EXECUTABLE)
Andreas Gampe64da0062016-08-12 19:10:21 -070047
48endif