Index: llvm/test/CodeGen/Generic/lit.local.cfg =================================================================== --- llvm/test/CodeGen/Generic/lit.local.cfg +++ llvm/test/CodeGen/Generic/lit.local.cfg @@ -1,3 +1,3 @@ -if 'native' not in config.available_features: +if 'native-arch' not in config.available_features: config.unsupported = True Index: llvm/test/CodeGen/MIR/Generic/lit.local.cfg =================================================================== --- llvm/test/CodeGen/MIR/Generic/lit.local.cfg +++ llvm/test/CodeGen/MIR/Generic/lit.local.cfg @@ -1,3 +1,3 @@ -if 'native' not in config.available_features: +if 'native-arch' not in config.available_features: config.unsupported = True Index: llvm/test/DebugInfo/lit.local.cfg =================================================================== --- llvm/test/DebugInfo/lit.local.cfg +++ llvm/test/DebugInfo/lit.local.cfg @@ -1,3 +1,3 @@ -if 'native' not in config.available_features: +if 'native-arch' not in config.available_features: config.unsupported = True Index: llvm/test/Feature/optnone-llc.ll =================================================================== --- llvm/test/Feature/optnone-llc.ll +++ llvm/test/Feature/optnone-llc.ll @@ -4,7 +4,7 @@ ; RUN: llc -O3 -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-Ox ; RUN: llc -misched-postra -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-MORE -; REQUIRES: asserts, native +; REQUIRES: asserts, native-arch ; This test verifies that we don't run Machine Function optimizations ; on optnone functions. Index: llvm/test/Feature/optnone.ll =================================================================== --- llvm/test/Feature/optnone.ll +++ llvm/test/Feature/optnone.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llvm-dis | FileCheck %s -; REQUIRE: native +; REQUIRE: native-arch ; Check for the presence of attribute optnone in the disassembly. Index: llvm/test/Linker/subprogram-linkonce-weak.ll =================================================================== --- llvm/test/Linker/subprogram-linkonce-weak.ll +++ llvm/test/Linker/subprogram-linkonce-weak.ll @@ -1,4 +1,4 @@ -; REQUIRES: native +; REQUIRES: native-arch ; RUN: llvm-link %s %S/Inputs/subprogram-linkonce-weak.ll -S -o %t1 ; RUN: FileCheck %s -check-prefix=LW -check-prefix=CHECK <%t1 ; RUN: llvm-link %S/Inputs/subprogram-linkonce-weak.ll %s -S -o %t2 Index: llvm/test/Linker/type-unique-odr-a.ll =================================================================== --- llvm/test/Linker/type-unique-odr-a.ll +++ llvm/test/Linker/type-unique-odr-a.ll @@ -1,4 +1,4 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission, native-arch ; ; RUN: llvm-link %s %p/type-unique-odr-b.ll -S -o - | %llc_dwarf -dwarf-linkage-names=Enable -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; Index: llvm/test/Linker/type-unique-simple-a.ll =================================================================== --- llvm/test/Linker/type-unique-simple-a.ll +++ llvm/test/Linker/type-unique-simple-a.ll @@ -1,4 +1,4 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission, native-arch ; RUN: llvm-link %s %p/type-unique-simple-b.ll -S -o %t ; RUN: cat %t | FileCheck %s -check-prefix=LINK Index: llvm/test/Linker/type-unique-simple2-a.ll =================================================================== --- llvm/test/Linker/type-unique-simple2-a.ll +++ llvm/test/Linker/type-unique-simple2-a.ll @@ -1,4 +1,4 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission, native-arch ; ; RUN: llvm-link %s %p/type-unique-simple2-b.ll -S -o - | %llc_dwarf -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; Index: llvm/test/Linker/type-unique-simple2.ll =================================================================== --- llvm/test/Linker/type-unique-simple2.ll +++ llvm/test/Linker/type-unique-simple2.ll @@ -1,4 +1,4 @@ -; REQUIRES: object-emission; native +; REQUIRES: object-emission, native-arch ; RUN: llvm-link %S/Inputs/type-unique-simple2-a.ll %S/Inputs/type-unique-simple2-b.ll -S -o %t ; RUN: cat %t | FileCheck %S/Inputs/type-unique-simple2-a.ll -check-prefix=LINK Index: llvm/test/Linker/type-unique-type-array-a.ll =================================================================== --- llvm/test/Linker/type-unique-type-array-a.ll +++ llvm/test/Linker/type-unique-type-array-a.ll @@ -1,4 +1,4 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission, native-arch ; ; RUN: llvm-link %s %p/type-unique-type-array-b.ll -S -o - | %llc_dwarf -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; Index: llvm/test/Other/2010-05-06-Printer.ll =================================================================== --- llvm/test/Other/2010-05-06-Printer.ll +++ llvm/test/Other/2010-05-06-Printer.ll @@ -1,4 +1,4 @@ -; REQUIRES: native +; REQUIRES: native-arch ; RUN: llc -O2 -print-after-all < %s 2>/dev/null define void @tester(){ Index: llvm/test/lit.cfg =================================================================== --- llvm/test/lit.cfg +++ llvm/test/lit.cfg @@ -340,13 +340,20 @@ else: config.available_features.add("nozlib") -# Native compilation: host arch == target arch and native backend built-in -# FIXME: Consider cases that target can be executed +# Native compilation: Objects compiled for target will run on the host. +# We approximate this with: host triple == target triple. +# FIXME: Consider cases that target can be executed on the host # even if host_triple were different from target_triple. -if (config.host_triple == config.target_triple and - config.native_target in config.targets_to_build): +# For example host == x86_64-linux and target == i686-linux. +if config.host_triple == config.target_triple: config.available_features.add("native") +# Native architecture: Host arch is one of the included targets. +# This is for tools like llc where the default target is the host +# but we don't require the result to be executable on the host. +if config.native_target in config.targets_to_build: + config.available_features.add("native-arch") + import subprocess def have_ld_plugin_support(): Index: llvm/test/tools/llvm-mc/fatal_warnings.test =================================================================== --- llvm/test/tools/llvm-mc/fatal_warnings.test +++ llvm/test/tools/llvm-mc/fatal_warnings.test @@ -1,6 +1,6 @@ # RUN: not llvm-mc --fatal-warnings %s 2>&1 | FileCheck %s # XFAIL: hexagon -# REQUIRES: native +# REQUIRES: native-arch # CHECK: error: .warning directive invoked in source file .warning Index: llvm/test/tools/llvm-mc/line_end_with_space.test =================================================================== --- llvm/test/tools/llvm-mc/line_end_with_space.test +++ llvm/test/tools/llvm-mc/line_end_with_space.test @@ -1,2 +1,2 @@ RUN: llvm-mc -disassemble %s -# REQUIRES: native +# REQUIRES: native-arch Index: llvm/test/tools/llvm-mc/no_warnings.test =================================================================== --- llvm/test/tools/llvm-mc/no_warnings.test +++ llvm/test/tools/llvm-mc/no_warnings.test @@ -1,6 +1,6 @@ # RUN: llvm-mc --no-warn %s 2>&1 | FileCheck %s # XFAIL: hexagon -# REQUIRES: native +# REQUIRES: native-arch # CHECK-NOT: warning: .warning