diff --git a/tools/lli/ChildTarget/CMakeLists.txt b/tools/lli/ChildTarget/CMakeLists.txt index 6191fd60166..50f114d9561 100644 --- a/tools/lli/ChildTarget/CMakeLists.txt +++ b/tools/lli/ChildTarget/CMakeLists.txt @@ -1,4 +1,5 @@ set(LLVM_LINK_COMPONENTS support) +add_definitions(-DLLI_BUILDING_CHILD) add_llvm_executable(lli-child-target ChildTarget.cpp diff --git a/tools/lli/ChildTarget/Makefile b/tools/lli/ChildTarget/Makefile index eff49c9f1cf..35a354156c3 100644 --- a/tools/lli/ChildTarget/Makefile +++ b/tools/lli/ChildTarget/Makefile @@ -12,8 +12,10 @@ TOOLNAME := lli-child-target include $(LEVEL)/Makefile.config -LINK_COMPONENTS := +LINK_COMPONENTS := support -SOURCES += ../RemoteTarget.cpp +CXXFLAGS += -DLLI_BUILDING_CHILD + +SOURCES := ChildTarget.cpp ../RemoteTarget.cpp include $(LLVM_SRC_ROOT)/Makefile.rules diff --git a/tools/lli/RemoteTarget.cpp b/tools/lli/RemoteTarget.cpp index f07534d161a..c3195e2154c 100644 --- a/tools/lli/RemoteTarget.cpp +++ b/tools/lli/RemoteTarget.cpp @@ -22,6 +22,8 @@ using namespace llvm; +#ifndef LLI_BUILDING_CHILD + // Static methods RemoteTarget *RemoteTarget::createRemoteTarget() { return new RemoteTarget; @@ -43,6 +45,7 @@ bool RemoteTarget::hostSupportsExternalRemoteTarget() { #endif } +#endif //////////////////////////////////////////////////////////////////////////////// // Simulated remote execution