[llvm] [MC] Update '-mcpu=native' test to be Linux only. (PR #159838)

Cameron McInally via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 12:43:24 PDT 2025


https://github.com/mcinally updated https://github.com/llvm/llvm-project/pull/159838

>From 1c0180e2586950f13ae2e0a511ed8f16b98e6878 Mon Sep 17 00:00:00 2001
From: Cameron McInally <cmcinally at nvidia.com>
Date: Fri, 19 Sep 2025 11:58:14 -0700
Subject: [PATCH] [MC] Update '-mcpu=native' test to be Linux only.

llvm::sys::getHostCPUName() and llvm::sys::getHostCPUFeatures() appear to need
special cases for _WIN32 on X86 (similar to the existing _WIN32 on ARM special
cases) to restrict what CPUs and Features are available with that OS.

For now, limit this test to Linux systems only, as this test does not check
very much being that it is sensitve to the Host machine.

Originally #159414.
---
 llvm/test/MC/AsmParser/native.s | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/test/MC/AsmParser/native.s b/llvm/test/MC/AsmParser/native.s
index 4da5b3717913f..d301a93a185c2 100644
--- a/llvm/test/MC/AsmParser/native.s
+++ b/llvm/test/MC/AsmParser/native.s
@@ -1,3 +1,4 @@
+# REQUIRES: system-linux
 # RUN: llvm-mc -filetype=obj -o %t -mcpu=native %s 2> %t.stderr
 # RUN: FileCheck --allow-empty %s < %t.stderr
 



More information about the llvm-commits mailing list