[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 09:52:35 PST 2024


================
@@ -226,3 +226,26 @@
 //
 // RUN: HOME=%S/Inputs/config %clang -### --config-user-dir=~ -v 2>&1 | FileCheck %s --check-prefix=CHECK-TILDE
 // CHECK-TILDE: User configuration file directory: {{.*}}/Inputs/config
+
+//--- Fallback to stripping OS versions
+//
+// RUN: touch %t/testdmode/x86_64-apple-darwin23.6.0-clang.cfg
+// RUN: touch %t/testdmode/x86_64-apple-darwin23-clang.cfg
+// RUN: touch %t/testdmode/x86_64-apple-darwin-clang.cfg
+// RUN: %clang -target x86_64-apple-darwin23.6.0 --config-system-dir=%t/testdmode --config-user-dir= -no-canonical-prefixes --version 2>&1 | FileCheck %s -check-prefix DARWIN --implicit-check-not 'Configuration file:'
----------------
MaskRay wrote:

Prefer `--target=`. `-target ` has been deprecated for a long time.

No need to have `^//$` lines.

https://github.com/llvm/llvm-project/pull/111387


More information about the cfe-commits mailing list