Skip to content

Commit

Permalink
Set install path for libmxnet.so dynamic lib on Mac OS (apache#13629)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxihu authored and lanking520 committed Apr 26, 2019
1 parent 9fcb653 commit a4f4ee0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,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

0 comments on commit a4f4ee0

Please sign in to comment.