Skip to content

Commit

Permalink
Automerge: [lldb][AIX] Some base #if _AIX changes of a minimal lldb b…
Browse files Browse the repository at this point in the history
…uild (#120979)

This PR is in reference to porting LLDB on AIX.

Link to discussions on llvm discourse and github:

1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640
2. llvm/llvm-project#101657
The complete changes for porting are present in this draft PR:
llvm/llvm-project#102601

Added some base #if _AIX changes for minimal lldb build.
Added a PR for clang-format changes separately, to rebase this on later:

- llvm/llvm-project#120978

Review Request: @labath @DavidSpickett
  • Loading branch information
DhruvSrivastavaX authored and github-actions[bot] committed Jan 10, 2025
2 parents 553467f + 18de1db commit 579cfb0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,9 +730,19 @@ ConnectionStatus ConnectionFileDescriptor::ConnectFile(
struct termios options;
::tcgetattr(fd, &options);

// Set port speed to maximum
// Set port speed to the available maximum
#ifdef B115200
::cfsetospeed(&options, B115200);
::cfsetispeed(&options, B115200);
#elif B57600
::cfsetospeed(&options, B57600);
::cfsetispeed(&options, B57600);
#elif B38400
::cfsetospeed(&options, B38400);
::cfsetispeed(&options, B38400);
#else
#error "Maximum Baud rate is Unknown"
#endif

// Raw input, disable echo and signals
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/Language/ObjC/Cocoa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ bool lldb_private::formatters::ObjCSELSummaryProvider(
time_t lldb_private::formatters::GetOSXEpoch() {
static time_t epoch = 0;
if (!epoch) {
#ifndef _WIN32
#if !defined(_WIN32) && !defined(_AIX)
tzset();
tm tm_epoch;
tm_epoch.tm_sec = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "ObjectContainerBSDArchive.h"

#if defined(_WIN32) || defined(__ANDROID__)
#if defined(_WIN32) || defined(__ANDROID__) || defined(_AIX)
// Defines from ar, missing on Windows
#define SARMAG 8
#define ARFMAG "`\n"
Expand Down

0 comments on commit 579cfb0

Please sign in to comment.