From 749d3db8ef63c70359e271b94b4f735809b5fb1e Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Thu, 14 Apr 2022 10:53:16 -0500 Subject: [PATCH] Add rpath for llvm (#1254) Co-authored-by: Fennell, Scott P 263712616 --- trick_source/codegen/Interface_Code_Gen/makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trick_source/codegen/Interface_Code_Gen/makefile b/trick_source/codegen/Interface_Code_Gen/makefile index 34caae37..93df3d15 100644 --- a/trick_source/codegen/Interface_Code_Gen/makefile +++ b/trick_source/codegen/Interface_Code_Gen/makefile @@ -55,6 +55,10 @@ all: $(ICG) $(ICG): $(OBJECTS) $(UDUNITS_OBJS) $(CXX) -o $@ $(OBJECTS) $(UDUNITS_OBJS) $(CLANGLIBS) $(LLVMLDFLAGS) +ifeq ($(TRICK_HOST_TYPE),Darwin) + @install_name_tool -add_rpath `$(LLVM_HOME)/bin/llvm-config --libdir` $(ICG) +endif + # Only FieldDescription.cpp includes the units conversion header. $(OBJ_DIR)/FieldDescription.o : CXXFLAGS += -I$(TRICK_HOME)/include $(OBJ_DIR)/HeaderSearchDirs.o : CXXFLAGS += -DLLVM_HOME=\"${LLVM_HOME}\"