How to invoke the swift compiler from an SPM plugin

is there a way to invoke the toolchain from an SPM plugin? it seems that this would require knowledge of where the toolchain is installed...