diff --git a/mlir/examples/standalone/test/lit.cfg.py b/mlir/examples/standalone/test/lit.cfg.py --- a/mlir/examples/standalone/test/lit.cfg.py +++ b/mlir/examples/standalone/test/lit.cfg.py @@ -30,7 +30,6 @@ config.test_exec_root = os.path.join(config.standalone_obj_root, 'test') config.substitutions.append(('%PATH%', config.environment['PATH'])) -config.substitutions.append(('%shlibext', config.llvm_shlib_ext)) llvm_config.with_system_environment( ['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP']) @@ -54,11 +53,10 @@ 'standalone-capi-test', 'standalone-opt', 'standalone-translate', - ToolSubst('%PYTHON', config.python_executable, unresolved='ignore'), ] llvm_config.add_tool_substitutions(tools, tool_dirs) llvm_config.with_environment('PYTHONPATH', [ - os.path.join(config.mlir_binary_dir, 'python_packages', 'standalone'), + os.path.join(config.mlir_obj_dir, 'python_packages', 'standalone'), ], append_path=True) diff --git a/mlir/examples/standalone/test/lit.site.cfg.py.in b/mlir/examples/standalone/test/lit.site.cfg.py.in --- a/mlir/examples/standalone/test/lit.site.cfg.py.in +++ b/mlir/examples/standalone/test/lit.site.cfg.py.in @@ -1,36 +1,10 @@ @LIT_SITE_CFG_IN_HEADER@ -import sys - -config.host_triple = "@LLVM_HOST_TRIPLE@" -config.target_triple = "@LLVM_TARGET_TRIPLE@" -config.llvm_src_root = "@LLVM_SOURCE_DIR@" -config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") -config.llvm_lib_dir = lit_config.substitute("@LLVM_LIBS_DIR@") -config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@") -config.llvm_shlib_ext = "@SHLIBEXT@" -config.llvm_exe_ext = "@EXEEXT@" config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" -config.mlir_binary_dir = "@MLIR_BINARY_DIR@" +config.mlir_obj_dir = "@MLIR_BINARY_DIR@" config.python_executable = "@Python3_EXECUTABLE@" config.enable_bindings_python = @MLIR_ENABLE_BINDINGS_PYTHON@ -config.gold_executable = "@GOLD_EXECUTABLE@" -config.ld64_executable = "@LD64_EXECUTABLE@" -config.enable_shared = @ENABLE_SHARED@ -config.enable_assertions = @ENABLE_ASSERTIONS@ -config.targets_to_build = "@TARGETS_TO_BUILD@" -config.native_target = "@LLVM_NATIVE_ARCH@" -config.llvm_bindings = "@LLVM_BINDINGS@".split(' ') -config.host_os = "@HOST_OS@" -config.host_cc = "@HOST_CC@" -config.host_cxx = "@HOST_CXX@" -config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@" -# Note: ldflags can contain double-quoted paths, so must use single quotes here. -config.host_ldflags = '@HOST_LDFLAGS@' -config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" -config.llvm_host_triple = '@LLVM_HOST_TRIPLE@' -config.host_arch = "@HOST_ARCH@" config.standalone_src_root = "@CMAKE_SOURCE_DIR@" config.standalone_obj_root = "@CMAKE_BINARY_DIR@" diff --git a/mlir/examples/standalone/test/python/smoketest.py b/mlir/examples/standalone/test/python/smoketest.py --- a/mlir/examples/standalone/test/python/smoketest.py +++ b/mlir/examples/standalone/test/python/smoketest.py @@ -1,4 +1,4 @@ -# RUN: %PYTHON %s | FileCheck %s +# RUN: %python %s | FileCheck %s from mlir_standalone.ir import * from mlir_standalone.dialects import (