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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 | 145 |
146 # Creates symbolic link so that testing is easier. Also runs | 146 # Creates symbolic link so that testing is easier. Also runs |
147 # llvm2ice to verify that the defines flags have valid values, | 147 # llvm2ice to verify that the defines flags have valid values, |
148 # as well as describe the corresponding build attributes. | 148 # as well as describe the corresponding build attributes. |
149 make_symlink: $(OBJDIR)/llvm2ice | 149 make_symlink: $(OBJDIR)/llvm2ice |
150 rm -rf llvm2ice | 150 rm -rf llvm2ice |
151 ln -s $(OBJDIR)/llvm2ice | 151 ln -s $(OBJDIR)/llvm2ice |
152 @echo "Build Attributes:" | 152 @echo "Build Attributes:" |
153 @$(OBJDIR)/llvm2ice --build-atts | 153 @$(OBJDIR)/llvm2ice --build-atts |
154 | 154 |
155 .PHONY: all make_symlink | 155 .PHONY: all make_symlink bloat |
156 | 156 |
157 # TODO(kschimpf): Fix python scripts to directly get build attributes | 157 # TODO(kschimpf): Fix python scripts to directly get build attributes |
158 # rather than generating $(OBJDIR)/llvm2ice.build_atts. | 158 # rather than generating $(OBJDIR)/llvm2ice.build_atts. |
159 $(OBJDIR)/llvm2ice: $(OBJS) | 159 $(OBJDIR)/llvm2ice: $(OBJS) |
160 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ | 160 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ |
161 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) | 161 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
162 | 162 |
163 # TODO(stichnot): Be more precise than "*.h" here and elsewhere. | 163 # TODO(stichnot): Be more precise than "*.h" here and elsewhere. |
164 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def | 164 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def |
165 $(CXX) -c $(CXXFLAGS) $< -o $@ | 165 $(CXX) -c $(CXXFLAGS) $< -o $@ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 format: | 207 format: |
208 $(LLVM_BIN_PATH)/clang-format -style=LLVM -i \ | 208 $(LLVM_BIN_PATH)/clang-format -style=LLVM -i \ |
209 `find . -regex '.*\.\(c\|h\|cpp\)' $(FORMAT_BLACKLIST)` | 209 `find . -regex '.*\.\(c\|h\|cpp\)' $(FORMAT_BLACKLIST)` |
210 | 210 |
211 format-diff: | 211 format-diff: |
212 git diff -U0 `git merge-base HEAD master` | \ | 212 git diff -U0 `git merge-base HEAD master` | \ |
213 PATH=$(LLVM_BIN_PATH):$(PATH) \ | 213 PATH=$(LLVM_BIN_PATH):$(PATH) \ |
214 $(LLVM_SRC_PATH)/../clang/tools/clang-format/clang-format-diff.py \ | 214 $(LLVM_SRC_PATH)/../clang/tools/clang-format/clang-format-diff.py \ |
215 -p1 -style=LLVM -i | 215 -p1 -style=LLVM -i |
216 | 216 |
217 bloat: make_symlink | |
218 nm -C -S -l llvm2ice | \ | |
219 bloat/bloat.py --nm-output=/dev/stdin syms > llvm2ice.bloat.json | |
220 google-chrome --incognito bloat/llvm2ice.bloat.html | |
JF
2015/02/12 17:20:28
Eek, launching Chrome. What if use google-chrome-b
Jim Stichnoth
2015/02/12 18:39:50
OK, changed to echo a message saying what file to
| |
221 | |
217 clean: | 222 clean: |
218 » rm -rf llvm2ice *.o $(OBJDIR) | 223 » rm -rf llvm2ice *.o $(OBJDIR) llvm2ice.bloat.json |
219 | 224 |
220 clean-all: clean | 225 clean-all: clean |
221 rm -rf build/ | 226 rm -rf build/ |
OLD | NEW |