diff --git a/can/SConscript b/can/SConscript index c707553d1d..63654ac863 100644 --- a/can/SConscript +++ b/can/SConscript @@ -9,7 +9,9 @@ src = ["dbc.cc", "parser.cc", "packer.cc", "common.cc"] libs = [common, "capnp", "kj", "zmq"] # shared library for openpilot -LINKFLAGS = envDBC["LINKFLAGS"] + ["-Wl,-install_name,@loader_path/libdbc.dylib"] if arch == "Darwin" else envDBC["LINKFLAGS"] +LINKFLAGS = envDBC["LINKFLAGS"] +if arch == "Darwin": + LINKFLAGS += ["-Wl,-install_name,@loader_path/libdbc.dylib"] libdbc = envDBC.SharedLibrary('libdbc', src, LIBS=libs, LINKFLAGS=LINKFLAGS) # static library for tools like cabana