Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Driver] Add riscv64-suse-linux triple #74513

Closed
wants to merge 1 commit into from
Closed

[Driver] Add riscv64-suse-linux triple #74513

wants to merge 1 commit into from

Conversation

andreas-schwab
Copy link
Contributor

Fixes: 72256

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Dec 5, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 5, 2023

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Andreas Schwab (andreas-schwab)

Changes

Fixes: 72256


Full diff: https://github.com/llvm/llvm-project/pull/74513.diff

1 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Gnu.cpp (+2-1)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index b875991844fff..00269e2d52e1c 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2423,7 +2423,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
   static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
   static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
                                                "riscv64-linux-gnu",
-                                               "riscv64-unknown-elf"};
+                                               "riscv64-unknown-elf",
+                                               "riscv64-suse-linux"};
 
   static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
   static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",

Copy link

github-actions bot commented Dec 5, 2023

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 3d21b5603835fcd1de8d0565c3324e36fed21ff1 b5bc870a7609629672f5d7a0758941f61c25115d -- clang/lib/Driver/ToolChains/Gnu.cpp
View the diff from clang-format here.
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 00269e2d52..b6a2700881 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2421,10 +2421,9 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
                                                "riscv32-linux-gnu",
                                                "riscv32-unknown-elf"};
   static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
-  static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
-                                               "riscv64-linux-gnu",
-                                               "riscv64-unknown-elf",
-                                               "riscv64-suse-linux"};
+  static const char *const RISCV64Triples[] = {
+      "riscv64-unknown-linux-gnu", "riscv64-linux-gnu", "riscv64-unknown-elf",
+      "riscv64-suse-linux"};
 
   static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
   static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",

@MaskRay
Copy link
Member

MaskRay commented Dec 6, 2023

Sorry for causing you trouble but I think removing special cases from these static const char *const XXXXXXXTriples[] is intentional and we shall not add special cases for vendors. See #72256 (comment)

@andreas-schwab
Copy link
Contributor Author

This breaks valid use cases.

@andreas-schwab andreas-schwab closed this by deleting the head repository Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants