Author: flackr Date: Mon Apr 20 13:07:55 2015 New Revision: 235320 URL: http://llvm.org/viewvc/llvm-project?rev=235320&view=rev Log: Allow specifying tool path/prefix for tests with CROSS_COMPILE.
CROSS_COMPILE environment variable is a common convention to specify the path and/or prefix to cross compilation tools (e.g. ar, objcopy). Test Plan: dotest.py $DOTEST_OPTS -t -p 'TestBSDArchives.py|TestBreakpointCommandsFromPython.py|TestFormats.py|TestObjCDynamicValue.py' All of these tests now compile successfully and pass running macosx -> linux using a cross compilation toolchain prefixed by CROSS_COMPILE without requiring changing your PATH. They still pass when run locally on macosx. Differential Revision: http://reviews.llvm.org/D9072 Modified: lldb/trunk/test/make/Makefile.rules Modified: lldb/trunk/test/make/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=235320&r1=235319&r2=235320&view=diff ============================================================================== --- lldb/trunk/test/make/Makefile.rules (original) +++ lldb/trunk/test/make/Makefile.rules Mon Apr 20 13:07:55 2015 @@ -14,9 +14,10 @@ # # Also might be of interest: # FRAMEWORK_INCLUDES (Darwin only) := -# CFLAGS_EXTRAS += +# CFLAGS_EXTRAS := # LD_EXTRAS := # SPLIT_DEBUG_SYMBOLS := YES +# CROSS_COMPILE := # # And test/functionalities/archives/Makefile: # MAKE_DSYM := NO @@ -84,9 +85,10 @@ ifeq "$(OS)" "Darwin" DS := $(shell xcrun -find -toolchain default dsymutil) DSFLAGS = DSYM = $(EXE).dSYM - AR := libtool + AR := $(CROSS_COMPILE)libtool ARFLAGS := -static -o else + AR := $(CROSS_COMPILE)ar # On non-Apple platforms, -arch becomes -m ARCHFLAG := -m @@ -188,7 +190,7 @@ cxx_linker_notdir = $(if $(findstring cl $(subst cc,c++,$(1)))))) cxx_linker = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_linker_notdir,$(notdir $(1)))),$(call cxx_linker_notdir,$(1))) -OBJCOPY = objcopy +OBJCOPY := $(CROSS_COMPILE)objcopy #---------------------------------------------------------------------- # Windows specific options _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
