mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Swift executions (#2216)
* enable swift execution * execution example * disable swift binary+execution until v5, and v5.0 gives a runtime error
This commit is contained in:
@@ -1,26 +1,35 @@
|
||||
compilers=&swift
|
||||
demangler=/opt/compiler-explorer/swift-5.3/usr/bin/swift-demangle
|
||||
defaultCompiler=swift53
|
||||
objdumper=/opt/compiler-explorer/gcc-snapshot/bin/objdump
|
||||
|
||||
group.swift.compilers=swift311:swift402:swift403:swift41:swift411:swift412:swift42:swift50:swift51:swift52:swift53:swiftnightly
|
||||
group.swift.isSemVer=true
|
||||
group.swift.baseName=x86-64 swiftc
|
||||
compiler.swift311.exe=/opt/compiler-explorer/swift-3.1.1/usr/bin/swiftc
|
||||
compiler.swift311.semver=3.1.1
|
||||
compiler.swift311.supportsBinary=false
|
||||
compiler.swift402.exe=/opt/compiler-explorer/swift-4.0.2/usr/bin/swiftc
|
||||
compiler.swift402.semver=4.0.2
|
||||
compiler.swift402.supportsBinary=false
|
||||
compiler.swift403.exe=/opt/compiler-explorer/swift-4.0.3/usr/bin/swiftc
|
||||
compiler.swift403.semver=4.0.3
|
||||
compiler.swift403.supportsBinary=false
|
||||
compiler.swift41.exe=/opt/compiler-explorer/swift-4.1/usr/bin/swiftc
|
||||
compiler.swift41.semver=4.1
|
||||
compiler.swift41.supportsBinary=false
|
||||
compiler.swift411.exe=/opt/compiler-explorer/swift-4.1.1/usr/bin/swiftc
|
||||
compiler.swift411.semver=4.1.1
|
||||
compiler.swift411.supportsBinary=false
|
||||
compiler.swift412.exe=/opt/compiler-explorer/swift-4.1.2/usr/bin/swiftc
|
||||
compiler.swift412.semver=4.1.2
|
||||
compiler.swift412.supportsBinary=false
|
||||
compiler.swift42.exe=/opt/compiler-explorer/swift-4.2/usr/bin/swiftc
|
||||
compiler.swift42.semver=4.2
|
||||
compiler.swift42.supportsBinary=false
|
||||
compiler.swift50.exe=/opt/compiler-explorer/swift-5.0/usr/bin/swiftc
|
||||
compiler.swift50.semver=5.0
|
||||
compiler.swift50.supportsExecute=false
|
||||
compiler.swift51.exe=/opt/compiler-explorer/swift-5.1/usr/bin/swiftc
|
||||
compiler.swift51.semver=5.1
|
||||
compiler.swift52.exe=/opt/compiler-explorer/swift-5.2/usr/bin/swiftc
|
||||
@@ -39,10 +48,31 @@ libs=
|
||||
#################################
|
||||
# Installed tools
|
||||
|
||||
tools=llvm-mcatrunk
|
||||
tools=llvm-mcatrunk:readelf:ldd:strings
|
||||
|
||||
tools.llvm-mcatrunk.name=llvm-mca (trunk)
|
||||
tools.llvm-mcatrunk.exe=/opt/compiler-explorer/clang-trunk/bin/llvm-mca
|
||||
tools.llvm-mcatrunk.type=postcompilation
|
||||
tools.llvm-mcatrunk.class=llvm-mca-tool
|
||||
tools.llvm-mcatrunk.stdinHint=disabled
|
||||
|
||||
tools.readelf.name=readelf (trunk)
|
||||
tools.readelf.exe=/opt/compiler-explorer/gcc-snapshot/bin/readelf
|
||||
tools.readelf.type=postcompilation
|
||||
tools.readelf.class=readelf-tool
|
||||
tools.readelf.exclude=
|
||||
tools.readelf.stdinHint=disabled
|
||||
|
||||
tools.ldd.name=ldd
|
||||
tools.ldd.exe=/usr/bin/ldd
|
||||
tools.ldd.type=postcompilation
|
||||
tools.ldd.class=readelf-tool
|
||||
tools.ldd.exclude=
|
||||
tools.ldd.stdinHint=disabled
|
||||
|
||||
tools.strings.exe=/opt/compiler-explorer/gcc-snapshot/bin/strings
|
||||
tools.strings.name=strings
|
||||
tools.strings.type=postcompilation
|
||||
tools.strings.class=strings-tool
|
||||
tools.strings.exclude=
|
||||
tools.strings.stdinHint=disabled
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
compilers=
|
||||
compileToAsm=-emit-assembly
|
||||
supportsBinary=false
|
||||
supportsBinary=true
|
||||
supportsExecute=true
|
||||
compilerType=swift
|
||||
intelAsm=-emit-assembly -Xllvm --x86-asm-syntax=intel
|
||||
|
||||
|
||||
4
examples/swift/execute_helloworld.swift
Normal file
4
examples/swift/execute_helloworld.swift
Normal file
@@ -0,0 +1,4 @@
|
||||
import Foundation
|
||||
|
||||
print("hello world")
|
||||
exit(123)
|
||||
Reference in New Issue
Block a user