| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) | 
 | 2 |  | 
 | 3 | include $(CLEAR_VARS) | 
 | 4 | include $(CLEAR_TBLGEN_VARS) | 
 | 5 |  | 
| Andreas Gampe | 64da006 | 2016-08-12 19:10:21 -0700 | [diff] [blame] | 6 | # Only do this when Clang is available. | 
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 7 | CLANG_ROOT_PATH := external/clang | 
| Andreas Gampe | 64da006 | 2016-08-12 19:10:21 -0700 | [diff] [blame] | 8 | ifneq ($(wildcard $(CLANG_ROOT_PATH)/clang.mk),) | 
 | 9 |  | 
 | 10 | LLVM_ROOT_PATH := external/llvm | 
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 11 | include $(CLANG_ROOT_PATH)/clang.mk | 
 | 12 |  | 
 | 13 | LOCAL_MODULE := versioner | 
 | 14 | LOCAL_MODULE_TAGS := optional | 
 | 15 | LOCAL_MODULE_CLASS := EXECUTABLES | 
 | 16 |  | 
 | 17 | TBLGEN_TABLES := \ | 
 | 18 |   AttrList.inc \ | 
 | 19 |   AttrVisitor.inc \ | 
 | 20 |   Attrs.inc \ | 
 | 21 |   CommentCommandList.inc \ | 
 | 22 |   DeclNodes.inc \ | 
 | 23 |   DiagnosticCommonKinds.inc \ | 
 | 24 |   StmtNodes.inc \ | 
 | 25 |  | 
 | 26 | LOCAL_SRC_FILES := \ | 
 | 27 |   versioner.cpp \ | 
 | 28 |   Arch.cpp \ | 
| Josh Gao | b5c4963 | 2016-11-08 22:21:31 -0800 | [diff] [blame] | 29 |   CompilationType.cpp \ | 
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 30 |   DeclarationDatabase.cpp \ | 
| Josh Gao | b5c4963 | 2016-11-08 22:21:31 -0800 | [diff] [blame] | 31 |   Driver.cpp \ | 
| Josh Gao | f8592a3 | 2016-07-26 18:58:27 -0700 | [diff] [blame] | 32 |   Preprocessor.cpp \ | 
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 33 |   SymbolDatabase.cpp \ | 
| Josh Gao | 78b8a14 | 2016-11-09 01:00:41 -0800 | [diff] [blame] | 34 |   Utils.cpp \ | 
 | 35 |   VFS.cpp | 
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 36 |  | 
| Josh Gao | 16016df | 2016-11-07 18:27:16 -0800 | [diff] [blame] | 37 | LOCAL_SHARED_LIBRARIES := libclang libLLVM libbase | 
| Josh Gao | 8feba83 | 2016-08-02 15:50:05 -0700 | [diff] [blame] | 38 |  | 
 | 39 | include $(CLANG_HOST_BUILD_MK) | 
 | 40 | include $(CLANG_TBLGEN_RULES_MK) | 
 | 41 |  | 
 | 42 | # Set these after including the clang makefiles, to avoid getting CFLAGS from them. | 
 | 43 | LOCAL_CFLAGS := -Wall -Wextra -Werror -Wno-unused-parameter | 
 | 44 | LOCAL_CFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS | 
 | 45 | LOCAL_CPPFLAGS := -std=c++14 -fno-rtti | 
 | 46 |  | 
 | 47 | LOCAL_MODULE_HOST_OS := linux | 
 | 48 |  | 
 | 49 | include $(BUILD_HOST_EXECUTABLE) | 
| Andreas Gampe | 64da006 | 2016-08-12 19:10:21 -0700 | [diff] [blame] | 50 |  | 
 | 51 | endif |