Skip to content

Conversation

@Sirraide
Copy link
Member

#143514 broke the clang-solaris11-sparcv9 bot; from what I can tell that’s Solaris and according to SolarisTargetInfo::getOSDefines, the macro __sun__ should be defined on Solaris, so check for that and don’t try to query the terminal size if it is defined.

Not sure this is the best solution but hopefully it fixes the bot.

@llvmbot
Copy link
Member

llvmbot commented Jun 17, 2025

@llvm/pr-subscribers-llvm-support

Author: None (Sirraide)

Changes

#143514 broke the clang-solaris11-sparcv9 bot; from what I can tell that’s Solaris and according to SolarisTargetInfo::getOSDefines, the macro __sun__ should be defined on Solaris, so check for that and don’t try to query the terminal size if it is defined.

Not sure this is the best solution but hopefully it fixes the bot.


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

1 Files Affected:

  • (modified) llvm/lib/Support/Unix/Process.inc (+1-1)
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc
index db735b7484ad8..c6e79af44b9b4 100644
--- a/llvm/lib/Support/Unix/Process.inc
+++ b/llvm/lib/Support/Unix/Process.inc
@@ -320,7 +320,7 @@ static unsigned getColumns(int FileID) {
   // instead if it isn't available.
   unsigned Columns = 0;
 
-#ifdef HAVE_SYS_IOCTL_H
+#if defined(HAVE_SYS_IOCTL_H) && !defined(__sun__)
   struct winsize ws;
   if (ioctl(FileID, TIOCGWINSZ, &ws) == 0)
     Columns = ws.ws_col;

@Sirraide Sirraide merged commit 9ae4d2e into llvm:main Jun 17, 2025
7 of 9 checks passed
@Sirraide Sirraide deleted the fix-solaris-build branch June 17, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants