Chromium Code Reviews| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 -Wno-unused-parameter \ | 243 -Wno-unused-parameter \ |
| 244 -Wwrite-strings | 244 -Wwrite-strings |
| 245 OBJDIR := $(OBJDIR)+Gplusplus | 245 OBJDIR := $(OBJDIR)+Gplusplus |
| 246 endif | 246 endif |
| 247 | 247 |
| 248 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ | 248 BASE_CXXFLAGS := -std=gnu++11 -Wall -Wextra -Werror -fno-rtti \ |
| 249 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ | 249 -fno-exceptions $(OPTLEVEL) $(ASSERTIONS) -g -pedantic \ |
| 250 $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) | 250 $(LLVM_EXTRA_WARNINGS) $(CXX_EXTRA) |
| 251 | 251 |
| 252 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ | 252 CXXFLAGS := $(LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(CXX_DEFINES) $(HOST_FLAGS) \ |
| 253 $(STDLIB_FLAGS) | 253 $(STDLIB_FLAGS) -MP -MD |
|
Jim Stichnoth
2016/03/15 23:43:58
Can these two additions of "-MP -MD" be refactored
John
2016/03/16 11:13:40
Done.
| |
| 254 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(BASE_CXX_DEFINES) \ | 254 SB_CXXFLAGS := $(SB_LLVM_CXXFLAGS) $(BASE_CXXFLAGS) $(BASE_CXX_DEFINES) \ |
| 255 -Wno-unknown-pragmas -I$(NACL_ROOT) -I$(NACL_ROOT)/.. | 255 -Wno-unknown-pragmas -I$(NACL_ROOT) -I$(NACL_ROOT)/.. -MP -MD |
| 256 | 256 |
| 257 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ | 257 LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \ |
| 258 $(LD_EXTRA) $(STDLIB_FLAGS) | 258 $(LD_EXTRA) $(STDLIB_FLAGS) |
| 259 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. | 259 # Not specifying -Wl,--gc-sections but instead doing bitcode linking GC w/ LTO. |
| 260 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) | 260 SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA) |
| 261 | 261 |
| 262 # List the target-specific source files first, which generally take longer to | 262 # List the target-specific source files first, which generally take longer to |
| 263 # compile, in the hope of improving parallel build time. | 263 # compile, in the hope of improving parallel build time. |
| 264 SRCS = \ | 264 SRCS = \ |
| 265 IceAssemblerARM32.cpp \ | 265 IceAssemblerARM32.cpp \ |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 | 402 |
| 403 $(SBB_OBJDIR)/pnacl_public_x86_32_pnacl_sz_nexe: $(SBB_OBJDIR)/pnacl-sz.pexe | 403 $(SBB_OBJDIR)/pnacl_public_x86_32_pnacl_sz_nexe: $(SBB_OBJDIR)/pnacl-sz.pexe |
| 404 $(SB_TRANSLATE) -arch x86-32 $^ -o $@ | 404 $(SB_TRANSLATE) -arch x86-32 $^ -o $@ |
| 405 | 405 |
| 406 $(SBB_OBJDIR)/pnacl_public_x86_64_pnacl_sz_nexe: $(SBB_OBJDIR)/pnacl-sz.pexe | 406 $(SBB_OBJDIR)/pnacl_public_x86_64_pnacl_sz_nexe: $(SBB_OBJDIR)/pnacl-sz.pexe |
| 407 $(SB_TRANSLATE) -arch x86-64 $^ -o $@ | 407 $(SB_TRANSLATE) -arch x86-64 $^ -o $@ |
| 408 | 408 |
| 409 src/IceRegistersARM32.def: pydir/gen_arm32_reg_tables.py | 409 src/IceRegistersARM32.def: pydir/gen_arm32_reg_tables.py |
| 410 python $< > $@ | 410 python $< > $@ |
| 411 | 411 |
| 412 # TODO(stichnot): Be more precise than "*.h" here and elsewhere. | 412 -include $(foreach dep,$(SRCS:.cpp=.d),$(OBJDIR)/$(dep)) |
| 413 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def | 413 $(OBJS): $(OBJDIR)/%.o: src/%.cpp |
| 414 $(CXX) -c $(CXXFLAGS) $< -o $@ | 414 $(CXX) -c $(CXXFLAGS) $< -o $@ |
| 415 | 415 |
| 416 $(SB_OBJS): $(SB_OBJDIR)/%.o: src/%.cpp src/*.h src/*.def | 416 -include $(foreach dep,$(SRCS:.cpp=.d),$(SB_OBJDIR)/$(dep)) |
| 417 $(SB_OBJS): $(SB_OBJDIR)/%.o: src/%.cpp | |
| 417 $(SB_CXX) -c $(SB_CXXFLAGS) -DPNACL_BROWSER_TRANSLATOR=0 $< -o $@ | 418 $(SB_CXX) -c $(SB_CXXFLAGS) -DPNACL_BROWSER_TRANSLATOR=0 $< -o $@ |
| 418 | 419 |
| 419 $(SBB_OBJS): $(SBB_OBJDIR)/%.o: src/%.cpp src/*.h src/*.def | 420 -include $(foreach dep,$(SRCS:.cpp=.d),$(SBB_OBJDIR)/$(dep)) |
| 421 $(SBB_OBJS): $(SBB_OBJDIR)/%.o: src/%.cpp | |
| 420 $(SB_CXX) -c $(SB_CXXFLAGS) -DPNACL_BROWSER_TRANSLATOR=1 $< -o $@ | 422 $(SB_CXX) -c $(SB_CXXFLAGS) -DPNACL_BROWSER_TRANSLATOR=1 $< -o $@ |
| 421 | 423 |
| 422 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) | 424 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) |
| 423 $(CXX) $(GTEST_LIB_PATH) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ | 425 $(CXX) $(GTEST_LIB_PATH) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \ |
| 424 -lgtest -lgtest_main -ldl \ | 426 -lgtest -lgtest_main -ldl \ |
| 425 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) | 427 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
| 426 | 428 |
| 427 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp unittest/*.h \ | 429 -include $(foreach dep,$(UNITTEST_SRCS:.cpp=.d),$(OBJDIR)/unittest/$(dep)) |
| 428 src/*.h src/*.def | 430 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp |
| 429 $(CXX) -c $(CXXFLAGS) \ | 431 $(CXX) -c $(CXXFLAGS) \ |
| 430 -Isrc/ \ | 432 -Isrc/ \ |
| 431 -Iunittest/ \ | 433 -Iunittest/ \ |
| 432 -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \ | 434 -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \ |
| 433 -I$(LLVM_SRC_PATH) \ | 435 -I$(LLVM_SRC_PATH) \ |
| 434 -DGTEST_HAS_RTTI=0 -DGTEST_USE_OWN_TR1_TUPLE \ | 436 -DGTEST_HAS_RTTI=0 -DGTEST_USE_OWN_TR1_TUPLE \ |
| 435 -Wno-expansion-to-defined \ | 437 -Wno-expansion-to-defined \ |
| 436 $< -o $@ | 438 $< -o $@ |
| 437 | 439 |
| 438 $(OBJS): | $(OBJDIR) | 440 $(OBJS): | $(OBJDIR) |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 672 | 674 |
| 673 help-check-xtest: | 675 help-check-xtest: |
| 674 @cat Makefile.standalone-help/check-xtest.txt | 676 @cat Makefile.standalone-help/check-xtest.txt |
| 675 | 677 |
| 676 clean: | 678 clean: |
| 677 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ | 679 rm -rf pnacl-sz *.o $(foreach nexe,$(NEXES),$(notdir $(nexe))) \ |
| 678 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json | 680 $(OBJDIR) $(SB_OBJDIR) $(SBB_OBJDIR) build/*.bloat.json |
| 679 | 681 |
| 680 clean-all: clean | 682 clean-all: clean |
| 681 rm -rf build/ crosstest/Output/ | 683 rm -rf build/ crosstest/Output/ |
| OLD | NEW |