aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Transforms/Hello/Android.mk4
-rw-r--r--tools/bugpoint-passes/Android.mk3
-rw-r--r--tools/bugpoint/Android.mk4
-rw-r--r--tools/opt/Android.mk4
4 files changed, 15 insertions, 0 deletions
diff --git a/lib/Transforms/Hello/Android.mk b/lib/Transforms/Hello/Android.mk
index e2d6163..6a09237 100644
--- a/lib/Transforms/Hello/Android.mk
+++ b/lib/Transforms/Hello/Android.mk
@@ -13,6 +13,10 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(transforms_hello_SRC_FILES)
LOCAL_MODULE:= LLVMHello
+ifeq ($(HOST_OS),darwin)
+LOCAL_LDFLAGS := -Wl,-undefined -Wl,dynamic_lookup
+endif
+
LOCAL_MODULE_TAGS := optional
include $(LLVM_HOST_BUILD_MK)
diff --git a/tools/bugpoint-passes/Android.mk b/tools/bugpoint-passes/Android.mk
index 51b35c7..bd09c69 100644
--- a/tools/bugpoint-passes/Android.mk
+++ b/tools/bugpoint-passes/Android.mk
@@ -15,6 +15,9 @@ LOCAL_MODULE := BugpointPasses
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := SHARED_LIBRARIES # needed for tblgen
+ifeq ($(HOST_OS),darwin)
+LOCAL_LDFLAGS := -Wl,-undefined -Wl,dynamic_lookup
+endif
include $(LLVM_HOST_BUILD_MK)
include $(LLVM_GEN_INTRINSICS_MK)
diff --git a/tools/bugpoint/Android.mk b/tools/bugpoint/Android.mk
index 752972a..393851f 100644
--- a/tools/bugpoint/Android.mk
+++ b/tools/bugpoint/Android.mk
@@ -52,7 +52,11 @@ LOCAL_SRC_FILES := $(bugpoint_SRC_FILES)
LOCAL_STATIC_LIBRARIES := $(bugpoint_STATIC_LIBRARIES)
LOCAL_LDLIBS += -lpthread -lm -ldl
+ifeq ($(HOST_OS),darwin)
+LOCAL_LDFLAGS += -Wl,-export_dynamic
+else
LOCAL_LDFLAGS += -Wl,--export-dynamic
+endif
include $(LLVM_ROOT_PATH)/llvm.mk
include $(LLVM_HOST_BUILD_MK)
diff --git a/tools/opt/Android.mk b/tools/opt/Android.mk
index 3c6a494..4c8997a 100644
--- a/tools/opt/Android.mk
+++ b/tools/opt/Android.mk
@@ -76,7 +76,11 @@ LOCAL_IS_HOST_MODULE := true
LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES)
LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES)
LOCAL_LDLIBS += -lpthread -lm -ldl
+ifeq ($(HOST_OS),darwin)
+LOCAL_LDFLAGS += -Wl,-export_dynamic
+else
LOCAL_LDFLAGS += -Wl,--export-dynamic
+endif
include $(LLVM_ROOT_PATH)/llvm.mk
include $(LLVM_HOST_BUILD_MK)