The following error is thrown when trying to run my target:
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: x/Xcode/DerivedData/x/Buil
Swift Package Manager sets the following, which resolved this issue for me in another project:
SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES SWIFT_FORCE_STATIC_LINK_STDLIB = NO
Note that the search path was set to:
LD_RUNPATH_SEARCH_PATHS = $(TOOLCHAIN_DIR)/usr/lib/swift/macosx @executable_path