diff --git a/polly/test/CMakeLists.txt b/polly/test/CMakeLists.txt index 7d7f781e09ab..c433ebe881de 100644 --- a/polly/test/CMakeLists.txt +++ b/polly/test/CMakeLists.txt @@ -33,14 +33,6 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR) set(POLLY_LIB_DIR "${LLVM_LIBS_DIR}") endif (NOT DEFINED LLVM_MAIN_SRC_DIR) -MESSAGE(${TARGET_TRIPLE}) -if (${TARGET_TRIPLE} MATCHES "^x86_64*") - set(EAT_ERR_ON_X86 " ") -else (${TARGET_TRIPLE} MATCHES "^x86_64*") - # Don't fail the command line - set(EAT_ERR_ON_X86 "|| echo \"error is eaten\"") -endif (${TARGET_TRIPLE} MATCHES "^x86_64*") - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg) diff --git a/polly/test/lit.site.cfg.in b/polly/test/lit.site.cfg.in index 9f366caa1d8d..853b7e976c08 100644 --- a/polly/test/lit.site.cfg.in +++ b/polly/test/lit.site.cfg.in @@ -9,6 +9,12 @@ config.polly_lib_dir = "@POLLY_LIB_DIR@" config.target_triple = "@TARGET_TRIPLE@" lit.params['build_config'] = "@POLLY_SOURCE_DIR@/test" +## Check the current platform with regex +import re +EAT_ERR_ON_X86 = ' ' +if (re.match(r'^x86_64*', '@TARGET_TRIPLE@') == None) : + EAT_ERR_ON_X86 = '|| echo \"error is eaten\"' + # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. try: @@ -22,7 +28,7 @@ config.substitutions.append(('%loadPolly', '-load ' + 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 ')) -config.substitutions.append(('%EatErrOnX86', '@EAT_ERR_ON_X86@')) +config.substitutions.append(('%EatErrOnX86', EAT_ERR_ON_X86)) # Let the main config do the real work. lit.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")