OLD | NEW |
1 # The following variables will likely need to be modified, depending on where | 1 # The following variables will likely need to be modified, depending on where |
2 # and how you built LLVM & Clang. They can be overridden in a command-line | 2 # and how you built LLVM & Clang. They can be overridden in a command-line |
3 # invocation of make, like: | 3 # invocation of make, like: |
4 # | 4 # |
5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> \ | 5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> \ |
6 # LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> ... | 6 # LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> ... |
7 # | 7 # |
8 | 8 |
9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This | 9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This |
10 # directory should contain the configure script, the include/ and lib/ | 10 # directory should contain the configure script, the include/ and lib/ |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 $(info Using CLANG_PATH = $(CLANG_PATH)) | 44 $(info Using CLANG_PATH = $(CLANG_PATH)) |
45 $(info Using HOST_ARCH = $(HOST_ARCH)) | 45 $(info Using HOST_ARCH = $(HOST_ARCH)) |
46 $(info -----------------------------------------------) | 46 $(info -----------------------------------------------) |
47 | 47 |
48 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags` | 48 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags` |
49 LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --libs` \ | 49 LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --libs` \ |
50 `$(LLVM_BIN_PATH)/llvm-config --ldflags` | 50 `$(LLVM_BIN_PATH)/llvm-config --ldflags` |
51 | 51 |
52 # It's recommended that CXX matches the compiler you used to build LLVM itself. | 52 # It's recommended that CXX matches the compiler you used to build LLVM itself. |
53 OPTLEVEL := -O0 | 53 OPTLEVEL := -O0 |
54 CXX := $(CLANG_PATH)/clang++ | 54 CCACHE := `command -v ccache` |
| 55 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ |
55 | 56 |
56 CXXFLAGS := $(LLVM_CXXFLAGS) -Wall -Wextra -Werror -fno-rtti \ | 57 CXXFLAGS := $(LLVM_CXXFLAGS) -Wall -Wextra -Werror -fno-rtti \ |
57 -fno-exceptions $(OPTLEVEL) -g $(HOST_FLAGS) \ | 58 -fno-exceptions $(OPTLEVEL) -g $(HOST_FLAGS) \ |
58 -Wno-error=unused-parameter -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 | 59 -Wno-error=unused-parameter -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 |
59 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib | 60 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib |
60 | 61 |
61 SRCS= \ | 62 SRCS= \ |
62 IceCfg.cpp \ | 63 IceCfg.cpp \ |
63 IceCfgNode.cpp \ | 64 IceCfgNode.cpp \ |
64 IceConverter.cpp \ | 65 IceConverter.cpp \ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 CLANG_FORMAT_DIFF = clang-format-diff.py | 120 CLANG_FORMAT_DIFF = clang-format-diff.py |
120 else | 121 else |
121 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py | 122 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py |
122 endif | 123 endif |
123 format-diff: | 124 format-diff: |
124 git diff -U0 `git merge-base HEAD master` | \ | 125 git diff -U0 `git merge-base HEAD master` | \ |
125 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i | 126 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i |
126 | 127 |
127 clean: | 128 clean: |
128 rm -rf llvm2ice *.o build/ | 129 rm -rf llvm2ice *.o build/ |
OLD | NEW |