Commit 932df14e authored by Drew's avatar Drew

Restore bootstrap

Okay, I understand the desire to do this, but we can't.  Not yet.  Open
an issue.

The behavior we need is that we don't have to manually muck around with
the bootstrap files when we organize the repository.  We can actually
generate them from a (working) atbuild, check them into source control,
and then bootstrap can use them without any atbuild installed.

The catch is, they need to talk to the .atllbuild directory, not some
other .bootstrap directory.

To get the latter behavior, open an issue and I can add support for this
in atllbuild.

This commit restores the behavior where we can generate the bootstrap
files from a working atbuild again, so we don't have to edit them by
hand.
parent 0476fc3c
Pipeline #683 passed with stage
client:
name: swift-build
tools: {}
targets:
"": [<atllbuild>]
atllbuild: [<atllbuild>]
commands:
<atllbuild-swiftc>:
tool: swift-compiler
executable: "/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc"
inputs: ["atpkg/src/Package.swift", "atpkg/src/parsing/Parser.swift", "atpkg/src/parsing/Scanner.swift", "atpkg/src/parsing/Tokenization.swift"]
sources: ["atpkg/src/Package.swift", "atpkg/src/parsing/Parser.swift", "atpkg/src/parsing/Scanner.swift", "atpkg/src/parsing/Tokenization.swift"]
objects: [".atllbuild/objects/Package.swift.o", ".atllbuild/objects/Parser.swift.o", ".atllbuild/objects/Scanner.swift.o", ".atllbuild/objects/Tokenization.swift.o"]
outputs: ["<atllbuild-swiftc>", ".atllbuild/objects/Package.swift.o", ".atllbuild/objects/Parser.swift.o", ".atllbuild/objects/Scanner.swift.o", ".atllbuild/objects/Tokenization.swift.o"]
is-library: true
module-name: atpkg
module-output-path: .atllbuild/products/atpkg.swiftmodule
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/Package.swift.o", ".atllbuild/objects/Parser.swift.o", ".atllbuild/objects/Scanner.swift.o", ".atllbuild/objects/Tokenization.swift.o"]
outputs: ["<atllbuild>", ".atllbuild/products/atpkg.a"]
args: ["/bin/sh","-c",rm -rf .atllbuild/products/atpkg.a; ar cr '.atllbuild/products/atpkg.a' '.atllbuild/objects/Package.swift.o' '.atllbuild/objects/Parser.swift.o' '.atllbuild/objects/Scanner.swift.o' '.atllbuild/objects/Tokenization.swift.o']
description: "Linking Library: .atllbuild/products/atpkg.a"
\ No newline at end of file
client:
name: swift-build
tools: {}
targets:
"": [<atllbuild>]
atllbuild: [<atllbuild>]
commands:
<atllbuild-swiftc>:
tool: swift-compiler
executable: "/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc"
inputs: ["attools/src/atllbuild.swift", "attools/src/Nop.swift", "attools/src/PlatformPaths.swift", "attools/src/Shell.swift", "attools/src/TaskRunner.swift", "attools/src/Tools.swift"]
sources: ["attools/src/atllbuild.swift", "attools/src/Nop.swift", "attools/src/PlatformPaths.swift", "attools/src/Shell.swift", "attools/src/TaskRunner.swift", "attools/src/Tools.swift"]
objects: [".atllbuild/objects/atllbuild.swift.o", ".atllbuild/objects/Nop.swift.o", ".atllbuild/objects/PlatformPaths.swift.o", ".atllbuild/objects/Shell.swift.o", ".atllbuild/objects/TaskRunner.swift.o", ".atllbuild/objects/Tools.swift.o"]
outputs: ["<atllbuild-swiftc>", ".atllbuild/objects/atllbuild.swift.o", ".atllbuild/objects/Nop.swift.o", ".atllbuild/objects/PlatformPaths.swift.o", ".atllbuild/objects/Shell.swift.o", ".atllbuild/objects/TaskRunner.swift.o", ".atllbuild/objects/Tools.swift.o"]
is-library: true
module-name: attools
module-output-path: .atllbuild/products/attools.swiftmodule
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/atllbuild.swift.o", ".atllbuild/objects/Nop.swift.o", ".atllbuild/objects/PlatformPaths.swift.o", ".atllbuild/objects/Shell.swift.o", ".atllbuild/objects/TaskRunner.swift.o", ".atllbuild/objects/Tools.swift.o"]
outputs: ["<atllbuild>", ".atllbuild/products/attools.a"]
args: ["/bin/sh","-c",rm -rf .atllbuild/products/attools.a; ar cr '.atllbuild/products/attools.a' '.atllbuild/objects/atllbuild.swift.o' '.atllbuild/objects/Nop.swift.o' '.atllbuild/objects/PlatformPaths.swift.o' '.atllbuild/objects/Shell.swift.o' '.atllbuild/objects/TaskRunner.swift.o' '.atllbuild/objects/Tools.swift.o']
description: "Linking Library: .atllbuild/products/attools.a"
\ No newline at end of file
client:
name: swift-build
targets:
"": [<atbuild>]
tools: {}
targets:
"": [<atllbuild>]
atllbuild: [<atllbuild>]
commands:
atpkg-build:
tool: swift-compiler
sources:
- ../atpkg/src/parsing/Scanner.swift
- ../atpkg/src/parsing/Tokenization.swift
- ../atpkg/src/parsing/Parser.swift
- ../atpkg/src/Package.swift
outputs:
- <atpkg-obj>
objects:
- ../.built/bootstrap/atpkg/Scanner.o
- ../.built/bootstrap/atpkg/Tokenization.o
- ../.built/bootstrap/atpkg/Parser.o
- ../.built/bootstrap/atpkg/Package.o
module-name: atpkg
module-output-path: ../.built/bootstrap/atpkg/atpkg.swiftmodule
temps-path: ../.built/bootstrap/atpkg/tmp
other-args:
- -j8
- -I
- ../.built/bootstrap/atpkg
- -sdk
- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
attools-build:
tool: swift-compiler
sources:
- ../attools/src/atllbuild.swift
- ../attools/src/Nop.swift
- ../attools/src/PlatformPaths.swift
- ../attools/src/Shell.swift
- ../attools/src/TaskRunner.swift
- ../attools/src/Tools.swift
inputs:
- <atpkg-obj>
outputs:
- <attools-obj>
objects:
- ../.built/bootstrap/attools/atllbuild.o
- ../.built/bootstrap/attools/Nop.o
- ../.built/bootstrap/attools/PlatformPaths.o
- ../.built/bootstrap/attools/Shell.o
- ../.built/bootstrap/attools/TaskRunner.o
- ../.built/bootstrap/attools/Tools.o
module-name: attools
module-output-path: ../.built/bootstrap/attools/attools.swiftmodule
temps-path: ../.built/bootstrap/attools/tmp
other-args:
- -j8
- -I
- ../.built/bootstrap/atpkg
- -sdk
- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
atbuild-build:
tool: swift-compiler
sources:
- ../atbuild/src/main.swift
inputs:
- <atpkg-obj>
- <attools-obj>
outputs:
- <atbuild-obj>
objects:
- ../.built/bootstrap/atbuild/main.o
module-name: atbuild
module-output-path: ../.built/bootstrap/atbuild/atbuild.swiftmodule
temps-path: ../.built/bootstrap/atbuild/tmp
other-args:
- -j8
- -I
- ../.built/bootstrap/atpkg
- -I
- ../.built/bootstrap/attools
- -sdk
- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
atpkg-lib:
tool: shell
description: Producing atpkg static library.
inputs:
- <atpkg-obj>
outputs:
- <atpkg-lib>
- ../.built/bootstrap/atpkg/atpkg.a
args:
- /bin/sh
- -c
- ar cr ../.built/bootstrap/atpkg/atpkg.a ../.built/bootstrap/atpkg/Scanner.o ../.built/bootstrap/atpkg/Tokenization.o ../.built/bootstrap/atpkg/Parser.o ../.built/bootstrap/atpkg/Package.o
attools-lib:
tool: shell
description: Producing attools static library.
inputs:
- <attools-obj>
outputs:
- <attools-lib>
- ../.built/bootstrap/attools/attools.a
args:
- /bin/sh
- -c
- ar cr ../.built/bootstrap/attools/attools.a ../.built/bootstrap/attools/atllbuild.o ../.built/bootstrap/attools/Nop.o ../.built/bootstrap/attools/Shell.o ../.built/bootstrap/attools/Tools.o ../.built/bootstrap/attools/TaskRunner.o ../.built/bootstrap/attools/PlatformPaths.o
atbuild-link:
<atllbuild-swiftc>:
tool: swift-compiler
executable: "/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc"
inputs: ["atbuild/src/main.swift"]
sources: ["atbuild/src/main.swift"]
objects: [".atllbuild/objects/main.swift.o"]
outputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o"]
module-name: atbuild
module-output-path: .atllbuild/products/atbuild.swiftmodule
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
description: Producing atbuild binary.
inputs:
- <atpkg-lib>
- <attools-lib>
- <atbuild-obj>
outputs:
- <atbuild>
- ../.built/bootstrap/atbuild/atbuild
args:
- /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc
- -o
- ../.built/bootstrap/atbuild/atbuild
- ../.built/bootstrap/atbuild/main.o
- ../.built/bootstrap/attools/attools.a
- ../.built/bootstrap/atpkg/atpkg.a
inputs: ["<atllbuild-swiftc>", ".atllbuild/objects/main.swift.o", ".atllbuild/products/attools.a", ".atllbuild/products/atpkg.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"]
description: Linking executable .atllbuild/products/atbuild
#!/bin/bash
SCRIPT_DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
cd $SCRIPT_DIR
PLATFORM=macosx
BUILD_DIR=../.built
SWIFT_BUILD_TOOL=`which swift-build-tool`
if [ -n "$1" ]; then
......@@ -16,17 +12,13 @@ if [ -z "$SWIFT_BUILD_TOOL" ]; then
exit 1
fi
if [ -d "$BUILD_DIR" ]; then
rm -rf "$BUILD_DIR"
fi
mkdir -p $BUILD_DIR/obj
mkdir -p $BUILD_DIR/tmp
$SWIFT_BUILD_TOOL -f bootstrap-$PLATFORM.swift-build --no-db
$SWIFT_BUILD_TOOL -f bootstrap/bootstrap-$PLATFORM-atpkg.swift-build --no-db
$SWIFT_BUILD_TOOL -f bootstrap/bootstrap-$PLATFORM-attools.swift-build --no-db
$SWIFT_BUILD_TOOL -f bootstrap/bootstrap-$PLATFORM.swift-build --no-db
if [ "0" = "$?" ]; then
rm -rf ../bin
mkdir -p ../bin
ln -s $BUILD_DIR/bootstrap/atbuild/atbuild ../bin/atbuild
rm -rf bin
mkdir -p bin
ln -s $BUILD_DIR/.atllbuild/products/atbuild bin/atbuild
fi
\ No newline at end of file
......@@ -19,6 +19,36 @@
:tasks {:bootstrap {:tool "shell"
:script "./bootstrap/build.sh"}
:bootstrap-osx {:tool "atllbuild"
:source ["atbuild/src/**.swift"]
:name "atbuild"
:outputType "executable"
:bootstrapOnly true
:llbuildyaml "bootstrap/bootstrap-macosx.swift-build"
:linkWithProduct ["attools.a" "atpkg.a"]
:dependencies ["bootstrap-osx-attools" "bootstrap-osx-atpkg"]
}
:bootstrap-osx-attools {
:tool "atllbuild"
:source ["attools/src/**.swift"]
:name "attools"
:outputType "static-library"
:bootstrapOnly true
:llbuildyaml "bootstrap/bootstrap-macosx-attools.swift-build"
}
:bootstrap-osx-atpkg {
:tool "atllbuild"
:source ["atpkg/src/**.swift"]
:name "atpkg"
:outputType "static-library"
:bootstrapOnly true
:llbuildyaml "bootstrap/bootstrap-macosx-atpkg.swift-build"
}
:atpkg {:tool "atllbuild"
:source ["atpkg/src/**.swift"]
......
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