Commit e56ece3e authored by Drew's avatar Drew

Support static linking

To statically-link atbuild, use `--use-overlay static` when building
parent a99ccb1f
Pipeline #1698 failed with stage
......@@ -17,7 +17,7 @@ commands:
is-library: true
module-name: atfoundation
module-output-path: .atllbuild/products/atfoundation.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-enable-testing", "-g", "-Xcc", "-D_GNU_SOURCE"]
<atllbuild>:
tool: shell
......
......@@ -17,7 +17,7 @@ commands:
is-library: true
module-name: atpkg
module-output-path: .atllbuild/products/atpkg.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/"]
<atllbuild>:
tool: shell
......
......@@ -17,7 +17,7 @@ commands:
is-library: true
module-name: attools
module-output-path: .atllbuild/products/attools.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/"]
<atllbuild>:
tool: shell
......
......@@ -16,11 +16,11 @@ commands:
outputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o"]
module-name: atbuild
module-output-path: .atllbuild/products/atbuild.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a"]
outputs: ["<atllbuild>", ".atllbuild/products/atbuild"]
args: ["/usr/local/bin/swiftc", "-o", ".atllbuild/products/atbuild", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a"]
args: ["/usr/local/bin/swiftc", "-o", ".atllbuild/products/atbuild", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a", "-static-stdlib"]
description: Linking executable .atllbuild/products/atbuild
......@@ -17,7 +17,7 @@ commands:
is-library: true
module-name: atfoundation
module-output-path: .atllbuild/products/atfoundation.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk", "-enable-testing", "-g", "-Xcc", "-D_GNU_SOURCE"]
<atllbuild>:
tool: shell
......
......@@ -17,7 +17,7 @@ commands:
is-library: true
module-name: atpkg
module-output-path: .atllbuild/products/atpkg.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"]
<atllbuild>:
tool: shell
......
......@@ -17,7 +17,7 @@ commands:
is-library: true
module-name: attools
module-output-path: .atllbuild/products/attools.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"]
<atllbuild>:
tool: shell
......
......@@ -16,11 +16,11 @@ commands:
outputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o"]
module-name: atbuild
module-output-path: .atllbuild/products/atbuild.swiftmodule
temps-path: .atllbuild/llbuildtmp
temps-path: .atllbuild//llbuildtmp
other-args: ["-j8", "-D", "ATBUILD", "-I", ".atllbuild/products/", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"]
<atllbuild>:
tool: shell
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a"]
outputs: ["<atllbuild>", ".atllbuild/products/atbuild"]
args: ["/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc", "-o", ".atllbuild/products/atbuild", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a"]
args: ["/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc", "-o", ".atllbuild/products/atbuild", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.a", ".atllbuild/products/atfoundation.a", "-static-stdlib"]
description: Linking executable .atllbuild/products/atbuild
......@@ -39,6 +39,9 @@
:link-sdk false
:llbuildyaml "bootstrap/bootstrap-linux.swift-build"
}
:static {
:link-options ["-static-stdlib"]
}
}
}
......
......@@ -8,7 +8,11 @@ ATBUILD="`pwd`/.atllbuild/products/atbuild"
pwd
echo "****************SELF-HOSTING TEST**************"
$ATBUILD atbuild
if ! $ATBUILD atbuild --use-overlay static; then
echo "Self-host failed; maybe you're not running CaffeinatedSwift?"
echo "Retrying with non-static build"
$ATBUILD atbuild
fi
echo "****************PLUGIN TEST**************"
cd $DIR/tests/fixtures/attool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment