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
The above worked for me. the two user build flags and then setting the following in runtime search paths.
LD_RUNPATH_SEARCH_PATHS = $(TOOLCHAIN_DIR)/usr/lib/swift/macosx @executable_path