-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift 6 - improvements #10
Labels
enhancement
New feature or request
Comments
New tests swiftc + zig (none SDK), like D lang Sourcefunc swiftMain()
{
print("Hello from Swift")
}
@_cdecl("main")
public func main(_ argc: Int32, _ argv: UnsafeMutablePointer<UnsafeMutablePointer<Int8>?>) -> Int32
{
swiftMain()
return 0
} $ swiftc --version
Swift version 6.1-dev (LLVM fe0f467028c23cf, Swift 406b8bd8921b5dc)
Target: x86_64-unknown-linux-gnu
$ swiftc examples/main.swift -parse-as-library -enable-experimental-feature Embedded -wmo -Xfrontend -function-sections -Xfrontend -disable-stack-protector -import-bridging-header $PWD/examples/bridging.h -Xcc --target=aarch64-linux -c
<unknown>:0: warning: argument unused during compilation: '-mcx16'
<unknown>:0: warning: argument unused during compilation: '-mcx16'
$ file main.o
main.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (GNU/Linux), not stripped
# note: zig cross-compile use musl-libc by default [linux-target only]
$ zig cc main.o -o swift_main -target aarch64-linux
$ ./swift_main
Hello from Swift
$ ldd swift_main
not a dynamic executable Similar to flang, dropping some swiftc ldflags in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After #9. Tried some tests betwen targets (cross-compilation)
Sources
https://github.com/kassane/anotherBuildStep/tree/main/tests/swift_ffi
Build
native
cross-build
The text was updated successfully, but these errors were encountered: