| 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> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \ | 5 # make LLVM_SRC_PATH=<path> LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> \ |
| 6 # PNACL_BIN_PATH=<path> ... | 6 # PNACL_BIN_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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 $(STDLIB_FLAGS) | 161 $(STDLIB_FLAGS) |
| 162 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES) | 162 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(SB_CXX_DEFINES) |
| 163 | 163 |
| 164 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ | 164 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ |
| 165 $(LD_EXTRA) $(STDLIB_FLAGS) | 165 $(LD_EXTRA) $(STDLIB_FLAGS) |
| 166 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. | 166 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. |
| 167 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) | 167 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) |
| 168 | 168 |
| 169 SRCS = \ | 169 SRCS = \ |
| 170 IceAssembler.cpp \ | 170 IceAssembler.cpp \ |
| 171 IceAssemblerX8664.cpp \ | |
| 172 IceBrowserCompileServer.cpp \ | 171 IceBrowserCompileServer.cpp \ |
| 173 IceCfg.cpp \ | 172 IceCfg.cpp \ |
| 174 IceCfgNode.cpp \ | 173 IceCfgNode.cpp \ |
| 175 IceClFlags.cpp \ | 174 IceClFlags.cpp \ |
| 176 IceCompiler.cpp \ | 175 IceCompiler.cpp \ |
| 177 IceCompileServer.cpp \ | 176 IceCompileServer.cpp \ |
| 178 IceELFObjectWriter.cpp \ | 177 IceELFObjectWriter.cpp \ |
| 179 IceELFSection.cpp \ | 178 IceELFSection.cpp \ |
| 180 IceFixups.cpp \ | 179 IceFixups.cpp \ |
| 181 IceGlobalContext.cpp \ | 180 IceGlobalContext.cpp \ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 205 ifndef MINIMAL | 204 ifndef MINIMAL |
| 206 SRCS += IceConverter.cpp \ | 205 SRCS += IceConverter.cpp \ |
| 207 IceTypeConverter.cpp | 206 IceTypeConverter.cpp |
| 208 endif | 207 endif |
| 209 | 208 |
| 210 OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) | 209 OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) |
| 211 SB_OBJS=$(patsubst %.cpp, $(SB_OBJDIR)/%.o, $(SRCS)) | 210 SB_OBJS=$(patsubst %.cpp, $(SB_OBJDIR)/%.o, $(SRCS)) |
| 212 | 211 |
| 213 UNITTEST_SRCS = \ | 212 UNITTEST_SRCS = \ |
| 214 BitcodeMunge.cpp \ | 213 BitcodeMunge.cpp \ |
| 215 IceAssemblerX8632Test.cpp \ | |
| 216 IceELFSectionTest.cpp \ | 214 IceELFSectionTest.cpp \ |
| 217 » IceParseInstsTest.cpp | 215 » IceParseInstsTest.cpp \ |
| 216 AssemblerX8632/LowLevel.cpp \ |
| 217 AssemblerX8632/DataMov.cpp \ |
| 218 AssemblerX8632/Locked.cpp \ |
| 219 AssemblerX8632/GPRArith.cpp \ |
| 220 AssemblerX8632/XmmArith.cpp \ |
| 221 AssemblerX8632/ControlFlow.cpp \ |
| 222 AssemblerX8632/Other.cpp \ |
| 223 AssemblerX8632/X87.cpp \ |
| 224 AssemblerX8664/LowLevel.cpp \ |
| 225 AssemblerX8664/DataMov.cpp \ |
| 226 AssemblerX8664/Locked.cpp \ |
| 227 AssemblerX8664/GPRArith.cpp \ |
| 228 AssemblerX8664/XmmArith.cpp \ |
| 229 AssemblerX8664/ControlFlow.cpp \ |
| 230 AssemblerX8664/Other.cpp |
| 231 |
| 218 | 232 |
| 219 UNITTEST_OBJS = $(patsubst %.cpp, $(OBJDIR)/unittest/%.o, $(UNITTEST_SRCS)) | 233 UNITTEST_OBJS = $(patsubst %.cpp, $(OBJDIR)/unittest/%.o, $(UNITTEST_SRCS)) |
| 220 UNITTEST_LIB_OBJS = $(filter-out $(OBJDIR)/main.o,$(OBJS)) | 234 UNITTEST_LIB_OBJS = $(filter-out $(OBJDIR)/main.o,$(OBJS)) |
| 221 | 235 |
| 222 # Keep all the first target so it's the default. | 236 # Keep all the first target so it's the default. |
| 223 all: $(OBJDIR)/pnacl-sz make_symlink runtime | 237 all: $(OBJDIR)/pnacl-sz make_symlink runtime |
| 224 | 238 |
| 225 ifdef TSAN | 239 ifdef TSAN |
| 226 sb: | 240 sb: |
| 227 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." | 241 @echo "Skipping pnacl-sz.*.nexe: TSAN isn't supported under NaCl." |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 278 |
| 265 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) | 279 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) |
| 266 $(CXX) $(GTEST_LIB_PATH) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ | 280 $(CXX) $(GTEST_LIB_PATH) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ |
| 267 -lgtest -lgtest_main -ldl \ | 281 -lgtest -lgtest_main -ldl \ |
| 268 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) | 282 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
| 269 | 283 |
| 270 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \ | 284 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \ |
| 271 unittest/*.h src/*.h src/*.def | 285 unittest/*.h src/*.h src/*.def |
| 272 $(CXX) -c $(CXXFLAGS) \ | 286 $(CXX) -c $(CXXFLAGS) \ |
| 273 -Isrc/ \ | 287 -Isrc/ \ |
| 288 -Iunittest/ \ |
| 274 -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \ | 289 -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \ |
| 275 -I$(LLVM_SRC_PATH) \ | 290 -I$(LLVM_SRC_PATH) \ |
| 276 -DGTEST_HAS_RTTI=0 -DGTEST_USE_OWN_TR1_TUPLE \ | 291 -DGTEST_HAS_RTTI=0 -DGTEST_USE_OWN_TR1_TUPLE \ |
| 277 $< -o $@ | 292 $< -o $@ |
| 278 | 293 |
| 279 $(OBJS): | $(OBJDIR) | 294 $(OBJS): | $(OBJDIR) |
| 280 $(SB_OBJS): | $(SB_OBJDIR) | 295 $(SB_OBJS): | $(SB_OBJDIR) |
| 281 | 296 |
| 282 $(UNITTEST_OBJS): | $(OBJDIR)/unittest | 297 $(UNITTEST_OBJS): | $(OBJDIR)/unittest $(OBJDIR)/unittest/AssemblerX8632 $(OBJDI
R)/unittest/AssemblerX8664 |
| 283 | 298 |
| 284 $(OBJDIR): | 299 $(OBJDIR): |
| 285 @mkdir -p $@ | 300 @mkdir -p $@ |
| 286 $(SB_OBJDIR): | 301 $(SB_OBJDIR): |
| 287 @mkdir -p $@ | 302 @mkdir -p $@ |
| 288 | 303 |
| 289 $(OBJDIR)/unittest: $(OBJDIR) | 304 $(OBJDIR)/unittest: $(OBJDIR) |
| 290 @mkdir -p $@ | 305 @mkdir -p $@ |
| 291 | 306 |
| 307 $(OBJDIR)/unittest/AssemblerX8632: $(OBJDIR)/unittest |
| 308 @mkdir -p $@ |
| 309 $(OBJDIR)/unittest/AssemblerX8664: $(OBJDIR)/unittest |
| 310 @mkdir -p $@ |
| 311 |
| 292 RT_SRC := runtime/szrt.c runtime/szrt_ll.ll runtime/szrt_profiler.c | 312 RT_SRC := runtime/szrt.c runtime/szrt_ll.ll runtime/szrt_profiler.c |
| 293 RT_OBJ := build/runtime/szrt_native_x8632.o build/runtime/szrt_sb_x8632.o \ | 313 RT_OBJ := build/runtime/szrt_native_x8632.o build/runtime/szrt_sb_x8632.o \ |
| 294 build/runtime/szrt_native_arm32.o build/runtime/szrt_sb_arm32.o | 314 build/runtime/szrt_native_arm32.o build/runtime/szrt_sb_arm32.o |
| 295 | 315 |
| 296 runtime: $(RT_OBJ) | 316 runtime: $(RT_OBJ) |
| 297 | 317 |
| 298 # Use runtime.is.built so that build-runtime.py is invoked only once | 318 # Use runtime.is.built so that build-runtime.py is invoked only once |
| 299 # even in a parallel build. | 319 # even in a parallel build. |
| 300 .INTERMEDIATE: runtime.is.built | 320 .INTERMEDIATE: runtime.is.built |
| 301 $(RT_OBJ): runtime.is.built | 321 $(RT_OBJ): runtime.is.built |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 372 |
| 353 docs: | 373 docs: |
| 354 doxygen Doxyfile | 374 doxygen Doxyfile |
| 355 @echo See file://`pwd`/docs/html/index.html | 375 @echo See file://`pwd`/docs/html/index.html |
| 356 | 376 |
| 357 clean: | 377 clean: |
| 358 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json | 378 rm -rf pnacl-sz *.o $(OBJDIR) $(SB_OBJDIR) build/pnacl-sz.bloat.json |
| 359 | 379 |
| 360 clean-all: clean | 380 clean-all: clean |
| 361 rm -rf build/ docs/ | 381 rm -rf build/ docs/ |
| OLD | NEW |