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

Steven Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 9 09:31:36 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:'
----------------
cachemeifyoucan wrote:

It actually spells `-target` for Darwin. 

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


More information about the cfe-commits mailing list