Hi all
This question relates to swift as CLI interpreter, e.g. swift simple.swift
, run from a freshly build-from-source swift compiler, from [buildFolder]/swift-macosx-x86_64/bin/swift.
If I have my swift.swiftmodule at [buildFolder]/swift-macosx-x86_64/lib/swift/macosx/x86_64 as expected, everything is fine, but I'd like to supply a different path. (I'm assuming CompilerInvocation::setMainExecutablePath is the one hard-coding this folder relation?)
I've tried all combinations of -L, -F, -Fsystem and -I with different levels of the relationship (myFolder, myFolder/lib ... etc.) but can't seem to get it to work - always getting error: unable to load standard library for target 'x86_64-apple-macosx10.13'
.
Closest was -L=[someFolder]/lib/swift/macosx
, which when dumped the command shows a DYLD_LIBRARY_PATH which seems like it will work, but doesn't.
Is it even possible? Any pointers will be much appreciated.