Index: test/lit.cfg =================================================================== --- test/lit.cfg +++ test/lit.cfg @@ -333,10 +333,11 @@ else: config.available_features.add("nozlib") -# Native compilation: host arch == target arch +# Native compilation: host arch == target arch and native backend built-in # FIXME: Consider cases that target can be executed # even if host_triple were different from target_triple. -if config.host_triple == config.target_triple: +if config.host_triple == config.target_triple and \ + config.native_target in config.targets_to_build: config.available_features.add("native") import subprocess Index: test/lit.site.cfg.in =================================================================== --- test/lit.site.cfg.in +++ test/lit.site.cfg.in @@ -23,6 +23,7 @@ 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_arch = "@HOST_ARCH@"