Commit 6e861d5f by Jim Stichnoth

Subzero: Fix unittest build dependencies.

The unittest .o files also depend on some of the llvm2ice headers, as well as the unittest headers. To reproduce the problem, try this: make -f Makefile.standalone clean make -f Makefile.standalone check-unit 2>/dev/null | grep BitcodeMunge.cpp This will print a line containing BitcodeMunge.cpp. Now do: touch unittest/BitcodeMunge.h make -f Makefile.standalone check-unit 2>/dev/null | grep BitcodeMunge.cpp This should print a line, but it doesn't. Finally: touch src/PNaClTranslator.h make -f Makefile.standalone check-unit 2>/dev/null | grep BitcodeMunge.cpp This should also print a line, but it doesn't. With this patch, the unittest files get rebuilt after header file changes. BUG= none R=jvoung@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/895143003
parent 77973ccd
...@@ -165,7 +165,8 @@ $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS) ...@@ -165,7 +165,8 @@ $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -lgtest -lgtest_main -ldl \ $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -lgtest -lgtest_main -ldl \
-Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
$(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \
unittest/*.h src/*.h src/*.def
$(CXX) -c $(CXXFLAGS) \ $(CXX) -c $(CXXFLAGS) \
-Isrc/ \ -Isrc/ \
-I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \ -I$(LLVM_SRC_PATH)/utils/unittest/googletest/include \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment