Off-tree build support: Set the path of Polly's library correctly.

llvm-svn: 152924
This commit is contained in:
Hongbin Zheng 2012-03-16 14:34:20 +00:00
parent 33254d1edf
commit c7584ff270
2 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
set(LLVM_BINARY_DIR "${LLVM_INSTALL_ROOT}")
set(LLVM_TOOLS_DIR "${LLVM_INSTALL_ROOT}/bin")
set(LLVM_LIBS_DIR "${LLVM_INSTALL_ROOT}/lib")
set(POLLY_LIB_DIR "${POLLY_BINARY_DIR}/lib")
else (NOT DEFINED LLVM_MAIN_SRC_DIR)
set(LLVM_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit)
set(POLLY_TEST_DEPS opt lli LLVMPolly FileCheck not)
@ -29,6 +30,7 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR)
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}")
set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/")
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib")
set(POLLY_LIB_DIR "${LLVM_LIBS_DIR}")
endif (NOT DEFINED LLVM_MAIN_SRC_DIR)
configure_file(

View File

@ -5,6 +5,7 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.polly_obj_root = "@POLLY_BINARY_DIR@"
config.polly_lib_dir = "@POLLY_LIB_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
lit.params['build_config'] = "@POLLY_SOURCE_DIR@/test"
@ -18,7 +19,7 @@ except KeyError,e:
lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
config.substitutions.append(('%loadPolly', '-load '
+ config.llvm_libs_dir + '/LLVMPolly@LLVM_SHLIBEXT@'))
+ config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'))
config.substitutions.append(('%defaultOpts', ' -basicaa -polly-prepare -polly-region-simplify -scev-aa '))
config.substitutions.append(('%polybenchOpts', ' -O3 -loop-simplify -indvars '))