OSDN Git Service

Subzero: Improve "make check-unit" execution.
authorJim Stichnoth <stichnot@chromium.org>
Tue, 21 Apr 2015 22:05:22 +0000 (15:05 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Tue, 21 Apr 2015 22:05:22 +0000 (15:05 -0700)
If you switch between "cmake" and "autoconf" toolchain builds, and
neglect to clean out pnacl_newlib_raw/ in between, the wrong libgtest
and libgtest_main may get pulled in for the autoconf build, leading to
an assertion failure in "make check-unit".

This tweak fixes that problem by rejiggering the lib search path.

BUG= none
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/1099093005

Makefile.standalone

index b98e047..85a00e0 100644 (file)
@@ -248,8 +248,8 @@ $(SB_OBJS): $(SB_OBJDIR)/%.o: src/%.cpp src/*.h src/*.def
        $(SB_CXX) -c $(SB_CXXFLAGS) $< -o $@
 
 $(OBJDIR)/run_unittests: $(UNITTEST_OBJS) $(UNITTEST_LIB_OBJS)
-       $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \
-               $(GTEST_LIB_PATH) -lgtest -lgtest_main -ldl \
+       $(CXX) $(GTEST_LIB_PATH) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) \
+               -lgtest -lgtest_main -ldl \
                -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib)
 
 $(UNITTEST_OBJS): $(OBJDIR)/unittest/%.o: unittest/%.cpp \