Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Set install path for libmxnet.so dynamic lib on Mac OS #13629

Merged
merged 1 commit into from
Dec 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,11 @@ build/plugin/%.o: plugin/%.cc
@mkdir -p $(@D)
$(CXX) -std=c++11 -c $(CFLAGS) -MMD -Isrc/operator -c $< -o $@

# Set install path for libmxnet.so on Mac OS
ifeq ($(UNAME_S), Darwin)
LDFLAGS += -Wl,-install_name,@rpath/libmxnet.so
endif

# NOTE: to statically link libmxnet.a we need the option
# --Wl,--whole-archive -lmxnet --Wl,--no-whole-archive
lib/libmxnet.a: $(ALLX_DEP)
Expand Down