Hello
TLDR
When compiling a Swift Package for embedding to a target via Xcode, swiftc (presumably?) produces a set of artifacts that I am unable to match when manually invoking swiftc.
For my workflow, i need to manually produce via the swift toolchain (again, presumably via swiftc)
Satin.swiftmodule/
- arm64-apple-macos.abi.json
- arm64-apple-macos.swiftdoc
- arm64-apple-macos.swiftmodule
- Project/
I am invoking swiftc manually like so:
swiftc -v \
-emit-library \
-target arm64-apple-macos14.0 \
-module-name Satin \
$(find Sources/Satin -name "*.swift") \
-I ./build \
-L ./build \
-lSatinCore \
-o ./build/libSatin.dylib \
-emit-module-path ./build/Satin.swiftmodule \
-emit-module-interface-path ./build/Satin.swiftinterface \
-Xlinker -rpath -Xlinker @loader_path \
-Xlinker -install_name -Xlinker @rpath/libSatin.dylib \
-Xcc -I./Sources/SatinCore/include \
-Xcc -fmodule-map-file=./Sources/SatinCore/include/SatinCore.modulemap \
-DSWIFT_PACKAGE -j8 \
-framework Metal -framework MetalKit
and this produces the flat file module.
How can I match Xcodes method of compilation myself?
Thank you!