smurfd created this revision. smurfd added a reviewer: LLDB. Herald added a subscriber: krytarowski. Herald added a project: All. smurfd requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
I got build error on ma m1 `lldb/source/Host/common/OptionParser.cpp:46:10: error: use of undeclared identifier 'getopt_long_only'; did you mean 'getopt_long'?` this patch fixes that, two includes needed and also check if `__APPLE__`. after that building works. Please set reviewers correct if its not correct, first patch Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151570 Files: lldb/include/lldb/Host/common/GetOptInc.h lldb/source/Host/common/OptionParser.cpp lldb/tools/lldb-server/lldb-platform.cpp Index: lldb/tools/lldb-server/lldb-platform.cpp =================================================================== --- lldb/tools/lldb-server/lldb-platform.cpp +++ lldb/tools/lldb-server/lldb-platform.cpp @@ -36,6 +36,7 @@ #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" +#include "lldb/Host/common/GetOptInc.h" using namespace lldb; using namespace lldb_private; Index: lldb/source/Host/common/OptionParser.cpp =================================================================== --- lldb/source/Host/common/OptionParser.cpp +++ lldb/source/Host/common/OptionParser.cpp @@ -10,7 +10,7 @@ #include "lldb/Host/HostGetOpt.h" #include "lldb/Utility/OptionDefinition.h" #include "lldb/lldb-private-types.h" - +#include "lldb/Host/common/GetOptInc.h" #include <vector> using namespace lldb_private; Index: lldb/include/lldb/Host/common/GetOptInc.h =================================================================== --- lldb/include/lldb/Host/common/GetOptInc.h +++ lldb/include/lldb/Host/common/GetOptInc.h @@ -15,7 +15,7 @@ #define REPLACE_GETOPT #define REPLACE_GETOPT_LONG #endif -#if defined(_MSC_VER) || defined(__NetBSD__) +#if defined(_MSC_VER) || defined(__NetBSD__) || defined(__APPLE__) #define REPLACE_GETOPT_LONG_ONLY #endif
Index: lldb/tools/lldb-server/lldb-platform.cpp =================================================================== --- lldb/tools/lldb-server/lldb-platform.cpp +++ lldb/tools/lldb-server/lldb-platform.cpp @@ -36,6 +36,7 @@ #include "lldb/Host/common/TCPSocket.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" +#include "lldb/Host/common/GetOptInc.h" using namespace lldb; using namespace lldb_private; Index: lldb/source/Host/common/OptionParser.cpp =================================================================== --- lldb/source/Host/common/OptionParser.cpp +++ lldb/source/Host/common/OptionParser.cpp @@ -10,7 +10,7 @@ #include "lldb/Host/HostGetOpt.h" #include "lldb/Utility/OptionDefinition.h" #include "lldb/lldb-private-types.h" - +#include "lldb/Host/common/GetOptInc.h" #include <vector> using namespace lldb_private; Index: lldb/include/lldb/Host/common/GetOptInc.h =================================================================== --- lldb/include/lldb/Host/common/GetOptInc.h +++ lldb/include/lldb/Host/common/GetOptInc.h @@ -15,7 +15,7 @@ #define REPLACE_GETOPT #define REPLACE_GETOPT_LONG #endif -#if defined(_MSC_VER) || defined(__NetBSD__) +#if defined(_MSC_VER) || defined(__NetBSD__) || defined(__APPLE__) #define REPLACE_GETOPT_LONG_ONLY #endif
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits