Skip to content

Commit eba7690

Browse files
[lldb][AIX] GetOpt support in AIX (#120574)
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. #101657 The complete changes for porting are present in this draft PR: #102601 Adding changes for minimal build for lldb binary on AIX. getopt.h is missing in AIX, so instead relying on LLDB's getopt functions.
1 parent db84ae3 commit eba7690

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lldb/include/lldb/Host/HostGetOpt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#ifndef LLDB_HOST_HOSTGETOPT_H
1010
#define LLDB_HOST_HOSTGETOPT_H
1111

12-
#if !defined(_MSC_VER) && !defined(__NetBSD__)
12+
#if !defined(_MSC_VER) && !defined(__NetBSD__) && !defined(_AIX)
1313

1414
#include <getopt.h>
1515
#include <unistd.h>

lldb/include/lldb/Host/common/GetOptInc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
#include "lldb/lldb-defines.h"
1313

14-
#if defined(_MSC_VER)
14+
#if defined(_MSC_VER) || defined(_AIX)
1515
#define REPLACE_GETOPT
1616
#define REPLACE_GETOPT_LONG
1717
#endif
18-
#if defined(_MSC_VER) || defined(__NetBSD__)
18+
#if defined(_MSC_VER) || defined(__NetBSD__) || defined(_AIX)
1919
#define REPLACE_GETOPT_LONG_ONLY
2020
#endif
2121

0 commit comments

Comments
 (0)