Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: Makefile.standalone

Issue 997773002: Refactor Subzero initialization and add a browser callback handler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add argv note Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Makefile ('k') | src/IceBrowserCompileServer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # BINUTILS_BIN_PATH=<path> ... 7 # PNACL_BIN_PATH=<path> ...
8 # 8 #
9 9
10 # LLVM_SRC_PATH is the path to the root of the checked out source code. This 10 # LLVM_SRC_PATH is the path to the root of the checked out source code. This
11 # directory should contain the configure script, the include/ and lib/ 11 # directory should contain the configure script, the include/ and lib/
12 # directories of LLVM, Clang in tools/clang/, etc. 12 # directories of LLVM, Clang in tools/clang/, etc.
13 # Alternatively, if you're building vs. a binary download of LLVM, then 13 # Alternatively, if you're building vs. a binary download of LLVM, then
14 # LLVM_SRC_PATH can point to the main untarred directory. 14 # LLVM_SRC_PATH can point to the main untarred directory.
15 LLVM_SRC_PATH ?= ../llvm 15 LLVM_SRC_PATH ?= ../llvm
16 16
17 # LLVM_BIN_PATH is the directory where binaries are placed by the LLVM build 17 # LLVM_BIN_PATH is the directory where binaries are placed by the LLVM build
18 # process. It should contain the tools like clang, clang-format, llc, 18 # process. It should contain the tools like clang, clang-format, llc,
19 # llvm-as, llvm-config, llvm-mc, pnacl-bcdis, and pnacl-freeze. 19 # llvm-as, llvm-config, llvm-mc, pnacl-bcdis, and pnacl-freeze.
20 # It also contains developer libraries like libLLVMSupport.a. 20 # It also contains developer libraries like libLLVMSupport.a.
21 # The default reflects a configure + make build. 21 # The default reflects a configure + make build.
22 LLVM_BIN_PATH ?= $(shell readlink -e \ 22 LLVM_BIN_PATH ?= $(shell readlink -e \
23 ../../out/llvm_x86_64_linux_work/Release+Asserts/bin) 23 ../../out/llvm_x86_64_linux_work/Release+Asserts/bin)
24 24
25 # The x86-32-specific sandboxed translator directory.
26 # It holds sandboxed versions of libraries and binaries.
27 SB_LLVM_PATH ?= $(shell readlink -e \
28 ../../out/sandboxed_translators_work/translator-i686/llvm-sb/Release)
29
30 # NACL_ROOT is the root of the native client repository.
31 NACL_ROOT ?= $(shell python -c "import sys; sys.path.insert(0, 'pydir'); \
32 import utils; print utils.FindBaseNaCl()")
33
25 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain. 34 # PNACL_TOOLCHAIN_ROOT is the location of the PNaCl toolchain.
26 # This is used as the default root for finding binutils, libcxx, etc. 35 # This is used as the default root for finding binutils, libcxx, etc.
27 PNACL_TOOLCHAIN_ROOT = $(shell readlink -e \ 36 PNACL_TOOLCHAIN_ROOT ?= $(shell readlink -e \
28 » ../../../toolchain/linux_x86/pnacl_newlib) 37 » $(NACL_ROOT)/toolchain/linux_x86/pnacl_newlib)
38
39 # The location of PNaCl tools (e.g., binutils objdump, pnacl-clang++, etc.).
40 PNACL_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin)
29 41
30 # CLANG_PATH is the location of the clang compiler to use for building 42 # CLANG_PATH is the location of the clang compiler to use for building
31 # the host binaries. 43 # the host binaries.
32 CLANG_PATH ?= $(shell readlink -e \ 44 CLANG_PATH ?= $(shell readlink -e \
33 » ../../../../third_party/llvm-build/Release+Asserts/bin) 45 » $(NACL_ROOT)/../third_party/llvm-build/Release+Asserts/bin)
34 46
35 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should 47 # LIBCXX_INSTALL_PATH is the directory where libc++ is located. It should
36 # contain header files and corresponding libraries. This is used for 48 # contain header files and corresponding libraries. This is used for
37 # building the host binaries in conjuction with clang. 49 # building the host binaries in conjuction with clang.
38 LIBCXX_INSTALL_PATH ?= $(PNACL_TOOLCHAIN_ROOT) 50 LIBCXX_INSTALL_PATH ?= $(PNACL_TOOLCHAIN_ROOT)
39 51
40 # The location of binutils tools (e.g., objdump) for testing.
41 BINUTILS_BIN_PATH ?= $(shell readlink -e $(PNACL_TOOLCHAIN_ROOT)/bin)
42
43 HOST_ARCH ?= x86_64 52 HOST_ARCH ?= x86_64
44 ifeq ($(HOST_ARCH),x86_64) 53 ifeq ($(HOST_ARCH),x86_64)
45 HOST_FLAGS = -m64 -stdlib=libc++ 54 HOST_FLAGS = -m64 -stdlib=libc++
46 else 55 else
47 ifeq ($(HOST_ARCH),x86) 56 ifeq ($(HOST_ARCH),x86)
48 HOST_FLAGS = -m32 -stdlib=libc++ 57 HOST_FLAGS = -m32 -stdlib=libc++
49 endif 58 endif
50 endif 59 endif
51 60
52 ifdef DEBUG 61 ifdef DEBUG
53 OBJDIR = build/Debug 62 OBJDIR = build/Debug
54 OPTLEVEL = -O0 63 OPTLEVEL = -O0
64 LINKOPTLEVEL = -O0
55 else 65 else
56 OBJDIR = build/Release 66 OBJDIR = build/Release
57 OPTLEVEL = -O2 -ffunction-sections -fdata-sections 67 OPTLEVEL = -O2 -ffunction-sections -fdata-sections
68 LINKOPTLEVEL = -O2
58 endif 69 endif
59 70
60 # The list of CXX defines that are dependent on build parameters. 71 # The list of CXX defines that are dependent on build parameters.
61 CXX_DEFINES = 72 BASE_CXX_DEFINES =
62 CXX_EXTRA = 73 CXX_EXTRA =
63 LD_EXTRA = 74 LD_EXTRA =
64 75
65 ifdef MINIMAL 76 ifdef MINIMAL
66 NOASSERT = 1 77 NOASSERT = 1
67 OBJDIR := $(OBJDIR)+Min 78 OBJDIR := $(OBJDIR)+Min
68 CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \ 79 BASE_CXX_DEFINES += -DALLOW_DUMP=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 \
69 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 \ 80 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_DISABLE_IR_GEN=0 \
70 -DALLOW_MINIMAL_BUILD=1 81 -DALLOW_MINIMAL_BUILD=1
71 else 82 else
72 CXX_DEFINES += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \ 83 BASE_CXX_DEFINES += -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 -DALLOW_LLVM_IR=1 \
73 -DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1 \ 84 -DALLOW_LLVM_IR_AS_INPUT=1 -DALLOW_DISABLE_IR_GEN=1 \
74 -DALLOW_MINIMAL_BUILD=0 85 -DALLOW_MINIMAL_BUILD=0
75 endif 86 endif
76 87
88 SB_CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=1
89 CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0
90
77 ifdef NOASSERT 91 ifdef NOASSERT
78 ASSERTIONS = -DNDEBUG 92 ASSERTIONS = -DNDEBUG
79 else 93 else
80 ASSERTIONS = 94 ASSERTIONS =
81 OBJDIR := $(OBJDIR)+Asserts 95 OBJDIR := $(OBJDIR)+Asserts
82 endif 96 endif
83 97
84 ifdef TSAN 98 ifdef TSAN
85 OBJDIR := $(OBJDIR)+TSan 99 OBJDIR := $(OBJDIR)+TSan
86 CXX_EXTRA += -fsanitize=thread 100 CXX_EXTRA += -fsanitize=thread
87 LD_EXTRA += -fsanitize=thread 101 LD_EXTRA += -fsanitize=thread
88 endif 102 endif
89 103
104 SB_OBJDIR := $(OBJDIR)+Sandboxed
105
90 $(info -----------------------------------------------) 106 $(info -----------------------------------------------)
91 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH)) 107 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH))
92 $(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH)) 108 $(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH))
109 $(info Using SB_LLVM_PATH = $(SB_LLVM_PATH))
110 $(info Using NACL_ROOT = $(NACL_ROOT))
93 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT)) 111 $(info Using PNACL_TOOLCHAIN_ROOT = $(PNACL_TOOLCHAIN_ROOT))
112 $(info Using PNACL_BIN_PATH = $(PNACL_BIN_PATH))
94 $(info Using CLANG_PATH = $(CLANG_PATH)) 113 $(info Using CLANG_PATH = $(CLANG_PATH))
95 $(info Using LIBCXX_INSTALL_PATH = $(LIBCXX_INSTALL_PATH)) 114 $(info Using LIBCXX_INSTALL_PATH = $(LIBCXX_INSTALL_PATH))
96 $(info Using BINUTILS_BIN_PATH = $(BINUTILS_BIN_PATH))
97 $(info Using HOST_ARCH = $(HOST_ARCH)) 115 $(info Using HOST_ARCH = $(HOST_ARCH))
98 $(info -----------------------------------------------) 116 $(info -----------------------------------------------)
99 117
100 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags` 118 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags`
101 LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --libs` \ 119 SB_LLVM_CXXFLAGS := $(LLVM_CXXFLAGS)
120
121 # Listing specific libraries that are needed for pnacl-sz
122 # and the unittests, since we build "tools-only" for the
123 # sandboxed_translators (which doesn't include every library
124 # listed by llvm-config).
125 LLVM_LIBS := -lLLVMIRReader -lLLVMBitReader -lLLVMNaClBitTestUtils \
126 » -lLLVMNaClBitReader -lLLVMNaClBitAnalysis -lLLVMNaClBitWriter \
127 » -lLLVMAsmParser -lLLVMNaClAnalysis -lLLVMCore -lLLVMSupport
128 LLVM_LDFLAGS := $(LLVM_LIBS) \
102 `$(LLVM_BIN_PATH)/llvm-config --ldflags` \ 129 `$(LLVM_BIN_PATH)/llvm-config --ldflags` \
103 `$(LLVM_BIN_PATH)/llvm-config --system-libs` 130 `$(LLVM_BIN_PATH)/llvm-config --system-libs`
131 SB_LLVM_LDFLAGS := $(LLVM_LIBS) \
132 -L$(SB_LLVM_PATH)/lib
104 133
105 # It's recommended that CXX matches the compiler you used to build LLVM itself.
106 CCACHE := `command -v ccache` 134 CCACHE := `command -v ccache`
107 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++ 135 CXX := CCACHE_CPP2=yes $(CCACHE) $(CLANG_PATH)/clang++
136 SB_CXX := CCACHE_CPP2=yes $(CCACHE) $(PNACL_BIN_PATH)/pnacl-clang++
137 SB_TRANSLATE := $(PNACL_BIN_PATH)/pnacl-translate
108 138
109 CXXFLAGS := $(LLVM_CXXFLAGS) -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ 139 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \
110 » -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) $(CXX_DEFINES) -g \ 140 » -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \
111 » $(HOST_FLAGS) -pedantic -Wno-error=unused-parameter \ 141 » -Wno-error=unused-parameter $(CXX_EXTRA)
112 » -I$(LIBCXX_INSTALL_PATH)/include/c++/v1 $(CXX_EXTRA) 142
143 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \
144 » -I$(LIBCXX_INSTALL_PATH)/include/c++/v1
145 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES)
146
113 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ 147 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \
114 $(LD_EXTRA) 148 $(LD_EXTRA)
149 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO.
150 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA)
115 151
116 SRCS = \ 152 SRCS = \
117 assembler.cpp \ 153 assembler.cpp \
118 assembler_ia32.cpp \ 154 assembler_ia32.cpp \
155 IceBrowserCompileServer.cpp \
119 IceCfg.cpp \ 156 IceCfg.cpp \
120 IceCfgNode.cpp \ 157 IceCfgNode.cpp \
158 IceClFlags.cpp \
159 IceCompiler.cpp \
160 IceCompileServer.cpp \
121 IceELFObjectWriter.cpp \ 161 IceELFObjectWriter.cpp \
122 IceELFSection.cpp \ 162 IceELFSection.cpp \
123 IceFixups.cpp \ 163 IceFixups.cpp \
124 IceGlobalContext.cpp \ 164 IceGlobalContext.cpp \
125 IceGlobalInits.cpp \ 165 IceGlobalInits.cpp \
126 IceInst.cpp \ 166 IceInst.cpp \
127 IceInstX8632.cpp \ 167 IceInstX8632.cpp \
128 IceIntrinsics.cpp \ 168 IceIntrinsics.cpp \
129 IceLiveness.cpp \ 169 IceLiveness.cpp \
130 IceOperand.cpp \ 170 IceOperand.cpp \
131 IceRegAlloc.cpp \ 171 IceRegAlloc.cpp \
132 IceRNG.cpp \ 172 IceRNG.cpp \
133 IceTargetLowering.cpp \ 173 IceTargetLowering.cpp \
134 IceTargetLoweringX8632.cpp \ 174 IceTargetLoweringX8632.cpp \
135 IceThreading.cpp \ 175 IceThreading.cpp \
136 IceTimerTree.cpp \ 176 IceTimerTree.cpp \
137 IceTranslator.cpp \ 177 IceTranslator.cpp \
138 IceTypes.cpp \ 178 IceTypes.cpp \
139 main.cpp \ 179 main.cpp \
140 PNaClTranslator.cpp 180 PNaClTranslator.cpp
141 181
142 ifndef MINIMAL 182 ifndef MINIMAL
143 SRCS += IceConverter.cpp \ 183 SRCS += IceConverter.cpp \
144 IceTypeConverter.cpp 184 IceTypeConverter.cpp
145 endif 185 endif
146 186
147 OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) 187 OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS))
188 SB_OBJS=$(patsubst %.cpp, $(SB_OBJDIR)/%.o, $(SRCS))
148 189
149 UNITTEST_SRCS = \ 190 UNITTEST_SRCS = \
150 BitcodeMunge.cpp \ 191 BitcodeMunge.cpp \
151 IceELFSectionTest.cpp \ 192 IceELFSectionTest.cpp \
152 IceParseInstsTest.cpp 193 IceParseInstsTest.cpp
153 194
154 UNITTEST_OBJS = $(patsubst %.cpp, $(OBJDIR)/unittest/%.o, $(UNITTEST_SRCS)) 195 UNITTEST_OBJS = $(patsubst %.cpp, $(OBJDIR)/unittest/%.o, $(UNITTEST_SRCS))
155 UNITTEST_LIB_OBJS = $(filter-out $(OBJDIR)/main.o,$(OBJS)) 196 UNITTEST_LIB_OBJS = $(filter-out $(OBJDIR)/main.o,$(OBJS))
156 197
157 # Keep all the first target so it's the default. 198 # Keep all the first target so it's the default.
158 all: $(OBJDIR)/pnacl-sz make_symlink runtime 199 all: $(OBJDIR)/pnacl-sz make_symlink runtime
159 200
201 ifdef TSAN
202 sb:
203 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl."
204 else
205 sb: $(SB_OBJDIR)/pnacl-sz.x86-32.nexe
206 endif
207
160 # Creates symbolic link so that testing is easier. Also runs 208 # Creates symbolic link so that testing is easier. Also runs
161 # pnacl-sz to verify that the defines flags have valid values, 209 # pnacl-sz to verify that the defines flags have valid values,
162 # as well as describe the corresponding build attributes. 210 # as well as describe the corresponding build attributes.
163 make_symlink: $(OBJDIR)/pnacl-sz 211 make_symlink: $(OBJDIR)/pnacl-sz
164 rm -rf pnacl-sz 212 rm -rf pnacl-sz
165 ln -s $(OBJDIR)/pnacl-sz 213 ln -s $(OBJDIR)/pnacl-sz
166 @echo "Build Attributes:" 214 @echo "Build Attributes:"
167 @$(OBJDIR)/pnacl-sz --build-atts 215 @$(OBJDIR)/pnacl-sz --build-atts
168 216
169 .PHONY: all make_symlink runtime bloat 217 .PHONY: all make_symlink runtime bloat sb
170 218
171 $(OBJDIR)/pnacl-sz: $(OBJS) 219 $(OBJDIR)/pnacl-sz: $(OBJS)
172 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ 220 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \
173 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) 221 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
174 222
223 $(SB_OBJDIR)/pnacl-sz.x86-32.nexe: $(SB_OBJS)
224 $(eval PNACL_SZ_BASE := $(patsubst %.nexe, %, $@))
225 $(SB_CXX) $(SB_LDFLAGS) -o $(PNACL_SZ_BASE).nonfinal.pexe $^ \
226 $(SB_LLVM_LDFLAGS)
227 $(SB_TRANSLATE) -arch x86-32 $(PNACL_SZ_BASE).nonfinal.pexe -o $@ \
228 --allow-llvm-bitcode-input
229
175 # TODO(stichnot): Be more precise than "*.h" here and elsewhere. 230 # TODO(stichnot): Be more precise than "*.h" here and elsewhere.
176 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def 231 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def
177 $(CXX) -c $(CXXFLAGS) $< -o $@ 232 $(CXX) -c $(CXXFLAGS) $< -o $@
178 233
234 $(SB_OBJS): $(SB_OBJDIR)/%.o: src/%.cpp src/*.h src/*.def
235 $(SB_CXX) -c $(SB_CXXFLAGS) $< -o $@
236
179 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) 237 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS)
180 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -lgtest -lgtest_main -ldl \ 238 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -lgtest -lgtest_main -ldl \
181 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) 239 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
182 240
183 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \ 241 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \
184 unittest/*.h src/*.h src/*.def 242 unittest/*.h src/*.h src/*.def
185 $(CXX) -c $(CXXFLAGS) \ 243 $(CXX) -c $(CXXFLAGS) \
186 -Isrc/ \ 244 -Isrc/ \
187 -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \ 245 -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \
188 -DGTEST_HAS_RTTI=0 -DGTEST_USE_OWN_TR1_TUPLE \ 246 -DGTEST_HAS_RTTI=0 -DGTEST_USE_OWN_TR1_TUPLE \
189 $< -o $@ 247 $< -o $@
190 248
191 $(OBJS): | $(OBJDIR) 249 $(OBJS): | $(OBJDIR)
250 $(SB_OBJS): | $(SB_OBJDIR)
192 251
193 $(UNITTEST_OBJS): | $(OBJDIR)/unittest 252 $(UNITTEST_OBJS): | $(OBJDIR)/unittest
194 253
195 $(OBJDIR): 254 $(OBJDIR):
196 @mkdir -p $@ 255 @mkdir -p $@
256 $(SB_OBJDIR):
257 @mkdir -p $@
197 258
198 $(OBJDIR)/unittest: $(OBJDIR) 259 $(OBJDIR)/unittest: $(OBJDIR)
199 @mkdir -p $@ 260 @mkdir -p $@
200 261
201 RT_SRC := runtime/szrt.c runtime/szrt_ll.ll 262 RT_SRC := runtime/szrt.c runtime/szrt_ll.ll
202 RT_OBJ := build/runtime/szrt_native_x8632.o build/runtime/szrt_sb_x8632.o 263 RT_OBJ := build/runtime/szrt_native_x8632.o build/runtime/szrt_sb_x8632.o
203 264
204 runtime: $(RT_OBJ) 265 runtime: $(RT_OBJ)
205 266
206 # Use runtime.is.built so that build-runtime.py is invoked only once 267 # Use runtime.is.built so that build-runtime.py is invoked only once
207 # even in a parallel build. 268 # even in a parallel build.
208 .INTERMEDIATE: runtime.is.built 269 .INTERMEDIATE: runtime.is.built
209 $(RT_OBJ): runtime.is.built 270 $(RT_OBJ): runtime.is.built
210 runtime.is.built: $(RT_SRC) 271 runtime.is.built: $(RT_SRC)
211 @echo ================ Building Subzero runtime ================ 272 @echo ================ Building Subzero runtime ================
212 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT) 273 ./pydir/build-runtime.py -v --pnacl-root $(PNACL_TOOLCHAIN_ROOT)
213 274
214 check-lit: $(OBJDIR)/pnacl-sz make_symlink 275 check-lit: $(OBJDIR)/pnacl-sz make_symlink
215 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ 276 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \
216 » BINUTILS_BIN_PATH=$(BINUTILS_BIN_PATH) \ 277 » BINUTILS_BIN_PATH=$(PNACL_BIN_PATH) \
217 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit 278 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit
218 279
219 ifdef MINIMAL 280 ifdef MINIMAL
220 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime 281 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime
221 @echo "Crosstests disabled, minimal build" 282 @echo "Crosstests disabled, minimal build"
222 else 283 else
223 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime 284 check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime
224 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. 285 # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1.
225 # For (slow) sandboxed tests, limit to Om1/sse4.1. 286 # For (slow) sandboxed tests, limit to Om1/sse4.1.
226 ./pydir/crosstest_generator.py -v --lit \ 287 ./pydir/crosstest_generator.py -v --lit \
(...skipping 20 matching lines...) Expand all
247 PATH=$(LLVM_BIN_PATH):$(PATH) \ 308 PATH=$(LLVM_BIN_PATH):$(PATH) \
248 $(LLVM_SRC_PATH)/../clang/tools/clang-format/clang-format-diff.py \ 309 $(LLVM_SRC_PATH)/../clang/tools/clang-format/clang-format-diff.py \
249 -p1 -style=LLVM -i 310 -p1 -style=LLVM -i
250 311
251 bloat: make_symlink 312 bloat: make_symlink
252 nm -C -S -l pnacl-sz | \ 313 nm -C -S -l pnacl-sz | \
253 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json 314 bloat/bloat.py --nm-output=/dev/stdin syms > build/pnacl-sz.bloat.json
254 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html 315 @echo See Subzero size breakdown in bloat/pnacl-sz.bloat.html
255 316
256 clean: 317 clean:
257 » rm -rf pnacl-sz *.o $(OBJDIR) build/pnacl-sz.bloat.json 318 » rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json
258 319
259 clean-all: clean 320 clean-all: clean
260 rm -rf build/ 321 rm -rf build/
OLDNEW
« no previous file with comments | « Makefile ('k') | src/IceBrowserCompileServer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698