diff options
Diffstat (limited to 'lldb/examples/functions')
| -rw-r--r-- | lldb/examples/functions/Makefile | 10 | ||||
| -rw-r--r-- | lldb/examples/functions/main.cpp | 13 |
2 files changed, 20 insertions, 3 deletions
diff --git a/lldb/examples/functions/Makefile b/lldb/examples/functions/Makefile index 13d83dfdc5c..64ea6e75b33 100644 --- a/lldb/examples/functions/Makefile +++ b/lldb/examples/functions/Makefile @@ -2,11 +2,15 @@ LEVEL = ../../test/make CXX_SOURCES := main.cpp +EXE := lldb-functions +USE_LIBCPP := 1 + MY_OS = $(shell uname -s) -CXXFLAGS += -std=gnu++11 -stdlib=libc++ + ifeq "$(MY_OS)" "Darwin" - LD_EXTRAS ?= -framework LLDB -Wl,-rpath,/Applications/Xcode.app/Contents/SharedFrameworks - FRAMEWORK_INCLUDES=-F/Applications/Xcode.app/Contents/SharedFrameworks + LLDB_BUILD_DIR ?= /Applications/Xcode.app/Contents/SharedFrameworks + LD_EXTRAS ?= -framework LLDB -Wl,-rpath,"$(LLDB_BUILD_DIR)" + FRAMEWORK_INCLUDES=-F"$(LLDB_BUILD_DIR)" else LD_EXTRAS ?= $(LLDB_BUILD_DIR)/_lldb.so endif diff --git a/lldb/examples/functions/main.cpp b/lldb/examples/functions/main.cpp index fd599832c72..3f27b3993ac 100644 --- a/lldb/examples/functions/main.cpp +++ b/lldb/examples/functions/main.cpp @@ -10,7 +10,20 @@ #include <stdint.h> #include <stdlib.h> +#if defined(__APPLE__) #include <LLDB/LLDB.h> +#else +#include "LLDB/SBBlock.h" +#include "LLDB/SBCompileUnit.h" +#include "LLDB/SBDebugger.h" +#include "LLDB/SBFunction.h" +#include "LLDB/SBModule.h" +#include "LLDB/SBStream.h" +#include "LLDB/SBSymbol.h" +#include "LLDB/SBTarget.h" +#include "LLDB/SBThread.h" +#include "LLDB/SBProcess.h" +#endif using namespace lldb; |

