8219986: Change to Xcode 10.1 for building on Macosx at Oracle
authorerikj
Mon, 04 Mar 2019 11:28:52 -0800
changeset 53993 271f75d4b494
parent 53992 cf4c3a118d2b
child 53994 77343f5c85cb
8219986: Change to Xcode 10.1 for building on Macosx at Oracle Reviewed-by: tbell
make/conf/jib-profiles.js
make/devkit/createMacosxDevkit.sh
make/devkit/createMacosxDevkit6.sh
make/devkit/createMacosxDevkit9.sh
--- a/make/conf/jib-profiles.js	Mon Mar 04 11:30:27 2019 -0800
+++ b/make/conf/jib-profiles.js	Mon Mar 04 11:28:52 2019 -0800
@@ -940,7 +940,7 @@
 
     var devkit_platform_revisions = {
         linux_x64: "gcc7.3.0-OEL6.4+1.2",
-        macosx_x64: "Xcode9.4-MacOSX10.13+1.0",
+        macosx_x64: "Xcode10.1-MacOSX10.14+1.0",
         solaris_x64: "SS12u4-Solaris11u1+1.0",
         solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
         windows_x64: "VS2017-15.9.6+1.0",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createMacosxDevkit.sh	Mon Mar 04 11:28:52 2019 -0800
@@ -0,0 +1,144 @@
+#!/bin/bash
+#
+# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This script copies parts of an Xcode installation into a devkit suitable
+# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
+# to be either installed or extracted using for example Archive Utility.
+# The easiest way to accomplish this is to right click the file in Finder
+# and choose "Open With -> Archive Utility", or possible typing
+# "open Xcode_9.2.xip" in a terminal.
+# erik.joelsson@oracle.com
+
+USAGE="$0 <Xcode.app>"
+
+if [ "$1" = "" ]; then
+    echo $USAGE
+    exit 1
+fi
+
+XCODE_APP="$1"
+XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+
+# Find the version of Xcode
+XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
+    | awk '/Xcode/ { print $2 }' )"
+SDK_VERSION="$(ls $XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
+    | grep [0-9] | sort -r | head -n1 | sed 's/\.sdk//')"
+
+DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Xcode version: $XCODE_VERSION"
+echo "SDK version: $SDK_VERSION"
+echo "Creating devkit in $DEVKIT_ROOT"
+
+mkdir -p $DEVKIT_ROOT
+
+################################################################################
+# Copy the relevant parts of Xcode.app, removing things that are both big and
+# unecessary for our purposes, without building an impossibly long exclude list.
+#
+# Not including WatchSimulator.platform makes ibtool crashes in some situations.
+# It doesn't seem to matter which extra platform is included, but that is the
+# smallest one.
+
+EXCLUDE_DIRS=" \
+    Contents/_CodeSignature \
+    $XCODE_APP_DIR_NAME/Contents/Applications \
+    $XCODE_APP_DIR_NAME/Contents/Resources \
+    $XCODE_APP_DIR_NAME/Contents/Library \
+    $XCODE_APP_DIR_NAME/Contents/XPCServices \
+    $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
+    Platforms/AppleTVSimulator.platform \
+    Platforms/iPhoneSimulator.platform \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
+    $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
+        | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
+"
+
+for ex in $EXCLUDE_DIRS; do
+    EXCLUDE_ARGS+="--exclude=$ex "
+done
+
+echo "Copying Xcode.app..."
+echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
+rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
+
+################################################################################
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
+echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
+echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
+echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle..."
+GZIP=$(command -v pigz)
+if [ -z "$GZIP" ]; then
+    GZIP="gzip"
+fi
+(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createMacosxDevkit6.sh	Mon Mar 04 11:30:27 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This script copies part of an Xcode installer into a devkit suitable
-# for building OpenJDK and OracleJDK. The installation .dmg files for Xcode
-# and the aux tools need to be available.
-# erik.joelsson@oracle.com
-
-USAGE="$0 <Xcode.dmg> <XQuartz.dmg> <gnu make binary> [<auxtools.dmg>]"
-
-if [ "$1" = "" ] || [ "$2" = "" ]; then
-    echo $USAGE
-    exit 1
-fi
-
-XCODE_DMG="$1"
-XQUARTZ_DMG="$2"
-GNU_MAKE="$3"
-AUXTOOLS_DMG="$4"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-
-# Mount XCODE_DMG
-if [ -e "/Volumes/Xcode" ]; then
-    hdiutil detach /Volumes/Xcode
-fi
-hdiutil attach $XCODE_DMG
-
-# Find the version of Xcode
-XCODE_VERSION="$(/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version \
-    | awk '/Xcode/ { print $2 }' )"
-SDK_VERSION="MacOSX10.9"
-if [ ! -e "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
-    echo "Expected SDK version not found: ${SDK_VERSION}"
-    exit 1
-fi
-
-DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Xcode version: $XCODE_VERSION"
-echo "Creating devkit in $DEVKIT_ROOT"
-
-################################################################################
-# Copy files to root
-mkdir -p $DEVKIT_ROOT
-if [ ! -d $DEVKIT_ROOT/Xcode.app ]; then
-    echo "Copying Xcode.app..."
-    cp -RH "/Volumes/Xcode/Xcode.app" $DEVKIT_ROOT/
-fi
-# Trim out some seemingly unneeded parts to save space.
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Applications
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/iPhone*
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Documentation
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/share/man
-( cd $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
-    && rm -rf `ls | grep -v ${SDK_VERSION}` )
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man
-
-hdiutil detach /Volumes/Xcode
-
-################################################################################
-# Copy Freetype into sysroot
-if [ -e "/Volumes/XQuartz-*" ]; then
-    hdiutil detach /Volumes/XQuartz-*
-fi
-hdiutil attach $XQUARTZ_DMG
-
-echo "Copying freetype..."
-rm -rf /tmp/XQuartz
-pkgutil --expand /Volumes/XQuartz-*/XQuartz.pkg /tmp/XQuartz/
-rm -rf /tmp/x11
-mkdir /tmp/x11
-cd /tmp/x11
-cat /tmp/XQuartz/x11.pkg/Payload | gunzip -dc | cpio -i
-
-mkdir -p $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
-mkdir -p $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/lib/
-cp -RH opt/X11/include/freetype2 \
-    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
-cp -RH opt/X11/include/ft2build.h \
-    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
-cp -RH opt/X11/lib/libfreetype.* \
-    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/lib/
-
-cd -
-
-hdiutil detach /Volumes/XQuartz-*
-
-################################################################################
-# Copy gnu make
-mkdir -p $DEVKIT_ROOT/bin
-cp $GNU_MAKE $DEVKIT_ROOT/bin
-
-################################################################################
-# Optionally copy PackageMaker
-
-if [ -e "$AUXTOOLS_DMG" ]; then
-    if [ -e "/Volumes/Auxiliary Tools" ]; then
-        hdiutil detach "/Volumes/Auxiliary Tools"
-    fi
-    hdiutil attach $AUXTOOLS_DMG
-
-    echo "Copying PackageMaker.app..."
-    cp -RH "/Volumes/Auxiliary Tools/PackageMaker.app" $DEVKIT_ROOT/
-
-    hdiutil detach "/Volumes/Auxiliary Tools"
-fi
-
-################################################################################
-# Generate devkit.info
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "# The parameters used to create this devkit were:"
-echo-info "# $*"
-echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
-echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
-echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk\""
-echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/bin:\$DEVKIT_ROOT/PackageMaker.app/Contents/MacOS:\$DEVKIT_TOOLCHAIN_PATH\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle..."
-(cd $DEVKIT_ROOT && tar c - . | gzip - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createMacosxDevkit9.sh	Mon Mar 04 11:30:27 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# This script copies parts of an Xcode installation into a devkit suitable
-# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
-# to be either installed or extracted using for example Archive Utility.
-# The easiest way to accomplish this is to right click the file in Finder
-# and choose "Open With -> Archive Utility", or possible typing
-# "open Xcode_9.2.xip" in a terminal.
-# erik.joelsson@oracle.com
-
-USAGE="$0 <Xcode.app>"
-
-if [ "$1" = "" ]; then
-    echo $USAGE
-    exit 1
-fi
-
-XCODE_APP="$1"
-XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-
-# Find the version of Xcode
-XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
-    | awk '/Xcode/ { print $2 }' )"
-SDK_VERSION="MacOSX10.13"
-if [ ! -e "$XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
-    echo "Expected SDK version not found: ${SDK_VERSION}"
-    exit 1
-fi
-
-DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Xcode version: $XCODE_VERSION"
-echo "Creating devkit in $DEVKIT_ROOT"
-
-mkdir -p $DEVKIT_ROOT
-
-################################################################################
-# Copy the relevant parts of Xcode.app, removing things that are both big and
-# unecessary for our purposes, without building an impossibly long exclude list.
-#
-# Not including WatchSimulator.platform makes ibtool crashes in some situations.
-# It doesn't seem to matter which extra platform is included, but that is the
-# smallest one.
-
-EXCLUDE_DIRS=" \
-    Contents/_CodeSignature \
-    $XCODE_APP_DIR_NAME/Contents/Applications \
-    $XCODE_APP_DIR_NAME/Contents/Resources \
-    $XCODE_APP_DIR_NAME/Contents/Library \
-    $XCODE_APP_DIR_NAME/Contents/XPCServices \
-    $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
-    Platforms/AppleTVSimulator.platform \
-    Platforms/iPhoneSimulator.platform \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
-    $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
-        | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
-"
-
-for ex in $EXCLUDE_DIRS; do
-    EXCLUDE_ARGS+="--exclude=$ex "
-done
-
-echo "Copying Xcode.app..."
-echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
-rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
-
-################################################################################
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
-echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
-echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
-echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle..."
-GZIP=$(command -v pigz)
-if [ -z "$GZIP" ]; then
-    GZIP="gzip"
-fi
-(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")