Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: emscripten

emscripten (1.22.1-1ubuntu1) eoan; urgency=medium * Remove bogus copyright for png file tests/sdl_canvas_palette_g.png. -- Matthias Klose <doko@ubuntu.com> Thu, 05 Sep 2019 14:12:57 +0200 emscripten (1.22.1-1build1) wily; urgency=medium * No-change rebuild using GCC 5. -- Matthias Klose <doko@ubuntu.com> Fri, 28 Aug 2015 10:53:58 +0000

Modifications :
  1. Download patch debian/copyright

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jhdf

jhdf (2.11.0+dfsg-3ubuntu2) disco; urgency=medium * Also drop debian/patches/source1.5.diff. -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 01 Feb 2019 22:11:37 +0000 jhdf (2.11.0+dfsg-3ubuntu1) disco; urgency=medium * Cherry-pick fix for build failure with Java 9+ from https://salsa.debian.org/science-team/jhdf/merge_requests/1 Closes: #875584. -- Steve Langasek <steve.langasek@ubuntu.com> Fri, 01 Feb 2019 13:32:13 -0800 jhdf (2.11.0+dfsg-3build1) disco; urgency=medium * Rebuild against new libhdf5-103. -- Gianfranco Costamagna <locutusofborg@debian.org> Wed, 12 Dec 2018 11:21:52 +0100

Modifications :
  1. Download patch debian/patches/java9-compatibility.patch

    --- 2.11.0+dfsg-3/debian/patches/java9-compatibility.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2.11.0+dfsg-3ubuntu2/debian/patches/java9-compatibility.patch 2019-02-01 21:31:40.000000000 +0000 @@ -0,0 +1,25 @@ +--- a/configure.in ++++ b/configure.in +@@ -479,8 +479,6 @@ + JAVACLASSPATH_FOUND=1 + JAVALIB=$JL/jre/lib + AC_SUBST(JAVALIB) JAVALIB="" +- else +- AC_MSG_ERROR(cannot find jdk classes in JDK lib path.) + fi + fi + fi +--- a/Makefile.in ++++ b/Makefile.in +@@ -393,9 +393,9 @@ + install-javadocs: + -mkdir -p $(DOCDIR)/javadocs; + @if test x'$(H45INC)' != x'' ; then \ +- $(JAVADOC) -sourcepath $(CLASSPATH) -d $(DOCDIR)/javadocs $(JAVADOC_FLAGS) $(JH45PACKAGES) ncsa.hdf.hdflib $(JHI5PACKAGES) $(HDFOBJPACKAGES); \ ++ $(JAVADOC) -sourcepath $(CLASSPATH) -classpath /usr/share/java/slf4j-api.jar -d $(DOCDIR)/javadocs $(JAVADOC_FLAGS) $(JH45PACKAGES) ncsa.hdf.hdflib $(JHI5PACKAGES) $(HDFOBJPACKAGES); \ + else \ +- $(JAVADOC) -sourcepath $(CLASSPATH) -d $(DOCDIR)/javadocs $(JAVADOC_FLAGS) ncsa.hdf.hdflib $(JHI5PACKAGES) $(HDFOBJPACKAGES); \ ++ $(JAVADOC) -sourcepath $(CLASSPATH) -classpath /usr/share/java/slf4j-api.jar -d $(DOCDIR)/javadocs $(JAVADOC_FLAGS) ncsa.hdf.hdflib $(JHI5PACKAGES) $(HDFOBJPACKAGES); \ + fi + -mkdir -p $(DOCDIR)/javadocs/resources; + cp docs/javadocs/resources/*.gif $(DOCDIR)/javadocs/resources;
  2. Download patch debian/patches/source1.5.diff

    --- 2.11.0+dfsg-3/debian/patches/source1.5.diff 2018-01-25 09:57:42.000000000 +0000 +++ 2.11.0+dfsg-3ubuntu2/debian/patches/source1.5.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Index: jhdf-2.11.0+dfsg/config/Rules.mk -=================================================================== ---- jhdf-2.11.0+dfsg.orig/config/Rules.mk -+++ jhdf-2.11.0+dfsg/config/Rules.mk -@@ -36,7 +36,7 @@ CURRENTDIR = . - JAR_DIR=$(CLASS_DIR) - OUT_DIR=$(CLASS_DIR)/$(DIR) - --JFLAGS= -g -deprecation -d $(CLASS_DIR) -classpath $(CP) -+JFLAGS= -source 1.5 -target 1.5 -g -deprecation -d $(CLASS_DIR) -classpath $(CP) - RMICFLAGS= -g -d $(CLASS_DIR) - JARFLAGS = cfm -
  3. Download patch debian/control

    --- 2.11.0+dfsg-3/debian/control 2018-01-25 09:57:42.000000000 +0000 +++ 2.11.0+dfsg-3ubuntu2/debian/control 2019-02-01 21:32:13.000000000 +0000 @@ -1,5 +1,6 @@ Source: jhdf -Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org> Uploaders: Sylvestre Ledru <sylvestre@debian.org> Section: libs Priority: optional
  4. Download patch debian/patches/series

    --- 2.11.0+dfsg-3/debian/patches/series 2018-01-25 09:57:42.000000000 +0000 +++ 2.11.0+dfsg-3ubuntu2/debian/patches/series 2019-02-01 22:11:10.000000000 +0000 @@ -12,8 +12,8 @@ z_missing_shared_flag.diff z_nc2-fits-disabled.diff z_sharedOptMissing5.diff z_sharedOptMissing.diff -source1.5.diff slf4j.diff javadocImages.diff iconsRelativePath.diff +java9-compatibility.patch

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: llvm-toolchain-9

llvm-toolchain-9 (1:9.0.0-3ubuntu2) focal; urgency=medium [ Samuel Thibault ] * hurd-cxx-paths.diff: Re-introduce patch to find C++ headers. * hurd-EIEIO-undef.diff: Drop patch, already fixed a different way upstream. * hurd-pathmax.diff: Drop now-useless parts. [ Sylvestre Ledru ] * Add libz3-dev as dependencies on llvm-X.Y-dev (Closes: #943996) [ Gianfranco Costamagna ] * Upload git commit db9dd59af5bfb9f6d3de3370712d2f677e1e21ca * Disable thin everywhere -- Gianfranco Costamagna <locutusofborg@debian.org> Sun, 03 Nov 2019 19:02:25 +0100

Modifications :
  1. Download patch debian/rules

    --- 1:9.0.0-3/debian/rules 2019-10-30 23:27:11.000000000 +0000 +++ 1:9.0.0-3ubuntu2/debian/rules 2019-11-03 18:00:48.000000000 +0000 @@ -73,7 +73,7 @@ endif Z3_FLAG= ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libz3-dev) gt 4.7.0; echo $$?),0) # Too old version of gcc. Force 4.9 - Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=ON + Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=OFF endif FORCE_NOT_GCC_9_DISTRO := eoan bullseye sid @@ -253,7 +253,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINU # armhf is not yet quite ready for Thin, it FTBFS # see https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-8&arch=armhf&ver=1%3A8.0.1%7E%2Brc2-1%7Eexp1&stamp=1560334266&raw=0 ifeq (,$(filter $(DEB_HOST_ARCH), armhf)) - CMAKE_EXTRA += -DLLVM_ENABLE_LTO="Thin" +# CMAKE_EXTRA += -DLLVM_ENABLE_LTO="Thin" endif endif endif
  2. Download patch debian/control

    --- 1:9.0.0-3/debian/control 2019-10-30 17:36:26.000000000 +0000 +++ 1:9.0.0-3ubuntu2/debian/control 2019-11-03 18:00:34.000000000 +0000 @@ -18,7 +18,7 @@ Build-Depends: debhelper (>= 9.0), cmake ocaml-findlib [amd64 arm64 armhf i386 ppc64el s390x], libctypes-ocaml-dev [amd64 arm64 armhf i386 ppc64el s390x], dh-exec, dh-ocaml [amd64 arm64 armhf i386 ppc64el s390x], - libpfm4-dev, python3-setuptools, libz3-dev, + libpfm4-dev [linux-any], python3-setuptools, g++-8 | g++-7 | g++-6 | g++-5 | g++-4.7 Build-Conflicts: oprofile, ocaml Standards-Version: 4.2.1
  3. Download patch debian/patches/hurd/hurd-EIEIO-undef.diff

    --- 1:9.0.0-3/debian/patches/hurd/hurd-EIEIO-undef.diff 2019-10-24 22:12:04.000000000 +0000 +++ 1:9.0.0-3ubuntu2/debian/patches/hurd/hurd-EIEIO-undef.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -Index: llvm-toolchain-9_9.0.0/llvm/utils/TableGen/CodeEmitterGen.cpp -=================================================================== ---- llvm-toolchain-9_9.0.0.orig/llvm/utils/TableGen/CodeEmitterGen.cpp -+++ llvm-toolchain-9_9.0.0/llvm/utils/TableGen/CodeEmitterGen.cpp -@@ -247,6 +247,9 @@ void CodeEmitterGen::run(raw_ostream &o) - ArrayRef<const CodeGenInstruction*> NumberedInstructions = - Target.getInstructionsByEnumValue(); - -+ o << "// Undef for HURD\n"; -+ o << "#ifdef EIEIO\n#undef EIEIO\n#endif\n"; -+ - // Emit function declaration - o << "uint64_t " << Target.getName(); - o << "MCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,\n"
  4. Download patch debian/patches/hurd-EIEIO-undef.diff

    --- 1:9.0.0-3/debian/patches/hurd-EIEIO-undef.diff 2019-10-25 07:25:08.000000000 +0000 +++ 1:9.0.0-3ubuntu2/debian/patches/hurd-EIEIO-undef.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -Index: llvm-toolchain-snapshot_9~svn351647/utils/TableGen/CodeEmitterGen.cpp -=================================================================== ---- llvm-toolchain-snapshot_9~svn351647.orig/utils/TableGen/CodeEmitterGen.cpp -+++ llvm-toolchain-snapshot_9~svn351647/utils/TableGen/CodeEmitterGen.cpp -@@ -238,6 +238,9 @@ void CodeEmitterGen::run(raw_ostream &o) - ArrayRef<const CodeGenInstruction*> NumberedInstructions = - Target.getInstructionsByEnumValue(); - -+ o << "// Undef for HURD\n"; -+ o << "#ifdef EIEIO\n#undef EIEIO\n#endif\n"; -+ - // Emit function declaration - o << "uint64_t " << Target.getName(); - o << "MCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,\n"
  5. Download patch debian/patches/hurd/hurd-cxx-paths.diff
  6. Download patch debian/patches/series

    --- 1:9.0.0-3/debian/patches/series 2019-10-30 07:24:38.000000000 +0000 +++ 1:9.0.0-3ubuntu2/debian/patches/series 2019-11-03 17:58:36.000000000 +0000 @@ -98,8 +98,8 @@ remove-apple-clang-manpage.diff # Hurd port hurd/hurd-pathmax.diff -hurd/hurd-EIEIO-undef.diff hurd/impl-path-hurd.diff +hurd/hurd-cxx-paths.diff # powerpcspe #powerpcspe/D49754-powerpcspe-clang.diff
  7. Download patch debian/patches/hurd/hurd-pathmax.diff

    --- 1:9.0.0-3/debian/patches/hurd/hurd-pathmax.diff 2019-10-24 22:12:04.000000000 +0000 +++ 1:9.0.0-3ubuntu2/debian/patches/hurd/hurd-pathmax.diff 2019-11-03 16:04:16.000000000 +0000 @@ -1,20 +1,3 @@ -Index: llvm-toolchain-9_9.0.0/clang/lib/Basic/FileManager.cpp -=================================================================== ---- llvm-toolchain-9_9.0.0.orig/clang/lib/Basic/FileManager.cpp -+++ llvm-toolchain-9_9.0.0/clang/lib/Basic/FileManager.cpp -@@ -465,6 +465,12 @@ void FileManager::invalidateCache(const - UniqueRealFiles.erase(Entry->getUniqueID()); - } - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ -+ - void FileManager::GetUniqueIDMapping( - SmallVectorImpl<const FileEntry *> &UIDToFiles) const { - UIDToFiles.clear(); Index: llvm-toolchain-9_9.0.0/lldb/include/lldb/lldb-defines.h =================================================================== --- llvm-toolchain-9_9.0.0.orig/lldb/include/lldb/lldb-defines.h @@ -31,22 +14,6 @@ Index: llvm-toolchain-9_9.0.0/lldb/inclu #if !defined(UINT32_MAX) #define UINT32_MAX 4294967295U #endif -Index: llvm-toolchain-9_9.0.0/llvm/tools/dsymutil/DwarfLinker.cpp -=================================================================== ---- llvm-toolchain-9_9.0.0.orig/llvm/tools/dsymutil/DwarfLinker.cpp -+++ llvm-toolchain-9_9.0.0/llvm/tools/dsymutil/DwarfLinker.cpp -@@ -100,6 +100,11 @@ - #include <utility> - #include <vector> - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ - namespace llvm { - namespace dsymutil { - Index: llvm-toolchain-9_9.0.0/polly/lib/External/ppcg/cuda_common.c =================================================================== --- llvm-toolchain-9_9.0.0.orig/polly/lib/External/ppcg/cuda_common.c

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: rustc

rustc (1.38.0+dfsg0.2+llvm-0ubuntu1) focal; urgency=medium * New upstream release. * Add Build-Depends-Indep: libssl-dev * Update Files-Excluded for new upstream version 1.38.0 * d/patches/d-0004-mdbook-2-1-compat.patch: Removed. * Refresh other patches. -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 13 Nov 2019 09:29:49 +1300 rustc (1.37.0+dfsg1+llvm-1ubuntu1) eoan; urgency=medium * Merge from Debian unstable (LP #1843765). Remaning changes: - Use the bundled llvm to avoid having to do llvm updates in order to deliver rust updates - update debian/config.toml.in - update debian/control - update debian/copyright - update debian/rules - Build-Depend on libc6-dbg on armhf, to workaround a crash in ld.so during some debuginfo tests - update debian/control - Add a hack to ensure the stage0 compiler is extracted to the correct location - update debian/make_orig-stage0_tarball.sh - Scrub -g from CFLAGS and CXXFLAGS in order to let rustbuild control whether LLVM is compiled with debug symbols - update debian/rules - On i386, only build debuginfo for libstd - update debian/rules - Ignore all test failures on every architecture - update debian/rules - Version the Build-Conflict on gdb-minimal as gdb now Provides it - update debian/control - Adjust the rustc Breaks/Replaces libstd-rust-dev version to fix an upgrade issue - update debian/control - Adjust debian/watch to include +llvm in upstream version. - update debian/watch * Revert "Support cross-compiling to wasm32" as it breaks with the bundled snapshot of LLVM 9. - delete debian/libstd-rust-dev-wasm32-cross.lintian-overrides - delete debian/rustc.links - update debian/config.toml.in - update debian/control - update debian/rules -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 18 Sep 2019 14:31:31 +0200

Modifications :
  1. Download patch src/ci/docker/x86_64-gnu-tools/checktools.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-tools/checktools.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-tools/checktools.sh 2019-09-23 21:15:52.000000000 +0000 @@ -25,6 +25,7 @@ python2.7 "$X_PY" test --no-fail-fast \ src/doc/rust-by-example \ src/doc/embedded-book \ src/doc/edition-guide \ + src/doc/rustc-guide \ src/tools/clippy \ src/tools/rls \ src/tools/rustfmt \ @@ -41,7 +42,7 @@ check_tool_failed() { } # This function checks that if a tool's submodule changed, the tool's state must improve -verify_status() { +verify_submodule_changed() { echo "Verifying status of $1..." if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then echo "This PR updated '$2', verifying if status is 'test-pass'..." @@ -66,7 +67,7 @@ verify_status() { check_dispatch() { if [ "$1" = submodule_changed ]; then # ignore $2 (branch id) - verify_status $3 $4 + verify_submodule_changed $3 $4 elif [ "$2" = beta ]; then echo "Requiring test passing for $3..." if check_tool_failed "$3"; then @@ -75,7 +76,12 @@ check_dispatch() { fi } -# list all tools here +# List all tools here. +# This function gets called with "submodule_changed" for each PR that changed a submodule, +# and with "beta_required" for each PR that lands on beta/stable. +# The purpose of this function is to *reject* PRs if a tool is not "test-pass" and +# (a) the tool's submodule has been updated, or (b) we landed on beta/stable and the +# tool has to "test-pass" on that branch. status_check() { check_dispatch $1 beta book src/doc/book check_dispatch $1 beta nomicon src/doc/nomicon @@ -85,9 +91,13 @@ status_check() { check_dispatch $1 beta rls src/tools/rls check_dispatch $1 beta rustfmt src/tools/rustfmt check_dispatch $1 beta clippy-driver src/tools/clippy - # these tools are not required for beta to successfully branch + # These tools are not required on the beta/stable branches, but they *do* cause + # PRs to fail if a submodule update does not fix them. + # They will still cause failure during the beta cutoff week, unless `checkregression.py` + # exempts them from that. check_dispatch $1 nightly miri src/tools/miri check_dispatch $1 nightly embedded-book src/doc/embedded-book + check_dispatch $1 nightly rustc-guide src/doc/rustc-guide } # If this PR is intended to update one of these tools, do not let the build pass @@ -96,12 +106,14 @@ status_check() { status_check "submodule_changed" CHECK_NOT="$(readlink -f "$(dirname $0)/checkregression.py")" +# This callback is called by `commit_toolstate_change`, see `repo.sh`. change_toolstate() { # only update the history if python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" changed; then echo 'Toolstate is not changed. Not updating.' else if [ $SIX_WEEK_CYCLE -ge 35 ]; then + # Reject any regressions during the week before beta cutoff. python2.7 "$CHECK_NOT" "$OS" "$TOOLSTATE_FILE" "_data/latest.json" regressed fi sed -i "1 a\\ @@ -111,7 +123,7 @@ $COMMIT\t$(cat "$TOOLSTATE_FILE") } if [ "$RUST_RELEASE_CHANNEL" = nightly ]; then - if [ -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then + if [ -n "${TOOLSTATE_PUBLISH+is_set}" ]; then . "$(dirname $0)/repo.sh" MESSAGE_FILE=$(mktemp -t msg.XXXXXX) echo "($OS CI update)" > "$MESSAGE_FILE"
  2. Download patch src/ci/docker/dist-various-1/install-mipsel-musl.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-various-1/install-mipsel-musl.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-various-1/install-mipsel-musl.sh 2019-09-23 21:15:52.000000000 +0000 @@ -5,7 +5,7 @@ mkdir /usr/local/mipsel-linux-musl # Note that this originally came from: # https://downloads.openwrt.org/snapshots/trunk/malta/generic/ # OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 -URL="https://rust-lang-ci2.s3.amazonaws.com/libc" +URL="https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc" FILE="OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2" curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
  3. Download patch src/ci/docker/x86_64-gnu-tools/checkregression.py

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-tools/checkregression.py 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-tools/checkregression.py 2019-09-23 21:15:52.000000000 +0000 @@ -1,9 +1,18 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +## This script has two purposes: detect any tool that *regressed*, which is used +## during the week before the beta branches to reject PRs; and detect any tool +## that *changed* to see if we need to update the toolstate repo. + import sys import json +# Regressions for these tools during the beta cutoff week do not cause failure. +# See `status_check` in `checktools.sh` for tools that have to pass on the +# beta/stable branches. +REGRESSION_OK = ["rustc-guide", "miri", "embedded-book"] + if __name__ == '__main__': os_name = sys.argv[1] toolstate_file = sys.argv[2] @@ -32,7 +41,8 @@ if __name__ == '__main__': 'The state of "{}" has {} from "{}" to "{}"' .format(tool, verb, state, new_state) ) - regressed = True + if not (verb == 'regressed' and tool in REGRESSION_OK): + regressed = True if regressed: sys.exit(1)
  4. Download patch debian/patches/d-read-beta-version-from-file.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-read-beta-version-from-file.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-read-beta-version-from-file.patch 2019-11-12 08:14:11.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs -@@ -883,41 +883,13 @@ +@@ -941,41 +941,13 @@ return s }
  5. Download patch debian/patches/d-dont-download-stage0.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-dont-download-stage0.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-dont-download-stage0.patch 2019-11-12 08:14:11.000000000 +0000 @@ -7,7 +7,7 @@ Forwarded: not-needed This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py -@@ -24,16 +24,18 @@ +@@ -14,16 +14,18 @@ from time import time @@ -30,7 +30,7 @@ This patch header follows DEP-3: http:// if os.path.exists(path): if verify(path, sha_path, False): if verbose: -@@ -51,7 +53,6 @@ +@@ -41,7 +43,6 @@ print("moving {} to {}".format(temp_path, path)) shutil.move(temp_path, path) finally: @@ -38,7 +38,7 @@ This patch header follows DEP-3: http:// delete_if_present(temp_path, verbose) -@@ -373,7 +374,7 @@ +@@ -386,7 +387,7 @@ url = "{}/dist/{}".format(self._download_url, self.date) tarball = os.path.join(rustc_cache, filename)
  6. Download patch debian/patches/u-reproducible-dl-stage0.patch

    --- 1.37.0+dfsg1-1/debian/patches/u-reproducible-dl-stage0.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/u-reproducible-dl-stage0.patch 2019-11-12 08:14:11.000000000 +0000 @@ -1,6 +1,6 @@ --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py -@@ -88,7 +88,7 @@ +@@ -81,7 +81,7 @@ run(["curl", option, "-y", "30", "-Y", "10", # timeout if speed is < 10 bytes/sec for > 30 seconds "--connect-timeout", "30", # timeout if cannot connect within 30 seconds
  7. Download patch src/ci/run.sh

    --- 1.37.0+dfsg1-1/src/ci/run.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/run.sh 2019-09-23 21:15:52.000000000 +0000 @@ -25,7 +25,7 @@ source "$ci_dir/shared.sh" branch_name=$(getCIBranch) -if [ ! isCI ] || [ "$branch_name" = "auto" ]; then +if [ ! isCI ] || [ "$branch_name" = "auto" ] || [ "$branch_name" = "try" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests" fi @@ -91,27 +91,14 @@ if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" rm -rf build fi -travis_fold start configure -travis_time_start $SRC/configure $RUST_CONFIGURE_ARGS -travis_fold end configure -travis_time_finish -travis_fold start make-prepare -travis_time_start retry make prepare -travis_fold end make-prepare -travis_time_finish -travis_fold start check-bootstrap -travis_time_start make check-bootstrap -travis_fold end check-bootstrap -travis_time_finish # Display the CPU and memory information. This helps us know why the CI timing # is fluctuating. -travis_fold start log-system-info if isOSX; then system_profiler SPHardwareDataType || true sysctl hw || true @@ -121,19 +108,14 @@ else cat /proc/meminfo || true ncpus=$(grep processor /proc/cpuinfo | wc -l) fi -travis_fold end log-system-info if [ ! -z "$SCRIPT" ]; then sh -x -c "$SCRIPT" else do_make() { - travis_fold start "make-$1" - travis_time_start echo "make -j $ncpus $1" make -j $ncpus $1 local retval=$? - travis_fold end "make-$1" - travis_time_finish return $retval }
  8. Download patch debian/patches/u-reproducible-build.patch

    --- 1.37.0+dfsg1-1/debian/patches/u-reproducible-build.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/u-reproducible-build.patch 2019-11-12 08:14:11.000000000 +0000 @@ -4,7 +4,7 @@ Bug: https://github.com/rust-lang/rust/i --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs -@@ -140,6 +140,11 @@ +@@ -123,6 +123,11 @@ let mut cfg = cc::Build::new(); cfg.warnings(false); for flag in cxxflags.split_whitespace() {
  9. Download patch README.md

    --- 1.37.0+dfsg1-1/README.md 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/README.md 2019-09-23 21:15:52.000000000 +0000 @@ -6,7 +6,6 @@ standard library, and documentation. [Rust]: https://www.rust-lang.org ## Quick Start -[quick-start]: #quick-start Read ["Installation"] from [The Book]. @@ -14,11 +13,15 @@ Read ["Installation"] from [The Book]. [The Book]: https://doc.rust-lang.org/book/index.html ## Installing from Source -[building-from-source]: #building-from-source -_Note: If you wish to contribute to the compiler, you should read -[this chapter](https://rust-lang.github.io/rustc-guide/how-to-build-and-run.html) -of the rustc-guide instead._ +_Note: If you wish to contribute to the compiler, you should read [this +chapter][rustcguidebuild] of the rustc-guide instead of this section._ + +The Rust build system has a Python script called `x.py` to bootstrap building +the compiler. More information about it may be found by running `./x.py --help` +or reading the [rustc guide][rustcguidebuild]. + +[rustcguidebuild]: https://rust-lang.github.io/rustc-guide/how-to-build-and-run.html ### Building on *nix 1. Make sure you have installed the dependencies: @@ -39,43 +42,36 @@ of the rustc-guide instead._ [source]: https://github.com/rust-lang/rust -3. Build and install: - - ```sh - $ ./x.py build && sudo ./x.py install - ``` +3. Configure the build settings: - If after running `sudo ./x.py install` you see an error message like + The Rust build system uses a file named `config.toml` in the root of the + source tree to determine various configuration settings for the build. + Copy the default `config.toml.example` to `config.toml` to get started. - ``` - error: failed to load source for a dependency on 'cc' + ```sh + $ cp config.toml.example config.toml ``` - then run these two commands and then try `sudo ./x.py install` again: + It is recommended that if you plan to use the Rust build system to create + an installation (using `./x.py install`) that you set the `prefix` value + in the `[install]` section to a directory that you have write permissions. - ``` - $ cargo install cargo-vendor - ``` +4. Build and install: + ```sh + $ ./x.py build && ./x.py install ``` - $ cargo vendor - ``` - - > ***Note:*** Install locations can be adjusted by copying the config file - > from `./config.toml.example` to `./config.toml`, and - > adjusting the `prefix` option under `[install]`. Various other options, such - > as enabling debug information, are also supported, and are documented in - > the config file. - When complete, `sudo ./x.py install` will place several programs into - `/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the + When complete, `./x.py install` will place several programs into + `$PREFIX/bin`: `rustc`, the Rust compiler, and `rustdoc`, the API-documentation tool. This install does not include [Cargo], - Rust's package manager, which you may also want to build. + Rust's package manager. To build and install Cargo, you may + run `./x.py install cargo` or set the `build.extended` key in + `config.toml` to `true` to build and install all tools. [Cargo]: https://github.com/rust-lang/cargo ### Building on Windows -[building-on-windows]: #building-on-windows There are two prominent ABIs in use on Windows: the native (MSVC) ABI used by Visual Studio, and the GNU ABI used by the GCC toolchain. Which version of Rust @@ -85,7 +81,6 @@ for interop with GNU software built usin build. #### MinGW -[windows-mingw]: #windows-mingw [MSYS2][msys2] can be used to easily build Rust on Windows: @@ -126,7 +121,6 @@ build. ``` #### MSVC -[windows-msvc]: #windows-msvc MSVC builds of Rust additionally require an installation of Visual Studio 2017 (or later) so `rustc` can use its linker. The simplest way is to get the @@ -155,7 +149,6 @@ by manually calling the appropriate vcva ``` #### Specifying an ABI -[specifying-an-abi]: #specifying-an-abi Each specific ABI can also be used from either environment (for example, using the GNU ABI in PowerShell) by using an explicit build triple. The available @@ -169,11 +162,10 @@ Windows build triples are: The build triple can be specified by either specifying `--build=<triple>` when invoking `x.py` commands, or by copying the `config.toml` file (as described -in Building From Source), and modifying the `build` option under the `[build]` -section. +in [Installing From Source](#installing-from-source)), and modifying the +`build` option under the `[build]` section. ### Configure and Make -[configure-and-make]: #configure-and-make While it's not the recommended build system, this project also provides a configure script and makefile (the latter of which just invokes `x.py`). @@ -188,7 +180,6 @@ When using the configure script, the gen `config.mk` file. ## Building Documentation -[building-documentation]: #building-documentation If you’d like to build the documentation, it’s almost the same: @@ -201,7 +192,6 @@ the ABI used. I.e., if the ABI was `x86_ `build\x86_64-pc-windows-msvc\doc`. ## Notes -[notes]: #notes Since the Rust compiler is written in Rust, it must be built by a precompiled "snapshot" version of itself (made in an earlier stage of @@ -210,11 +200,11 @@ fetch snapshots, and an OS that can exec Snapshot binaries are currently built and tested on several platforms: -| Platform / Architecture | x86 | x86_64 | -|--------------------------|-----|--------| -| Windows (7, 8, 10, ...) | ✓ | ✓ | -| Linux (2.6.18 or later) | ✓ | ✓ | -| OSX (10.7 Lion or later) | ✓ | ✓ | +| Platform / Architecture | x86 | x86_64 | +|----------------------------|-----|--------| +| Windows (7, 8, 10, ...) | ✓ | ✓ | +| Linux (2.6.18 or later) | ✓ | ✓ | +| macOS (10.7 Lion or later) | ✓ | ✓ | You may find that other platforms work, but these are our officially supported build environments that are most likely to work. @@ -224,7 +214,6 @@ There is more advice about hacking on Ru [CONTRIBUTING.md]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md ## Getting Help -[getting-help]: #getting-help The Rust community congregates in a few places: @@ -237,7 +226,6 @@ The Rust community congregates in a few [users.rust-lang.org]: https://users.rust-lang.org/ ## Contributing -[contributing]: #contributing To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md). @@ -258,7 +246,6 @@ Also, you may find the [rustdocs for the [rustdocs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ ## License -[license]: #license Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various @@ -268,7 +255,6 @@ See [LICENSE-APACHE](LICENSE-APACHE), [L [COPYRIGHT](COPYRIGHT) for details. ## Trademark -[trademark]: #trademark The Rust programming language is an open source, community project governed by a core team. It is also sponsored by the Mozilla Foundation (“Mozilla”),
  10. Download patch src/bootstrap/native.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/native.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/native.rs 2019-09-23 21:15:52.000000000 +0000 @@ -104,7 +104,6 @@ impl Step for Llvm { } } - let _folder = builder.fold_output(|| "llvm"); let descriptor = if emscripten { "Emscripten " } else { "" }; builder.info(&format!("Building {}LLVM for {}", descriptor, target)); let _time = util::timeit(&builder); @@ -126,14 +125,18 @@ impl Step for Llvm { } else { match builder.config.llvm_targets { Some(ref s) => s, - None => "X86;ARM;AArch64;Mips;PowerPC;SystemZ;MSP430;Sparc;NVPTX;Hexagon", + None => "AArch64;ARM;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;\ + Sparc;SystemZ;WebAssembly;X86", } }; let llvm_exp_targets = if self.emscripten { "" } else { - &builder.config.llvm_experimental_targets[..] + match builder.config.llvm_experimental_targets { + Some(ref s) => s, + None => "", + } }; let assertions = if builder.config.llvm_assertions {"ON"} else {"OFF"}; @@ -151,6 +154,7 @@ impl Step for Llvm { .define("WITH_POLLY", "OFF") .define("LLVM_ENABLE_TERMINFO", "OFF") .define("LLVM_ENABLE_LIBEDIT", "OFF") + .define("LLVM_ENABLE_Z3_SOLVER", "OFF") .define("LLVM_PARALLEL_COMPILE_JOBS", builder.jobs().to_string()) .define("LLVM_TARGET_ARCH", target.split('-').next().unwrap()) .define("LLVM_DEFAULT_TARGET_TRIPLE", target); @@ -493,7 +497,6 @@ impl Step for Lld { return out_dir } - let _folder = builder.fold_output(|| "lld"); builder.info(&format!("Building LLD for {}", target)); let _time = util::timeit(&builder); t!(fs::create_dir_all(&out_dir)); @@ -548,7 +551,7 @@ impl Step for TestHelpers { } /// Compiles the `rust_test_helpers.c` library which we used in various - /// `run-pass` test suites for ABI testing. + /// `run-pass` tests for ABI testing. fn run(self, builder: &Builder<'_>) { if builder.config.dry_run { return; @@ -560,7 +563,6 @@ impl Step for TestHelpers { return } - let _folder = builder.fold_output(|| "build_test_helpers"); builder.info("Building test helpers"); t!(fs::create_dir_all(&dst)); let mut cfg = cc::Build::new();
  11. Download patch src/bootstrap/mk/Makefile.in

    --- 1.37.0+dfsg1-1/src/bootstrap/mk/Makefile.in 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/mk/Makefile.in 2019-09-23 21:15:52.000000000 +0000 @@ -48,10 +48,8 @@ check: $(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS) check-aux: $(Q)$(BOOTSTRAP) test \ - src/test/run-pass/pretty \ src/test/run-fail/pretty \ src/test/run-pass-valgrind/pretty \ - src/test/run-pass-fulldeps/pretty \ $(AUX_ARGS) \ $(BOOTSTRAP_ARGS) check-bootstrap: @@ -75,9 +73,7 @@ check-stage2-T-x86_64-unknown-linux-musl TESTS_IN_2 := \ src/test/ui \ - src/test/run-pass \ src/test/compile-fail \ - src/test/run-pass-fulldeps \ src/tools/linkchecker ci-subset-1:
  12. Download patch debian/patches/d-add-soname.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-add-soname.patch 2019-07-13 19:25:45.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-add-soname.patch 2019-11-12 08:14:11.000000000 +0000 @@ -20,7 +20,7 @@ Forwarded: no --- a/src/librustc_codegen_ssa/back/link.rs +++ b/src/librustc_codegen_ssa/back/link.rs -@@ -1034,6 +1034,13 @@ +@@ -1203,6 +1203,13 @@ cmd.args(&rpath::get_rpath_flags(&mut rpath_config)); }
  13. Download patch src/bootstrap/tool.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/tool.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/tool.rs 2019-09-23 21:15:52.000000000 +0000 @@ -9,7 +9,7 @@ use build_helper::t; use crate::Mode; use crate::Compiler; use crate::builder::{Step, RunConfig, ShouldRun, Builder}; -use crate::util::{exe, add_lib_path}; +use crate::util::{exe, add_lib_path, CiEnv}; use crate::compile; use crate::channel::GitInfo; use crate::channel; @@ -74,7 +74,6 @@ impl Step for ToolBuild { &self.extra_features, ); - let _folder = builder.fold_output(|| format!("stage{}-{}", compiler.stage, tool)); builder.info(&format!("Building stage{} tool {} ({})", compiler.stage, tool, target)); let mut duplicates = Vec::new(); let is_expected = compile::stream_cargo(builder, &mut cargo, vec![], &mut |msg| { @@ -109,36 +108,63 @@ impl Step for ToolBuild { continue } - // Don't worry about libs that turn out to be host dependencies - // or build scripts, we only care about target dependencies that - // are in `deps`. - if let Some(maybe_target) = val.1 - .parent() // chop off file name - .and_then(|p| p.parent()) // chop off `deps` - .and_then(|p| p.parent()) // chop off `release` - .and_then(|p| p.file_name()) - .and_then(|p| p.to_str()) - { - if maybe_target != &*target { - continue + // Don't worry about compiles that turn out to be host + // dependencies or build scripts. To skip these we look for + // anything that goes in `.../release/deps` but *doesn't* go in + // `$target/release/deps`. This ensure that outputs in + // `$target/release` are still considered candidates for + // deduplication. + if let Some(parent) = val.1.parent() { + if parent.ends_with("release/deps") { + let maybe_target = parent + .parent() + .and_then(|p| p.parent()) + .and_then(|p| p.file_name()) + .and_then(|p| p.to_str()) + .unwrap(); + if maybe_target != &*target { + continue; + } } } + // Record that we've built an artifact for `id`, and if one was + // already listed then we need to see if we reused the same + // artifact or produced a duplicate. let mut artifacts = builder.tool_artifacts.borrow_mut(); let prev_artifacts = artifacts .entry(target) .or_default(); - if let Some(prev) = prev_artifacts.get(&*id) { - if prev.1 != val.1 { - duplicates.push(( - id.to_string(), - val, - prev.clone(), - )); + let prev = match prev_artifacts.get(&*id) { + Some(prev) => prev, + None => { + prev_artifacts.insert(id.to_string(), val); + continue; } - return + }; + if prev.1 == val.1 { + return; // same path, same artifact } - prev_artifacts.insert(id.to_string(), val); + + // If the paths are different and one of them *isn't* inside of + // `release/deps`, then it means it's probably in + // `$target/release`, or it's some final artifact like + // `libcargo.rlib`. In these situations Cargo probably just + // copied it up from `$target/release/deps/libcargo-xxxx.rlib`, + // so if the features are equal we can just skip it. + let prev_no_hash = prev.1.parent().unwrap().ends_with("release/deps"); + let val_no_hash = val.1.parent().unwrap().ends_with("release/deps"); + if prev.2 == val.2 || !prev_no_hash || !val_no_hash { + return; + } + + // ... and otherwise this looks like we duplicated some sort of + // compilation, so record it to generate an error later. + duplicates.push(( + id.to_string(), + val, + prev.clone(), + )); } }); @@ -253,11 +279,26 @@ pub fn prepare_tool_cargo( cargo } +fn rustbook_features() -> Vec<String> { + let mut features = Vec::new(); + + // Due to CI budged and risk of spurious failures we want to limit jobs running this check. + // At same time local builds should run it regardless of the platform. + // `CiEnv::None` means it's local build and `CHECK_LINKS` is defined in x86_64-gnu-tools to + // explicitly enable it on single job + if CiEnv::current() == CiEnv::None || env::var("CHECK_LINKS").is_ok() { + features.push("linkcheck".to_string()); + } + + features +} + macro_rules! bootstrap_tool { ($( $name:ident, $path:expr, $tool_name:expr $(,llvm_tools = $llvm:expr)* $(,is_external_tool = $external:expr)* + $(,features = $features:expr)* ; )+) => { #[derive(Copy, PartialEq, Eq, Clone)] @@ -324,7 +365,12 @@ macro_rules! bootstrap_tool { } else { SourceType::InTree }, - extra_features: Vec::new(), + extra_features: { + // FIXME(#60643): avoid this lint by using `_` + let mut _tmp = Vec::new(); + $(_tmp.extend($features);)* + _tmp + }, }).expect("expected to build -- essential tool") } } @@ -333,7 +379,7 @@ macro_rules! bootstrap_tool { } bootstrap_tool!( - Rustbook, "src/tools/rustbook", "rustbook"; + Rustbook, "src/tools/rustbook", "rustbook", features = rustbook_features(); UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen"; Tidy, "src/tools/tidy", "tidy"; Linkchecker, "src/tools/linkchecker", "linkchecker"; @@ -482,7 +528,6 @@ impl Step for Rustdoc { &[], ); - let _folder = builder.fold_output(|| format!("stage{}-rustdoc", target_compiler.stage)); builder.info(&format!("Building rustdoc for stage{} ({})", target_compiler.stage, target_compiler.host)); builder.run(&mut cargo);
  14. Download patch src/bootstrap/cc_detect.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/cc_detect.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/cc_detect.rs 2019-09-23 21:15:52.000000000 +0000 @@ -45,6 +45,8 @@ fn cc2ar(cc: &Path, target: &str) -> Opt Some(PathBuf::from("ar")) } else if target.contains("openbsd") { Some(PathBuf::from("ar")) + } else if target.contains("vxworks") { + Some(PathBuf::from("vx-ar")) } else { let parent = cc.parent().unwrap(); let file = cc.file_name().unwrap().to_str().unwrap();
  15. Download patch debian/patches/d-0000-ignore-removed-submodules.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-0000-ignore-removed-submodules.patch 2019-07-13 19:07:27.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-0000-ignore-removed-submodules.patch 2019-11-12 08:14:11.000000000 +0000 @@ -57,7 +57,7 @@ Forwarded: not-needed -clippy_lints = { path = "src/tools/clippy/clippy_lints" } --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py -@@ -642,10 +642,6 @@ +@@ -641,10 +641,6 @@ os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")] for _ in range(1, self.verbose): args.append("--verbose") @@ -70,7 +70,7 @@ Forwarded: not-needed def build_triple(self): --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs -@@ -1179,10 +1179,7 @@ +@@ -1207,10 +1207,7 @@ } } @@ -84,7 +84,7 @@ Forwarded: not-needed --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs -@@ -147,7 +147,7 @@ +@@ -113,7 +113,7 @@ impl Step for CargoBook { type Output = ();
  16. Download patch src/bootstrap/configure.py

    --- 1.37.0+dfsg1-1/src/bootstrap/configure.py 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/configure.py 2019-09-23 21:15:52.000000000 +0000 @@ -36,7 +36,6 @@ o("docs", "build.docs", "build standard o("compiler-docs", "build.compiler-docs", "build compiler documentation") o("optimize-tests", "rust.optimize-tests", "build tests with optimizations") o("parallel-compiler", "rust.parallel-compiler", "build a multi-threaded rustc") -o("test-miri", "rust.test-miri", "run miri's test suite") o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests") o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds") o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds") @@ -125,7 +124,9 @@ v("musl-root-armhf", "target.arm-unknown "arm-unknown-linux-musleabihf install directory") v("musl-root-armv5te", "target.armv5te-unknown-linux-musleabi.musl-root", "armv5te-unknown-linux-musleabi install directory") -v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root", +v("musl-root-armv7", "target.armv7-unknown-linux-musleabi.musl-root", + "armv7-unknown-linux-musleabi install directory") +v("musl-root-armv7hf", "target.armv7-unknown-linux-musleabihf.musl-root", "armv7-unknown-linux-musleabihf install directory") v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root", "aarch64-unknown-linux-musl install directory")
  17. Download patch CONTRIBUTING.md

    --- 1.37.0+dfsg1-1/CONTRIBUTING.md 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/CONTRIBUTING.md 2019-09-23 21:15:52.000000000 +0000 @@ -179,7 +179,6 @@ Speaking of tests, Rust has a comprehens it can be found [here][rctd]. ### External Dependencies -[external-dependencies]: #external-dependencies Currently building Rust will also build the following external projects: @@ -209,7 +208,6 @@ Breakage is not allowed in the beta and before the PR is merged. #### Breaking Tools Built With The Compiler -[breaking-tools-built-with-the-compiler]: #breaking-tools-built-with-the-compiler Rust's build system builds a number of tools that make use of the internals of the compiler. This includes @@ -242,7 +240,7 @@ Here are those same steps in detail: `config.toml.example` in the root directory of the Rust repository. Set `submodules = false` in the `[build]` section. This will prevent `x.py` from resetting to the original branch after you make your changes. If you - need to [update any submodules to their latest versions][updating-submodules], + need to [update any submodules to their latest versions](#updating-submodules), see the section of this file about that for more information. 2. (optional) Run `./x.py test src/tools/rustfmt` (substituting the submodule that broke for `rustfmt`). Fix any errors in the submodule (and possibly others). @@ -256,7 +254,6 @@ Here are those same steps in detail: 8. (optional) Send a PR to rust-lang/rust updating the submodule. #### Updating submodules -[updating-submodules]: #updating-submodules These instructions are specific to updating `rustfmt`, however they may apply to the other submodules as well. Please help by improving these instructions @@ -310,7 +307,6 @@ This should change the version listed in the submodule to. Running `./x.py build` should work now. ## Writing Documentation -[writing-documentation]: #writing-documentation Documentation improvements are very welcome. The source of `doc.rust-lang.org` is located in `src/doc` in the tree, and standard API documentation is generated @@ -337,7 +333,6 @@ tracker in that repo is also a great way are issues for beginners and advanced compiler devs alike! ## Issue Triage -[issue-triage]: #issue-triage Sometimes, an issue will stay open, even though the bug has been fixed. And sometimes, the original bug may go stale because something has changed in the @@ -405,7 +400,6 @@ If you're looking for somewhere to start [rfcbot]: https://github.com/anp/rfcbot-rs/ ## Out-of-tree Contributions -[out-of-tree-contributions]: #out-of-tree-contributions There are a number of other ways to contribute to Rust that don't deal with this repository. @@ -425,7 +419,6 @@ valuable! [community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library ## Helpful Links and Information -[helpful-info]: #helpful-info For people new to Rust, and just starting to contribute, or even for more seasoned developers, some useful places to look for information
  18. Download patch debian/rules

    --- 1.37.0+dfsg1-1/debian/rules 2019-09-05 07:04:56.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/rules 2019-09-20 10:11:23.000000000 +0000 @@ -27,21 +27,17 @@ endif include debian/architecture.mk export DEB_HOST_RUST_TYPE +# Let rustbuild control whether LLVM is compiled with debug symbols, rather +# than compiling with debug symbols unconditionally, which will fail on +# 32-bit architectures +CFLAGS := $(shell echo $(CFLAGS) | sed -e 's/\-g//') +CXXFLAGS := $(shell echo $(CFLAGS) | sed -e 's/\-g//') + # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_DESTDIR := $(CURDIR)/debian/tmp -# Use system LLVM (comment out to use vendored LLVM) -LLVM_VERSION = 8 -OLD_LLVM_VERSION = 7 -# Make it easier to test against a custom LLVM -ifneq (,$(LLVM_DESTDIR)) -LLVM_LIBRARY_PATH := $(LLVM_DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH):$(LLVM_DESTDIR)/usr/lib -LD_LIBRARY_PATH := $(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):$(LLVM_LIBRARY_PATH),$(LLVM_LIBRARY_PATH)) -export LD_LIBRARY_PATH -endif - RUSTBUILD = RUST_BACKTRACE=1 ./x.py RUSTBUILD_FLAGS = --config debian/config.toml -vvv --on-fail env # TODO: This should simply be "$(RUSTBUILD) test" but unfortunately this causes @@ -156,14 +152,12 @@ debian/config.toml: debian/config.toml.i -DDEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ -DDEB_TARGET_GNU_TYPE="$(DEB_TARGET_GNU_TYPE)" \ -DMAKE_OPTIMISATIONS="$(MAKE_OPTIMISATIONS)" \ - -DLLVM_DESTDIR="$(LLVM_DESTDIR)" \ - -DLLVM_VERSION="$(LLVM_VERSION)" \ -DRUST_DESTDIR="$(RUST_DESTDIR)" \ "$<" > "$@" if $(DOWNLOAD_BOOTSTRAP) || [ $(HAVE_BINARY_TARBALL) != 0 ]; \ then sed -i -e '/^rustc = /d' -e '/^cargo = /d' "$@"; fi # Work around low-memory (32-bit) architectures: https://github.com/rust-lang/rust/issues/45854 -#ifneq (,$(filter $(DEB_BUILD_ARCH), armhf armel mips mipsel powerpc powerpcspe)) +#ifneq (,$(filter $(DEB_BUILD_ARCH), armhf armel i386 mips mipsel powerpc powerpcspe)) sed -i -e 's/^debuginfo-level = .*/debuginfo-level = 0/g' "$@" #endif @@ -172,8 +166,6 @@ debian/rust-src.%: debian/rust-src.%.in "$<" > "$@" debian/dh_auto_configure.stamp: debian/config.toml - # fail the build if we have any instances of OLD_LLVM_VERSION in debian, except for debian/changelog - ! grep --color=always -i 'll\(..\|d\)-\?$(subst .,\.,$(OLD_LLVM_VERSION))' --exclude=changelog --exclude='*.patch' -R debian # fail the build if our version contains ~exp and we are not releasing to experimental v="$(DEB_VERSION)"; test "$$v" = "$${v%~exp*}" -o "$(DEB_DISTRIBUTION)" = "experimental" -o "$(DEB_DISTRIBUTION)" = "UNRELEASED" $(PRECONFIGURE_CHECK) @@ -198,65 +190,33 @@ endif override_dh_auto_clean: $(RM) -rf build tmp .cargo debian/cargo_home config.stamp config.mk Makefile - $(RM) -rf $(TEST_LOG) debian/config.toml debian/rust-src.install debian/rust-src.links debian/*.stamp + $(RM) -rf debian/config.toml debian/rust-src.install debian/rust-src.links debian/*.stamp $(RM) -rf $(SRC_CLEAN) config.toml -debian/dh_auto_build.stamp: +override_dh_auto_build-arch: $(RUSTBUILD) build $(RUSTBUILD_FLAGS) -override_dh_auto_build-arch: debian/dh_auto_build.stamp -override_dh_auto_build-indep: debian/dh_auto_build.stamp +# note: this is only for buildds that want to do a separate arch:all build; +# there is no point running this yourself "to save time" since it implicitly +# depends on build-arch anyways. +override_dh_auto_build-indep: ifeq (true,$(BUILD_DOCS)) $(RUSTBUILD) doc $(RUSTBUILD_FLAGS) endif -TEST_LOG = debian/rustc-tests.log -# This is advertised as "5 tests failed" in README.Debian because our counting -# method is imprecise and in practise we count some failures twice. -FAILURES_ALLOWED = 8 -ifneq (,$(filter $(DEB_BUILD_ARCH), ppc64 arm64 mips64el i386)) - FAILURES_ALLOWED = 12 -endif -ifneq (,$(filter $(DEB_BUILD_ARCH), mips mipsel s390x)) - FAILURES_ALLOWED = 24 -endif -ifneq (,$(filter $(DEB_BUILD_ARCH), powerpc powerpcspe sparc64 x32)) - FAILURES_ALLOWED = 180 -endif -FAILED_TESTS = grep "FAILED\|^command did not execute successfully" $(TEST_LOG) | grep -v '^test result: FAILED' +RUN_TESTS = \ + if $(1); then \ + : ; \ + else \ + echo "====================================================="; \ + echo "WARNING: Ignoring test failures in the rust testsuite"; \ + echo "====================================================="; \ + fi + override_dh_auto_test-arch: - # ensure that rustc_llvm is actually dynamically linked to libLLVM - set -e; find build/*/stage2/lib/rustlib/* -name '*rustc_llvm*.so' | \ - while read x; do \ - stat -c '%s %n' "$$x"; \ - objdump -p "$$x" | grep -q "NEEDED.*LLVM"; \ - test "$$(stat -c %s "$$x")" -lt 6000000; \ - done ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) - # TODO: eventually, drop --target $(DEB_HOST_RUST_TYPE) and run tests for - # all targets including e.g. wasm32-unknown-unknown - { $(RUSTBUILD_TEST) --no-fail-fast --target $(DEB_HOST_RUST_TYPE) $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS); echo $$?; } | tee -a $(TEST_LOG) - # test that the log has at least 1 pass, to prevent e.g. #57709 - grep -l "^test .* \.\.\. ok$$" $(TEST_LOG) - echo "==== Debian rustc test report ===="; \ - echo "Specific test failures:"; \ - $(FAILED_TESTS); \ - num_failures=$$($(FAILED_TESTS) | wc -l); \ - exit_code=$$(tail -n1 $(TEST_LOG)); \ - echo "Summary: exit code $$exit_code, counted $$num_failures tests failed."; \ - echo -n "$(FAILURES_ALLOWED) maximum allowed. "; \ - if test "$$num_failures" -eq 0 -a "$$exit_code" -ne 0; then \ - echo "Aborting just in case, because we missed counting some test failures."; \ - echo "This could happen if we failed to build the tests, or if the testsuite runner is buggy."; \ - false; \ - elif test "$$num_failures" -le $(FAILURES_ALLOWED); then \ - echo "Continuing..."; \ - else \ - echo "Aborting the build."; \ - echo "Check the logs further above for details."; \ - false; \ - fi + $(call RUN_TESTS,$(RUSTBUILD_TEST) --no-fail-fast --target $(DEB_HOST_RUST_TYPE) $(RUSTBUILD_FLAGS) $(RUSTBUILD_TEST_FLAGS)) # don't continue if RUSTBUILD_TEST_FLAGS is non-empty test -z "$(RUSTBUILD_TEST_FLAGS)" endif @@ -267,7 +227,7 @@ ifeq (true,$(BUILD_DOCS)) ifeq (, $(filter nocheck,$(DEB_BUILD_PROFILES))) ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS))) # Run all rules that test the docs, i.e. in step.rs that depend on default:doc - $(RUSTBUILD_TEST) --no-fail-fast src/tools/linkchecker $(RUSTBUILD_FLAGS) + $(call RUN_TESTS,$(RUSTBUILD_TEST) --no-fail-fast src/tools/linkchecker $(RUSTBUILD_FLAGS)) endif endif endif @@ -318,11 +278,12 @@ override_dh_install-arch: override_dh_install-indep: debian/rust-src.install debian/rust-src.links dh_install - dh_install -plibstd-rust-dev-wasm32-cross usr/lib/rustlib/wasm32-*/lib/ chmod -x \ debian/rust-gdb/usr/share/rust-gdb/*.py \ debian/rust-lldb/usr/share/rust-lldb/*.py $(RM) -rf $(SRC_CLEAN:%=debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION)/%) + # Get rid of src/llvm-project + $(RM) -rf debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION)/src/llvm-project # Get rid of lintian warnings find debian/rust-src/usr/src/rustc-$(RUST_LONG_VERSION) \ \( -name .gitignore \ @@ -351,12 +312,12 @@ override_dh_compress: override_dh_strip: # Work around #35733, #468333 - find debian/libstd-rust-dev*/ -name '*.rlib' -execdir mv '{}' '{}.a' \; + find debian/libstd-rust-dev/ -name '*.rlib' -execdir mv '{}' '{}.a' \; # This is expected to print out lots of "File format unrecognized" warnings about # rust.metadata.bin and *.deflate but the .o files inside the rlibs should be stripped # Some files are still omitted because of #875780 however. dh_strip -v - find debian/libstd-rust-dev*/ -name '*.rlib.a' -execdir sh -c 'mv "$$1" "$${1%.a}"' - '{}' \; + find debian/libstd-rust-dev/ -name '*.rlib.a' -execdir sh -c 'mv "$$1" "$${1%.a}"' - '{}' \; override_dh_makeshlibs: dh_makeshlibs -V
  19. Download patch src/ci/docker/scripts/freebsd-toolchain.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/scripts/freebsd-toolchain.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/scripts/freebsd-toolchain.sh 2019-09-23 21:15:52.000000000 +0000 @@ -59,7 +59,7 @@ done # Originally downloaded from: # https://download.freebsd.org/ftp/releases/${freebsd_arch}/${freebsd_version}-RELEASE/base.txz -URL=https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2019-04-04-freebsd-${freebsd_arch}-${freebsd_version}-RELEASE-base.txz +URL=https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2019-04-04-freebsd-${freebsd_arch}-${freebsd_version}-RELEASE-base.txz curl "$URL" | tar xJf - -C "$sysroot" --wildcards "${files_to_extract[@]}" # Fix up absolute symlinks from the system image. This can be removed
  20. Download patch debian/make_orig-stage0_tarball.sh

    --- 1.37.0+dfsg1-1/debian/make_orig-stage0_tarball.sh 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/make_orig-stage0_tarball.sh 2019-09-18 12:26:47.000000000 +0000 @@ -11,6 +11,7 @@ upstream_bootstrap_arch="${upstream_boot rm -f stage0/*/*.sha256 mkdir -p stage0 build && ln -sf ../stage0 build/cache +touch stage0/hack if [ -n "$(find stage0/ -type f)" ]; then echo >&2 "$0: NOTE: extra artifacts in stage0/ will be included:" find stage0/ -type f
  21. Download patch src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh 2019-09-23 21:15:52.000000000 +0000 @@ -25,7 +25,7 @@ cd netbsd mkdir -p /x-tools/x86_64-unknown-netbsd/sysroot -URL=https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror +URL=https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc # Originally from ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-$BSD/source/sets/*.tgz curl $URL/2018-03-01-netbsd-src.tgz | tar xzf -
  22. Download patch src/bootstrap/sanity.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/sanity.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/sanity.rs 2019-09-23 21:15:52.000000000 +0000 @@ -78,8 +78,11 @@ pub fn check(build: &mut Build) { // We need cmake, but only if we're actually building LLVM or sanitizers. let building_llvm = build.hosts.iter() - .filter_map(|host| build.config.target_config.get(host)) - .any(|config| config.llvm_config.is_none()); + .map(|host| build.config.target_config + .get(host) + .map(|config| config.llvm_config.is_none()) + .unwrap_or(true)) + .any(|build_llvm_ourselves| build_llvm_ourselves); if building_llvm || build.config.sanitizers { cmd_finder.must_have("cmake"); } @@ -106,6 +109,14 @@ pub fn check(build: &mut Build) { build.config.ninja = true; } } + + if build.config.lldb_enabled { + cmd_finder.must_have("swig"); + let out = output(Command::new("swig").arg("-version")); + if !out.contains("SWIG Version 3") && !out.contains("SWIG Version 4") { + panic!("Ensure that Swig 3.x.x or 4.x.x is installed."); + } + } } build.config.python = build.config.python.take().map(|p| cmd_finder.must_have(p))
  23. Download patch debian/patches/d-i686-baseline.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-i686-baseline.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-i686-baseline.patch 2019-11-12 08:14:11.000000000 +0000 @@ -1,8 +1,6 @@ -diff --git a/src/librustc_target/spec/i686_unknown_linux_gnu.rs b/src/librustc_target/spec/i686_unknown_linux_gnu.rs -index c3ff34788..80b296980 100644 --- a/src/librustc_target/spec/i686_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/i686_unknown_linux_gnu.rs -@@ -12,7 +12,7 @@ use spec::{LinkerFlavor, Target, TargetResult}; +@@ -2,7 +2,7 @@ pub fn target() -> TargetResult { let mut base = super::linux_base::opts();
  24. Download patch src/bootstrap/check.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/check.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/check.rs 2019-09-23 21:15:52.000000000 +0000 @@ -50,7 +50,6 @@ impl Step for Std { let mut cargo = builder.cargo(compiler, Mode::Std, target, cargo_subcommand(builder.kind)); std_cargo(builder, &compiler, target, &mut cargo); - let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage)); builder.info(&format!("Checking std artifacts ({} -> {})", &compiler.host, target)); run_cargo(builder, &mut cargo, @@ -99,7 +98,6 @@ impl Step for Rustc { cargo_subcommand(builder.kind)); rustc_cargo(builder, &mut cargo); - let _folder = builder.fold_output(|| format!("stage{}-rustc", compiler.stage)); builder.info(&format!("Checking compiler artifacts ({} -> {})", &compiler.host, target)); run_cargo(builder, &mut cargo, @@ -153,7 +151,6 @@ impl Step for CodegenBackend { // We won't build LLVM if it's not available, as it shouldn't affect `check`. - let _folder = builder.fold_output(|| format!("stage{}-rustc_codegen_llvm", compiler.stage)); run_cargo(builder, &mut cargo, args(builder.kind), @@ -190,7 +187,6 @@ impl Step for Test { let mut cargo = builder.cargo(compiler, Mode::Test, target, cargo_subcommand(builder.kind)); test_cargo(builder, &compiler, target, &mut cargo); - let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage)); builder.info(&format!("Checking test artifacts ({} -> {})", &compiler.host, target)); run_cargo(builder, &mut cargo, @@ -239,7 +235,6 @@ impl Step for Rustdoc { SourceType::InTree, &[]); - let _folder = builder.fold_output(|| format!("stage{}-rustdoc", compiler.stage)); println!("Checking rustdoc artifacts ({} -> {})", &compiler.host, target); run_cargo(builder, &mut cargo,
  25. Download patch RELEASES.md

    --- 1.37.0+dfsg1-1/RELEASES.md 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/RELEASES.md 2019-09-23 21:15:52.000000000 +0000 @@ -1,3 +1,117 @@ +Version 1.38.0 (2019-09-26) +========================== + +Language +-------- +- [The `#[global_allocator]` attribute can now be used in submodules.][62735] +- [The `#[deprecated]` attribute can now be used on macros.][62042] + +Compiler +-------- +- [Added pipelined compilation support to `rustc`.][62766] This will + improve compilation times in some cases. For further information please refer + to the [_"Evaluating pipelined rustc compilation"_][pipeline-internals] thread. +- [Added tier 3\* support for the `aarch64-uwp-windows-msvc`, `i686-uwp-windows-gnu`, + `i686-uwp-windows-msvc`, `x86_64-uwp-windows-gnu`, and + `x86_64-uwp-windows-msvc` targets.][60260] +- [Added tier 3 support for the `armv7-unknown-linux-gnueabi` and + `armv7-unknown-linux-musleabi` targets.][63107] +- [Added tier 3 support for the `hexagon-unknown-linux-musl` target.][62814] +- [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784] + +\* Refer to Rust's [platform support page][forge-platform-support] for more +information on Rust's tiered platform support. + +Libraries +--------- +- [`ascii::EscapeDefault` now implements `Clone` and `Display`.][63421] +- [Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now + available at the same path as the trait.][63056] (e.g. The `Clone` derive macro + is available at `std::clone::Clone`). This also makes all built-in macros + available in `std`/`core` root. e.g. `std::include_bytes!`. +- [`str::Chars` now implements `Debug`.][63000] +- [`slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.][62528] +- [`*const T` and `*mut T` now implement `marker::Unpin`.][62583] +- [`Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.][61953] +- [Added euclidean remainder and division operations (`div_euclid`, + `rem_euclid`) to all numeric primitives.][61884] Additionally `checked`, + `overflowing`, and `wrapping` versions are available for all + integer primitives. +- [`thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and + `PartialEq`.][61491] +- [`iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.][61457] + +Stabilized APIs +--------------- +- [`<*const T>::cast`] +- [`<*mut T>::cast`] +- [`Duration::as_secs_f32`] +- [`Duration::as_secs_f64`] +- [`Duration::div_duration_f32`] +- [`Duration::div_duration_f64`] +- [`Duration::div_f32`] +- [`Duration::div_f64`] +- [`Duration::from_secs_f32`] +- [`Duration::from_secs_f64`] +- [`Duration::mul_f32`] +- [`Duration::mul_f64`] +- [`any::type_name`] + +Cargo +----- +- [Added pipelined compilation support to `cargo`.][cargo/7143] +- [You can now pass the `--features` option multiple times to enable + multiple features.][cargo/7084] + +Misc +---- +- [`rustc` will now warn about some incorrect uses of + `mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.][63346] + +Compatibility Notes +------------------- +- Unfortunately the [`x86_64-unknown-uefi` platform can not be built][62785] + with rustc 1.39.0. +- The [`armv7-unknown-linux-gnueabihf` platform is also known to have + issues][62896] for certain crates such as libc. + +[60260]: https://github.com/rust-lang/rust/pull/60260/ +[61457]: https://github.com/rust-lang/rust/pull/61457/ +[61491]: https://github.com/rust-lang/rust/pull/61491/ +[61884]: https://github.com/rust-lang/rust/pull/61884/ +[61953]: https://github.com/rust-lang/rust/pull/61953/ +[62042]: https://github.com/rust-lang/rust/pull/62042/ +[62528]: https://github.com/rust-lang/rust/pull/62528/ +[62583]: https://github.com/rust-lang/rust/pull/62583/ +[62735]: https://github.com/rust-lang/rust/pull/62735/ +[62766]: https://github.com/rust-lang/rust/pull/62766/ +[62784]: https://github.com/rust-lang/rust/pull/62784/ +[62785]: https://github.com/rust-lang/rust/issues/62785/ +[62814]: https://github.com/rust-lang/rust/pull/62814/ +[62896]: https://github.com/rust-lang/rust/issues/62896/ +[63000]: https://github.com/rust-lang/rust/pull/63000/ +[63056]: https://github.com/rust-lang/rust/pull/63056/ +[63107]: https://github.com/rust-lang/rust/pull/63107/ +[63346]: https://github.com/rust-lang/rust/pull/63346/ +[63421]: https://github.com/rust-lang/rust/pull/63421/ +[cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/ +[cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/ +[`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast +[`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast +[`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32 +[`Duration::as_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f64 +[`Duration::div_duration_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_duration_f32 +[`Duration::div_duration_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_duration_f64 +[`Duration::div_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f32 +[`Duration::div_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f64 +[`Duration::from_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f32 +[`Duration::from_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f64 +[`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32 +[`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64 +[`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html +[forge-platform-support]: https://forge.rust-lang.org/platform-support.html +[pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199 + Version 1.37.0 (2019-08-15) ========================== @@ -22,7 +136,7 @@ Language - [You can now use `_` as an identifier for consts.][61347] e.g. You can write `const _: u32 = 5;`. - [You can now use `#[repr(align(X)]` on enums.][61229] -- [The `?`/_"Kleene"_ macro operator is now available in the +- [The `?` Kleene macro operator is now available in the 2015 edition.][60932] Compiler @@ -179,10 +293,8 @@ Misc Compatibility Notes ------------------- -- [`std::arch::x86::_rdtsc` returns `u64` instead of `i64`][stdsimd/559] -- [`std::arch::x86_64::_mm_shuffle_ps` takes an `i32` instead of `u32` for `mask`][stdsimd/522] - With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no - longer recommended, and will be deprecated in 1.38.0. + longer recommended, and will be deprecated in 1.39.0. [60318]: https://github.com/rust-lang/rust/pull/60318/ [60364]: https://github.com/rust-lang/rust/pull/60364/ @@ -217,8 +329,7 @@ Compatibility Notes [`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html [clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136 [cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04 -[stdsimd/522]: https://github.com/rust-lang-nursery/stdsimd/issues/522 -[stdsimd/559]: https://github.com/rust-lang-nursery/stdsimd/issues/559 + Version 1.35.0 (2019-05-23) ========================== @@ -542,7 +653,7 @@ Compiler -------- - [You can now set a linker flavor for `rustc` with the `-Clinker-flavor` command line argument.][56351] -- [The mininum required LLVM version has been bumped to 6.0.][56642] +- [The minimum required LLVM version has been bumped to 6.0.][56642] - [Added support for the PowerPC64 architecture on FreeBSD.][57615] - [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to tier 2 support.][57130] Visit the [platform support][platform-support] page for @@ -973,7 +1084,7 @@ Compiler Libraries --------- -- [You can now convert `num::NonZero*` types to their raw equivalvents using the +- [You can now convert `num::NonZero*` types to their raw equivalents using the `From` trait.][54240] E.g. `u8` now implements `From<NonZeroU8>`. - [You can now convert a `&Option<T>` into `Option<&T>` and `&mut Option<T>` into `Option<&mut T>` using the `From` trait.][53218] @@ -1166,7 +1277,7 @@ Security Notes caused by an integer overflow. This has been fixed by deterministically panicking when an overflow happens. - Thank you to Scott McMurray for responsibily disclosing this vulnerability to + Thank you to Scott McMurray for responsibly disclosing this vulnerability to us. @@ -1438,7 +1549,7 @@ Security Notes given machine. This release fixes that vulnerability; you can read more about this on the [blog][rustdoc-sec]. The associated CVE is [CVE-2018-1000622]. - Thank you to Red Hat for responsibily disclosing this vulnerability to us. + Thank you to Red Hat for responsibly disclosing this vulnerability to us. Compatibility Notes -------------------
  26. Download patch src/ci/docker/dist-x86_64-linux/build-openssl.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-x86_64-linux/build-openssl.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-x86_64-linux/build-openssl.sh 2019-09-23 21:15:52.000000000 +0000 @@ -4,7 +4,7 @@ set -ex source shared.sh VERSION=1.0.2k -URL=https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/openssl-$VERSION.tar.gz +URL=https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/openssl-$VERSION.tar.gz curl $URL | tar xzf -
  27. Download patch debian/rustc.links
  28. Download patch debian/patches/d-rust-gdb-paths

    --- 1.37.0+dfsg1-1/debian/patches/d-rust-gdb-paths 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-rust-gdb-paths 2019-11-12 08:14:11.000000000 +0000 @@ -6,7 +6,7 @@ Forwarded: not-needed --- a/src/etc/rust-gdb +++ b/src/etc/rust-gdb -@@ -13,8 +13,10 @@ +@@ -3,8 +3,10 @@ set -e # Find out where the pretty printer Python module is
  29. Download patch debian/control

    --- 1.37.0+dfsg1-1/debian/control 2019-08-29 15:59:25.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/control 2019-11-12 08:14:10.000000000 +0000 @@ -1,7 +1,8 @@ Source: rustc Section: devel Priority: optional -Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Uploaders: Ximin Luo <infinity0@debian.org>, Sylvestre Ledru <sylvestre@debian.org> @@ -10,11 +11,8 @@ Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.17.14), python:native, cargo:native (>= 0.31.0) <!pkg.rustc.dlstage0>, - rustc:native (>= 1.36.0+dfsg) <!pkg.rustc.dlstage0>, - rustc:native (<= 1.37.0++) <!pkg.rustc.dlstage0>, - llvm-8-dev:native, - llvm-8-tools:native, - libllvm8, + rustc:native (>= 1.37.0+dfsg) <!pkg.rustc.dlstage0>, + rustc:native (<= 1.38.0++) <!pkg.rustc.dlstage0>, autotools-dev, cmake (>= 3.0) | cmake3, # needed by some vendor crates @@ -24,19 +22,23 @@ Build-Depends: debhelper (>= 9), zlib1g-dev, # used by rust-installer liblzma-dev:native, +# Required for llvm build + m4, # test dependencies: binutils (>= 2.26) <!nocheck> | binutils-2.26 <!nocheck>, git <!nocheck>, procps <!nocheck>, # below are optional tools even for 'make check' gdb (>= 7.12) <!nocheck>, + libc6-dbg [armhf], # Work around #864741. The version constraint for gdb above should already do # that, but this will keep things covered even in the case that they change # gdb-minimal to do a versioned Provides: gdb. # Extra build-deps needed for x.py to download stuff in pkg.rustc.dlstage0. curl <pkg.rustc.dlstage0>, ca-certificates <pkg.rustc.dlstage0>, -Build-Conflicts: gdb-minimal <!nocheck> +Build-Depends-Indep: libssl-dev +Build-Conflicts: gdb-minimal (<< 8.1-0ubuntu6) <!nocheck> # ^ That version of rustc is broken Standards-Version: 4.2.1 Homepage: http://www.rust-lang.org/ @@ -49,10 +51,10 @@ Multi-Arch: allowed Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends}, libstd-rust-dev (= ${binary:Version}), gcc, libc-dev, binutils (>= 2.26) -Recommends: cargo (>= 0.38.0~~), cargo (<< 0.39.0~~), rust-gdb | rust-lldb -Suggests: rust-doc, rust-src, lld-8 -Replaces: libstd-rust-dev (<< 1.25.0+dfsg1-2~~) -Breaks: libstd-rust-dev (<< 1.25.0+dfsg1-2~~) +Recommends: cargo (>= 0.39.0~~), cargo (<< 0.40.0~~), rust-gdb | rust-lldb +Suggests: rust-doc, rust-src +Replaces: libstd-rust-dev (<< 1.26.2+dfsg1+llvm-0ubuntu1~~) +Breaks: libstd-rust-dev (<< 1.26.2+dfsg1+llvm-0ubuntu1~~) Description: Rust systems programming language Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly @@ -66,7 +68,7 @@ Description: Rust systems programming la generic programming and meta-programming, in both static and dynamic styles. -Package: libstd-rust-1.37 +Package: libstd-rust-1.38 Section: libs Architecture: any Multi-Arch: same @@ -91,7 +93,7 @@ Package: libstd-rust-dev Section: libdevel Architecture: any Multi-Arch: same -Depends: ${shlibs:Depends}, ${misc:Depends}, libstd-rust-1.37 (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libstd-rust-1.38 (= ${binary:Version}) Description: Rust standard libraries - development files Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly @@ -108,26 +110,6 @@ Description: Rust standard libraries - d This package contains development files necessary to use the standard Rust libraries. -Package: libstd-rust-dev-wasm32-cross -Section: libdevel -Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, lld-8 -Description: Rust standard libraries - development files - Rust is a curly-brace, block-structured expression language. It - visually resembles the C language family, but differs significantly - in syntactic and semantic details. Its design is oriented toward - concerns of "programming in the large", that is, of creating and - maintaining boundaries - both abstract and operational - that - preserve large-system integrity, availability and concurrency. - . - It supports a mixture of imperative procedural, concurrent actor, - object-oriented and pure functional styles. Rust also supports - generic programming and meta-programming, in both static and dynamic - styles. - . - This package contains development files necessary to use the standard - Rust libraries, for cross-compiling to the wasm32-unknown-unknown target. - Package: rust-gdb Architecture: all Depends: gdb, ${misc:Depends}
  30. Download patch src/bootstrap/util.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/util.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/util.rs 2019-09-23 21:15:52.000000000 +0000 @@ -6,10 +6,10 @@ use std::env; use std::str; use std::fs; -use std::io::{self, Write}; +use std::io; use std::path::{Path, PathBuf}; use std::process::Command; -use std::time::{SystemTime, Instant}; +use std::time::Instant; use build_helper::t; @@ -254,78 +254,12 @@ pub fn symlink_dir(config: &Config, src: } } -/// An RAII structure that indicates all output until this instance is dropped -/// is part of the same group. -/// -/// On Travis CI, these output will be folded by default, together with the -/// elapsed time in this block. This reduces noise from unnecessary logs, -/// allowing developers to quickly identify the error. -/// -/// Travis CI supports folding by printing `travis_fold:start:<name>` and -/// `travis_fold:end:<name>` around the block. Time elapsed is recognized -/// similarly with `travis_time:[start|end]:<name>`. These are undocumented, but -/// can easily be deduced from source code of the [Travis build commands]. -/// -/// [Travis build commands]: -/// https://github.com/travis-ci/travis-build/blob/f603c0089/lib/travis/build/templates/header.sh -pub struct OutputFolder { - name: String, - start_time: SystemTime, // we need SystemTime to get the UNIX timestamp. -} - -impl OutputFolder { - /// Creates a new output folder with the given group name. - pub fn new(name: String) -> OutputFolder { - // "\r" moves the cursor to the beginning of the line, and "\x1b[0K" is - // the ANSI escape code to clear from the cursor to end of line. - // Travis seems to have trouble when _not_ using "\r\x1b[0K", that will - // randomly put lines to the top of the webpage. - print!("travis_fold:start:{0}\r\x1b[0Ktravis_time:start:{0}\r\x1b[0K", name); - OutputFolder { - name, - start_time: SystemTime::now(), - } - } -} - -impl Drop for OutputFolder { - fn drop(&mut self) { - use std::time::*; - use std::u64; - - fn to_nanos(duration: Result<Duration, SystemTimeError>) -> u64 { - match duration { - Ok(d) => d.as_secs() * 1_000_000_000 + d.subsec_nanos() as u64, - Err(_) => u64::MAX, - } - } - - let end_time = SystemTime::now(); - let duration = end_time.duration_since(self.start_time); - let start = self.start_time.duration_since(UNIX_EPOCH); - let finish = end_time.duration_since(UNIX_EPOCH); - println!( - "travis_fold:end:{0}\r\x1b[0K\n\ - travis_time:end:{0}:start={1},finish={2},duration={3}\r\x1b[0K", - self.name, - to_nanos(start), - to_nanos(finish), - to_nanos(duration) - ); - io::stdout().flush().unwrap(); - } -} - /// The CI environment rustbuild is running in. This mainly affects how the logs /// are printed. #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum CiEnv { /// Not a CI environment. None, - /// The Travis CI environment, for Linux (including Docker) and macOS builds. - Travis, - /// The AppVeyor environment, for Windows builds. - AppVeyor, /// The Azure Pipelines environment, for Linux (including Docker), Windows, and macOS builds. AzurePipelines, } @@ -333,11 +267,7 @@ pub enum CiEnv { impl CiEnv { /// Obtains the current CI environment. pub fn current() -> CiEnv { - if env::var("TRAVIS").ok().map_or(false, |e| &*e == "true") { - CiEnv::Travis - } else if env::var("APPVEYOR").ok().map_or(false, |e| &*e == "True") { - CiEnv::AppVeyor - } else if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") { + if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") { CiEnv::AzurePipelines } else { CiEnv::None
  31. Download patch src/bootstrap/lib.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/lib.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/lib.rs 2019-09-23 21:15:52.000000000 +0000 @@ -103,8 +103,9 @@ //! More documentation can be found in each respective module below, and you can //! also check out the `src/bootstrap/README.md` file for more information. -#![deny(rust_2018_idioms)] -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] + #![feature(core_intrinsics)] #![feature(drain_filter)] @@ -124,11 +125,11 @@ use std::os::unix::fs::symlink as symlin use std::os::windows::fs::symlink_file; use build_helper::{ - mtime, output, run_silent, run_suppressed, t, try_run_silent, try_run_suppressed, + mtime, output, run, run_suppressed, t, try_run, try_run_suppressed, }; use filetime::FileTime; -use crate::util::{exe, libdir, OutputFolder, CiEnv}; +use crate::util::{exe, libdir, CiEnv}; mod cc_detect; mod channel; @@ -539,9 +540,7 @@ impl Build { Mode::Rustc => "-rustc", Mode::Codegen => "-codegen", Mode::ToolBootstrap => "-bootstrap-tools", - Mode::ToolStd => "-tools", - Mode::ToolTest => "-tools", - Mode::ToolRustc => "-tools", + Mode::ToolStd | Mode::ToolTest | Mode::ToolRustc => "-tools", }; self.out.join(&*compiler.host) .join(format!("stage{}{}", compiler.stage, suffix)) @@ -681,7 +680,7 @@ impl Build { fn run(&self, cmd: &mut Command) { if self.config.dry_run { return; } self.verbose(&format!("running: {:?}", cmd)); - run_silent(cmd) + run(cmd) } /// Runs a command, printing out nice contextual information if it fails. @@ -697,7 +696,7 @@ impl Build { fn try_run(&self, cmd: &mut Command) -> bool { if self.config.dry_run { return true; } self.verbose(&format!("running: {:?}", cmd)); - try_run_silent(cmd) + try_run(cmd) } /// Runs a command, printing out nice contextual information if it fails. @@ -1092,19 +1091,6 @@ impl Build { } } - /// Fold the output of the commands after this method into a group. The fold - /// ends when the returned object is dropped. Folding can only be used in - /// the Travis CI environment. - pub fn fold_output<D, F>(&self, name: F) -> Option<OutputFolder> - where D: Into<String>, F: FnOnce() -> D - { - if !self.config.dry_run && self.ci_env == CiEnv::Travis { - Some(OutputFolder::new(name().into())) - } else { - None - } - } - /// Updates the actual toolstate of a tool. /// /// The toolstates are saved to the file specified by the key @@ -1325,7 +1311,7 @@ fn chmod(path: &Path, perms: u32) { fn chmod(_path: &Path, _perms: u32) {} -impl<'a> Compiler { +impl Compiler { pub fn with_stage(mut self, stage: u32) -> Compiler { self.stage = stage; self
  32. Download patch debian/patches/d-ignore-avx-44056.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-ignore-avx-44056.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-ignore-avx-44056.patch 2019-11-12 08:14:11.000000000 +0000 @@ -1,10 +1,8 @@ Bug: https://github.com/rust-lang/rust/pull/55667 -Index: rustc/src/test/ui/issues/issue-44056.rs -=================================================================== ---- rustc.orig/src/test/ui/issues/issue-44056.rs -+++ rustc/src/test/ui/issues/issue-44056.rs +--- a/src/test/ui/issues/issue-44056.rs ++++ b/src/test/ui/issues/issue-44056.rs @@ -1,5 +1,5 @@ - // compile-pass + // build-pass (FIXME(62277): could be check-pass?) -// only-x86_64 +// ignore-test // no-prefer-dynamic
  33. Download patch src/bootstrap/README.md

    --- 1.37.0+dfsg1-1/src/bootstrap/README.md 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/README.md 2019-09-23 21:15:52.000000000 +0000 @@ -55,11 +55,11 @@ The script accepts commands, flags, and # run all unit tests ./x.py test - # execute the run-pass test suite - ./x.py test src/test/run-pass + # execute the UI test suite + ./x.py test src/test/ui - # execute only some tests in the run-pass test suite - ./x.py test src/test/run-pass --test-args substring-of-test-name + # execute only some tests in the UI test suite + ./x.py test src/test/ui --test-args substring-of-test-name # execute tests in the standard library in stage0 ./x.py test --stage 0 src/libstd @@ -215,7 +215,7 @@ build/ # Output for all compiletest-based test suites test/ - run-pass/ + ui/ compile-fail/ debuginfo/ ...
  34. Download patch debian/patches/d-rust-lldb-paths

    --- 1.37.0+dfsg1-1/debian/patches/d-rust-lldb-paths 2019-07-13 17:22:18.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-rust-lldb-paths 2019-11-12 08:14:11.000000000 +0000 @@ -6,36 +6,37 @@ Forwarded: not-needed --- a/src/etc/rust-lldb +++ b/src/etc/rust-lldb -@@ -12,30 +12,10 @@ +@@ -3,32 +3,7 @@ # Exit if anything fails set -e --# Find out where to look for the pretty printer Python module --RUSTC_SYSROOT=`rustc --print sysroot` -- -# Find the host triple so we can find lldb in rustlib. --host=`rustc -vV | sed -n -e 's/^host: //p'` +-host=$(rustc -vV | sed -n -e 's/^host: //p') +- +-# Find out where to look for the pretty printer Python module +-RUSTC_SYSROOT=$(rustc --print sysroot) +-RUST_LLDB="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" - -lldb=lldb --if [ -f "$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" ]; then -- lldb="$RUSTC_SYSROOT/lib/rustlib/$host/bin/lldb" +-if [ -f "$RUST_LLDB" ]; then +- lldb="$RUST_LLDB" -else -- LLDB_VERSION=`"$lldb" --version 2>/dev/null | head -1 | cut -d. -f1` +- if ! command -v "$lldb" > /dev/null; then +- echo "$lldb not found! Please install it." >&2 +- exit 1 +- else +- LLDB_VERSION=$("$lldb" --version | cut -d ' ' -f3) - -- if [ "$LLDB_VERSION" = "lldb-350" ] -- then -- echo "***" -- echo \ --"WARNING: This version of LLDB has known issues with Rust and cannot \ --display the contents of local variables!" -- echo "***" +- if [ "$LLDB_VERSION" = "3.5.0" ]; then +- cat << EOF >&2 +-*** +-WARNING: This version of LLDB has known issues with Rust and cannot display the contents of local variables! +-*** +-EOF +- fi - fi -fi +lldb=lldb-8 # Prepare commands that will be loaded before any file on the command line has been loaded --script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\"" -+script_import="command script import \"/usr/share/rust-lldb/lldb_rust_formatters.py\"" - category_definition="type summary add --no-value --python-function lldb_rust_formatters.print_val -x \".*\" --category Rust" - category_enable="type category enable Rust" - + script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\""
  35. Download patch src/ci/azure-pipelines/steps/install-windows-build-deps.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/steps/install-windows-build-deps.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/steps/install-windows-build-deps.yml 2019-09-23 21:15:52.000000000 +0000 @@ -1,4 +1,29 @@ steps: +# We use the WIX toolset to create combined installers for Windows, and these +# binaries are downloaded from +# https://github.com/wixtoolset/wix3 originally +- bash: | + set -e + curl -O https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/wix311-binaries.zip + echo "##vso[task.setvariable variable=WIX]`pwd`/wix" + mkdir -p wix/bin + cd wix/bin + 7z x ../../wix311-binaries.zip + displayName: Install wix + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + +# We use InnoSetup and its `iscc` program to also create combined installers. +# Honestly at this point WIX above and `iscc` are just holdovers from +# oh-so-long-ago and are required for creating installers on Windows. I think +# one is MSI installers and one is EXE, but they're not used so frequently at +# this point anyway so perhaps it's a wash! +- script: | + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf is-install.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-08-22-is.exe" + is-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- + echo ##vso[task.prependpath]C:\Program Files (x86)\Inno Setup 5 + displayName: Install InnoSetup + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + # We've had issues with the default drive in use running out of space during a # build, and it looks like the `C:` drive has more space than the default `D:` # drive. We should probably confirm this with the azure pipelines team at some @@ -84,7 +109,7 @@ steps: # Note that this is originally from the github releases patch of Ninja - script: | md ninja - powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2017-03-15-ninja-win.zip" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip" 7z x -oninja 2017-03-15-ninja-win.zip del 2017-03-15-ninja-win.zip set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja
  36. Download patch src/bootstrap/flags.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/flags.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/flags.rs 2019-09-23 21:15:52.000000000 +0000 @@ -33,8 +33,11 @@ pub struct Flags { pub rustc_error_format: Option<String>, pub dry_run: bool, - // true => deny - pub warnings: Option<bool>, + // This overrides the deny-warnings configuation option, + // which passes -Dwarnings to the compiler invocations. + // + // true => deny, false => allow + pub deny_warnings: Option<bool>, } pub enum Subcommand { @@ -327,7 +330,7 @@ Arguments: This subcommand accepts a number of paths to directories to tests that should be compiled and run. For example: - ./x.py test src/test/run-pass + ./x.py test src/test/ui ./x.py test src/libstd --test-args hash_map ./x.py test src/libstd --stage 0 --no-doc ./x.py test src/test/ui --bless @@ -468,7 +471,7 @@ Arguments: .into_iter() .map(|p| p.into()) .collect::<Vec<_>>(), - warnings: matches.opt_str("warnings").map(|v| v == "deny"), + deny_warnings: parse_deny_warnings(&matches), } } } @@ -549,3 +552,18 @@ fn split(s: &[String]) -> Vec<String> { .map(|s| s.to_string()) .collect() } + +fn parse_deny_warnings(matches: &getopts::Matches) -> Option<bool> { + match matches.opt_str("warnings").as_ref().map(|v| v.as_str()) { + Some("deny") => Some(true), + Some("allow") => Some(false), + Some(value) => { + eprintln!( + r#"invalid value for --warnings: {:?}, expected "allow" or "deny""#, + value, + ); + process::exit(1); + }, + None => None, + } +}
  37. Download patch src/bootstrap/bootstrap.py

    --- 1.37.0+dfsg1-1/src/bootstrap/bootstrap.py 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/bootstrap.py 2019-09-23 21:15:52.000000000 +0000 @@ -735,6 +735,47 @@ class RustBuild(object): """Set download URL for development environment""" self._download_url = 'https://dev-static.rust-lang.org' + def check_vendored_status(self): + """Check that vendoring is configured properly""" + vendor_dir = os.path.join(self.rust_root, 'vendor') + if 'SUDO_USER' in os.environ and not self.use_vendored_sources: + if os.environ.get('USER') != os.environ['SUDO_USER']: + self.use_vendored_sources = True + print('info: looks like you are running this command under `sudo`') + print(' and so in order to preserve your $HOME this will now') + print(' use vendored sources by default.') + if not os.path.exists(vendor_dir): + print('error: vendoring required, but vendor directory does not exist.') + print(' Run `cargo vendor` without sudo to initialize the ' + 'vendor directory.') + raise Exception("{} not found".format(vendor_dir)) + + if self.use_vendored_sources: + if not os.path.exists('.cargo'): + os.makedirs('.cargo') + with output('.cargo/config') as cargo_config: + cargo_config.write( + "[source.crates-io]\n" + "replace-with = 'vendored-sources'\n" + "registry = 'https://example.com'\n" + "\n" + "[source.vendored-sources]\n" + "directory = '{}/vendor'\n" + .format(self.rust_root)) + else: + if os.path.exists('.cargo'): + shutil.rmtree('.cargo') + + def ensure_vendored(self): + """Ensure that the vendored sources are available if needed""" + vendor_dir = os.path.join(self.rust_root, 'vendor') + # Note that this does not handle updating the vendored dependencies if + # the rust git repository is updated. Normal development usually does + # not use vendoring, so hopefully this isn't too much of a problem. + if self.use_vendored_sources and not os.path.exists(vendor_dir): + run([self.cargo(), "vendor"], + verbose=self.verbose, cwd=self.rust_root) + def bootstrap(help_triggered): """Configure, fetch, build and run the initial bootstrap""" @@ -776,30 +817,7 @@ def bootstrap(help_triggered): build.use_locked_deps = '\nlocked-deps = true' in build.config_toml - if 'SUDO_USER' in os.environ and not build.use_vendored_sources: - if os.environ.get('USER') != os.environ['SUDO_USER']: - build.use_vendored_sources = True - print('info: looks like you are running this command under `sudo`') - print(' and so in order to preserve your $HOME this will now') - print(' use vendored sources by default. Note that if this') - print(' does not work you should run a normal build first') - print(' before running a command like `sudo ./x.py install`') - - if build.use_vendored_sources: - if not os.path.exists('.cargo'): - os.makedirs('.cargo') - with output('.cargo/config') as cargo_config: - cargo_config.write(""" - [source.crates-io] - replace-with = 'vendored-sources' - registry = 'https://example.com' - - [source.vendored-sources] - directory = '{}/vendor' - """.format(build.rust_root)) - else: - if os.path.exists('.cargo'): - shutil.rmtree('.cargo') + build.check_vendored_status() data = stage0_data(build.rust_root) build.date = data['date'] @@ -815,6 +833,7 @@ def bootstrap(help_triggered): build.build = args.build or build.build_triple() build.download_stage0() sys.stdout.flush() + build.ensure_vendored() build.build_bootstrap() sys.stdout.flush()
  38. Download patch src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y gdb \ llvm-6.0-tools \ libedit-dev \ + libssl-dev \ + pkg-config \ zlib1g-dev \ xz-utils
  39. Download patch src/ci/docker/scripts/android-sdk-manager.py

    --- 1.37.0+dfsg1-1/src/ci/docker/scripts/android-sdk-manager.py 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/scripts/android-sdk-manager.py 2019-09-23 21:15:52.000000000 +0000 @@ -23,8 +23,9 @@ REPOSITORIES = [ HOST_OS = "linux" # Mirroring options -MIRROR_BUCKET = "rust-lang-ci2" -MIRROR_BASE_DIR = "rust-ci-mirror/android/" +MIRROR_BUCKET = "rust-lang-ci-mirrors" +MIRROR_BUCKET_REGION = "us-west-1" +MIRROR_BASE_DIR = "rustc/android/" import argparse import hashlib @@ -144,7 +145,8 @@ def cli_install(args): lockfile = Lockfile(args.lockfile) for package in lockfile.packages.values(): # Download the file from the mirror into a temp file - url = "https://" + MIRROR_BUCKET + ".s3.amazonaws.com/" + MIRROR_BASE_DIR + url = "https://" + MIRROR_BUCKET + ".s3-" + MIRROR_BUCKET_REGION + \ + ".amazonaws.com/" + MIRROR_BASE_DIR downloaded = package.download(url) # Extract the file in a temporary directory extract_dir = tempfile.mkdtemp()
  40. Download patch src/ci/docker/dist-various-2/build-wasi-toolchain.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-various-2/build-wasi-toolchain.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-various-2/build-wasi-toolchain.sh 2019-09-23 21:15:52.000000000 +0000 @@ -5,7 +5,7 @@ set -ex # Originally from https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz -curl https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/clang%2Bllvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \ +curl https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/clang%2Bllvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \ tar xJf - export PATH=`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
  41. Download patch src/ci/azure-pipelines/pr.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/pr.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/pr.yml 2019-09-23 21:15:52.000000000 +0000 @@ -6,6 +6,9 @@ trigger: none pr: - master +variables: +- group: public-credentials + jobs: - job: Linux timeoutInMinutes: 600 @@ -20,14 +23,13 @@ jobs: mingw-check: IMAGE: mingw-check -# TODO: enable this job if the commit message matches this regex, need tools -# figure out how to get the current commit message on azure and stick it in a -# condition somewhere -# if: commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri|cargo)\b)/ -# - job: Linux-x86_64-gnu-tools -# pool: -# vmImage: ubuntu-16.04 -# steps: -# - template: steps/run.yml -# variables: -# IMAGE: x86_64-gnu-tools +- job: LinuxTools + timeoutInMinutes: 600 + pool: + vmImage: ubuntu-16.04 + steps: + - template: steps/run.yml + parameters: + only_on_updated_submodules: 'yes' + variables: + IMAGE: x86_64-gnu-tools
  42. Download patch src/ci/shared.sh

    --- 1.37.0+dfsg1-1/src/ci/shared.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/shared.sh 2019-09-23 21:15:52.000000000 +0000 @@ -25,53 +25,13 @@ function retry { } function isCI { - [ "$CI" = "true" ] || [ "$TRAVIS" = "true" ] || [ "$TF_BUILD" = "True" ] + [ "$CI" = "true" ] || [ "$TF_BUILD" = "True" ] } function isOSX { - [ "$TRAVIS_OS_NAME" = "osx" ] || [ "$AGENT_OS" = "Darwin" ] + [ "$AGENT_OS" = "Darwin" ] } function getCIBranch { - if [ "$TRAVIS" = "true" ]; then - echo "$TRAVIS_BRANCH" - elif [ "$APPVEYOR" = "True" ]; then - echo "$APPVEYOR_REPO_BRANCH" - else - echo "$BUILD_SOURCEBRANCHNAME" - fi; + echo "$BUILD_SOURCEBRANCHNAME" } - -if ! declare -F travis_fold; then - if [ "${TRAVIS-false}" = 'true' ]; then - # This is a trimmed down copy of - # https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh - travis_fold() { - echo -en "travis_fold:$1:$2\r\033[0K" - } - travis_time_start() { - travis_timer_id=$(printf %08x $(( RANDOM * RANDOM ))) - travis_start_time=$(travis_nanoseconds) - echo -en "travis_time:start:$travis_timer_id\r\033[0K" - } - travis_time_finish() { - travis_end_time=$(travis_nanoseconds) - local duration=$(($travis_end_time-$travis_start_time)) - local msg="travis_time:end:$travis_timer_id" - echo -en "\n$msg:start=$travis_start_time,finish=$travis_end_time,duration=$duration\r\033[0K" - } - if [ $(uname) = 'Darwin' ]; then - travis_nanoseconds() { - date -u '+%s000000000' - } - else - travis_nanoseconds() { - date -u '+%s%N' - } - fi - else - travis_fold() { return 0; } - travis_time_start() { return 0; } - travis_time_finish() { return 0; } - fi -fi
  43. Download patch src/ci/azure-pipelines/steps/run.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/steps/run.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/steps/run.yml 2019-09-23 21:15:52.000000000 +0000 @@ -6,6 +6,11 @@ # # Check travis config for `gdb --batch` command to print all crash logs +parameters: + # When this parameter is set to anything other than an empty string the tests + # will only be executed when the commit updates submodules + only_on_updated_submodules: '' + steps: # Disable automatic line ending conversion, which is enabled by default on @@ -21,6 +26,22 @@ steps: - checkout: self fetchDepth: 2 +# Set the SKIP_JOB environment variable if this job is supposed to only run +# when submodules are updated and they were not. The following time consuming +# tasks will be skipped when the environment variable is present. +- ${{ if parameters.only_on_updated_submodules }}: + - bash: | + set -e + # Submodules pseudo-files inside git have the 160000 permissions, so when + # those files are present in the diff a submodule was updated. + if git diff HEAD^ | grep "^index .* 160000" >/dev/null 2>&1; then + echo "Executing the job since submodules are updated" + else + echo "Not executing this job since no submodules were updated" + echo "##vso[task.setvariable variable=SKIP_JOB;]1" + fi + displayName: Decide whether to run this job + # Spawn a background process to collect CPU usage statistics which we'll upload # at the end of the build. See the comments in the script here for more # information. @@ -30,10 +51,6 @@ steps: - bash: printenv | sort displayName: Show environment variables -# Log the date, even on failure. Attempting to debug SSL certificate errors. -- bash: date - displayName: Print out date (before build) - - bash: | set -e df -h @@ -45,17 +62,6 @@ steps: - template: install-sccache.yml - template: install-clang.yml -# Install some dependencies needed to build LLDB/Clang, currently only needed -# during the `dist` target -- bash: | - set -e - brew update - brew install xz - brew install swig@3 - brew link --force swig@3 - displayName: Install build dependencies (OSX) - condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['SCRIPT'],'./x.py dist')) - # Switch to XCode 9.3 on OSX since it seems to be the last version that supports # i686-apple-darwin. We'll eventually want to upgrade this and it will probably # force us to drop i686-apple-darwin, but let's keep the wheels turning for now. @@ -75,7 +81,7 @@ steps: echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json sudo service docker restart displayName: Enable IPv6 - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) + condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['Agent.OS'], 'Linux')) # Disable automatic line ending conversion (again). On Windows, when we're # installing dependencies, something switches the git configuration directory or @@ -91,12 +97,12 @@ steps: set -e mkdir -p $HOME/rustsrc $BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc - condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) + condition: and(succeeded(), not(variables.SKIP_JOB), ne(variables['Agent.OS'], 'Windows_NT')) displayName: Check out submodules (Unix) - script: | - if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc - sh src/ci/init_repo.sh . /d/cache/rustsrc - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + if not exist C:\cache\rustsrc\NUL mkdir C:\cache\rustsrc + sh src/ci/init_repo.sh . /c/cache/rustsrc + condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['Agent.OS'], 'Windows_NT')) displayName: Check out submodules (Windows) # See also the disable for autocrlf above, this just checks that it worked @@ -121,21 +127,17 @@ steps: # Ensure the `aws` CLI is installed so we can deploy later on, cache docker # images, etc. -- bash: | - set -e - source src/ci/shared.sh - sudo apt-get install -y python3-setuptools - retry pip3 install -r src/ci/awscli-requirements.txt --upgrade --user - echo "##vso[task.prependpath]$HOME/.local/bin" - displayName: Install awscli (Linux) - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) -- script: pip install -r src/ci/awscli-requirements.txt - displayName: Install awscli (non-Linux) - condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux')) +- bash: src/ci/install-awscli.sh + env: + AGENT_OS: $(Agent.OS) + condition: and(succeeded(), not(variables.SKIP_JOB)) + displayName: Install awscli # Configure our CI_JOB_NAME variable which log analyzers can use for the main # step to see what's going on. -- bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME" +- bash: | + builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2) + echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder" displayName: Configure Job Name # As a quick smoke check on the otherwise very fast mingw-check linux builder @@ -147,7 +149,7 @@ steps: python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" "" cd .. rm -rf rust-toolstate - condition: and(succeeded(), eq(variables['IMAGE'], 'mingw-check')) + condition: and(succeeded(), not(variables.SKIP_JOB), eq(variables['IMAGE'], 'mingw-check')) displayName: Verify the publish_toolstate script works - bash: | @@ -166,8 +168,10 @@ steps: env: CI: true SRC: . - AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) + AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY) TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN) + condition: and(succeeded(), not(variables.SKIP_JOB)) displayName: Run build # If we're a deploy builder, use the `aws` command to publish everything to our @@ -189,8 +193,9 @@ steps: fi retry aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION env: - AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) - condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1'))) + AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY) + condition: and(succeeded(), not(variables.SKIP_JOB), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1'))) displayName: Upload artifacts # Upload CPU usage statistics that we've been gathering this whole time. Always @@ -198,12 +203,8 @@ steps: # errors here ever fail the build since this is just informational. - bash: aws s3 cp --acl public-read cpu-usage.csv s3://$DEPLOY_BUCKET/rustc-builds/$BUILD_SOURCEVERSION/cpu-$SYSTEM_JOBNAME.csv env: - AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) - condition: variables['AWS_SECRET_ACCESS_KEY'] + AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY) + condition: variables['UPLOAD_AWS_SECRET_ACCESS_KEY'] continueOnError: true displayName: Upload CPU usage statistics - -# Log the date, even on failure. Attempting to debug SSL certificate errors. -- bash: date - continueOnError: true - displayName: Print out date (after build)
  44. Download patch src/ci/azure-pipelines/master.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/master.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/master.yml 2019-09-23 21:15:52.000000000 +0000 @@ -7,7 +7,7 @@ trigger: - master variables: -- group: real-prod-credentials +- group: prod-credentials pool: vmImage: ubuntu-16.04
  45. Download patch src/ci/docker/x86_64-gnu-tools/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-tools/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-tools/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -21,8 +21,10 @@ COPY x86_64-gnu-tools/checkregression.py COPY x86_64-gnu-tools/checktools.sh /tmp/ COPY x86_64-gnu-tools/repo.sh /tmp/ +# Run rustbook with `linkcheck` feature enabled +ENV CHECK_LINKS 1 + ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ - --enable-test-miri \ --save-toolstates=/tmp/toolstates.json ENV SCRIPT /tmp/checktools.sh ../x.py /tmp/toolstates.json linux
  46. Download patch src/ci/docker/README.md

    --- 1.37.0+dfsg1-1/src/ci/docker/README.md 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/README.md 2019-09-23 21:15:52.000000000 +0000 @@ -20,7 +20,7 @@ Images will output artifacts in an `obj` - Each directory, excluding `scripts` and `disabled`, corresponds to a docker image - `scripts` contains files shared by docker images -- `disabled` contains images that are not built on travis +- `disabled` contains images that are not built on CI ## Docker Toolbox on Windows
  47. Download patch git-commit-hash

    --- 1.37.0+dfsg1-1/git-commit-hash 2019-08-13 08:26:34.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/git-commit-hash 2019-09-23 23:14:49.000000000 +0000 @@ -1 +1 @@ -eae3437dfe991621e8afdc82734f4a172d7ddf9b \ No newline at end of file +625451e376bb2e5283fc4741caa0a3e8a2ca4d54 \ No newline at end of file
  48. Download patch debian/patches/u-mips-fixes.diff

    --- 1.37.0+dfsg1-1/debian/patches/u-mips-fixes.diff 2019-04-29 23:17:30.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/u-mips-fixes.diff 2019-11-12 08:14:11.000000000 +0000 @@ -3,11 +3,9 @@ Author: Dragan Mladjenovic <dmladjenovic Bug-Debian: https://bugs.debian.org/881845 Last-Update: 2018-10-24 -Index: rustc/src/librustc_codegen_llvm/llvm_util.rs -=================================================================== ---- rustc.orig/src/librustc_codegen_llvm/llvm_util.rs -+++ rustc/src/librustc_codegen_llvm/llvm_util.rs -@@ -68,6 +68,9 @@ unsafe fn configure_llvm(sess: &Session) +--- a/src/librustc_codegen_llvm/llvm_util.rs ++++ b/src/librustc_codegen_llvm/llvm_util.rs +@@ -77,6 +77,9 @@ // during inlining. Unfortunately these may block other optimizations. add("-preserve-alignment-assumptions-during-inlining=false");
  49. Download patch src/ci/docker/x86_64-gnu-tools/repo.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-tools/repo.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-tools/repo.sh 2019-09-23 21:15:52.000000000 +0000 @@ -5,8 +5,8 @@ # # The function relies on a GitHub bot user, which should have a Personal access # token defined in the environment variable $TOOLSTATE_REPO_ACCESS_TOKEN. If for -# some reason you need to change the token, please update `.travis.yml` and -# `appveyor.yml`: +# some reason you need to change the token, please update the Azure Pipelines +# variable group. # # 1. Generate a new Personal access token: # @@ -18,28 +18,9 @@ # Save it somewhere secure, as the token would be gone once you leave # the page. # -# 2. Encrypt the token for Travis CI +# 2. Update the variable group in Azure Pipelines # -# * Install the `travis` tool locally (`gem install travis`). -# * Encrypt the token: -# ``` -# travis -r rust-lang/rust encrypt \ -# TOOLSTATE_REPO_ACCESS_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -# ``` -# * Copy output to replace the existing one in `.travis.yml`. -# * Details of this step can be found in -# <https://docs.travis-ci.com/user/encryption-keys/> -# -# 3. Encrypt the token for AppVeyor -# -# * Login to AppVeyor using your main account, and login as the rust-lang -# organization. -# * Open the ["Encrypt data" tool](https://ci.appveyor.com/tools/encrypt) -# * Paste the 40-digit token into the "Value to encrypt" box, then click -# "Encrypt" -# * Copy the output to replace the existing one in `appveyor.yml`. -# * Details of this step can be found in -# <https://www.appveyor.com/docs/how-to/git-push/> +# * Ping a member of the infrastructure team to do this. # # 4. Replace the email address below if the bot account identity is changed # @@ -62,6 +43,13 @@ commit_toolstate_change() { MESSAGE_FILE="$1" shift for RETRY_COUNT in 1 2 3 4 5; do + # Call the callback. + # - If we are in the `auto` branch (pre-landing), this is called from `checktools.sh` and + # the callback is `change_toolstate` in that file. The purpose of this is to publish the + # test results (the new commit-to-toolstate mapping) in the toolstate repo. + # - If we are in the `master` branch (post-landing), this is called by the CI pipeline + # and the callback is `src/tools/publish_toolstate.py`. The purpose is to publish + # the new "current" toolstate in the toolstate repo. "$@" # `git commit` failing means nothing to commit. FAILURE=0
  50. Download patch debian/config.toml

    --- 1.37.0+dfsg1-1/debian/config.toml 1970-01-01 00:00:00.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/config.toml 2019-11-11 20:52:27.000000000 +0000 @@ -0,0 +1,40 @@ +[build] +submodules = false +vendor = true +locked-deps = false +verbose = 2 + +rustc = "/usr/bin/rustc" +cargo = "/usr/bin/cargo" + +build = "x86_64-unknown-linux-gnu" +host = ["x86_64-unknown-linux-gnu"] +target = ["x86_64-unknown-linux-gnu"] + +#full-bootstrap = true +# originally needed to work around #45317 but no longer necessary +# currently we have to omit it because it breaks #48319 + +# this might get changed later by override_dh_auto_configure-indep +# we do it this way to avoid spurious rebuilds +docs = false + +[install] +prefix = "/usr" + +[rust] +jemalloc = false +optimize = true +dist-src = false + +channel = "stable" + +# parallel codegen interferes with reproducibility, see +# https://github.com/rust-lang/rust/issues/34902#issuecomment-319463586 +#codegen-units = 0 +debuginfo-level = 0 +debuginfo-level-std = 2 +rpath = false + +verbose-tests = true +backtrace-on-ice = true
  51. Download patch src/bootstrap/compile.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/compile.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/compile.rs 2019-09-23 21:15:52.000000000 +0000 @@ -95,7 +95,6 @@ impl Step for Std { let mut cargo = builder.cargo(compiler, Mode::Std, target, "build"); std_cargo(builder, &compiler, target, &mut cargo); - let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage)); builder.info(&format!("Building stage{} std artifacts ({} -> {})", compiler.stage, &compiler.host, target)); run_cargo(builder, @@ -326,7 +325,7 @@ impl Step for StartupObjects { fn run(self, builder: &Builder<'_>) { let for_compiler = self.compiler; let target = self.target; - if !target.contains("pc-windows-gnu") { + if !target.contains("windows-gnu") { return } @@ -422,7 +421,6 @@ impl Step for Test { let mut cargo = builder.cargo(compiler, Mode::Test, target, "build"); test_cargo(builder, &compiler, target, &mut cargo); - let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage)); builder.info(&format!("Building stage{} test artifacts ({} -> {})", compiler.stage, &compiler.host, target)); run_cargo(builder, @@ -555,7 +553,6 @@ impl Step for Rustc { let mut cargo = builder.cargo(compiler, Mode::Rustc, target, "build"); rustc_cargo(builder, &mut cargo); - let _folder = builder.fold_output(|| format!("stage{}-rustc", compiler.stage)); builder.info(&format!("Building stage{} compiler artifacts ({} -> {})", compiler.stage, &compiler.host, target)); run_cargo(builder, @@ -710,7 +707,6 @@ impl Step for CodegenBackend { let tmp_stamp = out_dir.join(".tmp.stamp"); - let _folder = builder.fold_output(|| format!("stage{}-rustc_codegen_llvm", compiler.stage)); let files = run_cargo(builder, cargo.arg("--features").arg(features), vec![], @@ -1130,6 +1126,7 @@ pub fn run_cargo(builder: &Builder<'_>, // Skip files like executables if !filename.ends_with(".rlib") && !filename.ends_with(".lib") && + !filename.ends_with(".a") && !is_dylib(&filename) && !(is_check && filename.ends_with(".rmeta")) { continue;
  52. Download patch config.toml.example

    --- 1.37.0+dfsg1-1/config.toml.example 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/config.toml.example 2019-09-23 21:15:52.000000000 +0000 @@ -57,14 +57,13 @@ # support. You'll need to write a target specification at least, and most # likely, teach rustc about the C ABI of the target. Get in touch with the # Rust team and file an issue if you need assistance in porting! -#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;MSP430;Sparc;NVPTX;Hexagon" +#targets = "AArch64;ARM;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" # LLVM experimental targets to build support for. These targets are specified in # the same format as above, but since these targets are experimental, they are # not built by default and the experimental Rust compilation targets that depend -# on them will not work unless the user opts in to building them. By default the -# `WebAssembly` and `RISCV` targets are enabled when compiling LLVM from scratch. -#experimental-targets = "WebAssembly;RISCV" +# on them will not work unless the user opts in to building them. +#experimental-targets = "" # Cap the number of parallel linker invocations when compiling LLVM. # This can be useful when building LLVM with debug info, which significantly @@ -369,10 +368,6 @@ # When creating source tarballs whether or not to create a source tarball. #dist-src = false -# Whether to also run the Miri tests suite when running tests. -# As a side-effect also generates MIR for all libraries. -#test-miri = false - # After building or testing extended tools (e.g. clippy and rustfmt), append the # result (broken, compiling, testing) into this JSON file. #save-toolstates = "/path/to/toolstates.json"
  53. Download patch debian/patches/u-prefer-local-css.patch

    --- 1.37.0+dfsg1-1/debian/patches/u-prefer-local-css.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/u-prefer-local-css.patch 2019-11-12 08:14:11.000000000 +0000 @@ -3,7 +3,7 @@ Author: Ximin Luo <infinity0@debian.org> Bug: https://github.com/rust-lang/rust/pull/45331 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs -@@ -411,7 +411,7 @@ +@@ -392,7 +392,7 @@ if filename == "not_found.md" { cmd.arg("--markdown-css")
  54. Download patch debian/patches/d-disable-cargo-vendor.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-disable-cargo-vendor.patch 2019-04-29 23:15:49.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-disable-cargo-vendor.patch 2019-11-12 08:14:11.000000000 +0000 @@ -4,7 +4,7 @@ Forwarded: not-needed --- --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs -@@ -851,7 +851,10 @@ +@@ -996,7 +996,10 @@ } // If we're building from git sources, we need to vendor a complete distribution. @@ -13,6 +13,6 @@ Forwarded: not-needed + // Debian: disabling this block because the debian package is also in a git + // repository, but cargo-vendor should not be installed or run. + if false && builder.rust_info.is_git() { - // Get cargo-vendor installed, if it isn't already. - let mut has_cargo_vendor = false; + // Vendor all Cargo dependencies let mut cmd = Command::new(&builder.initial_cargo); + cmd.arg("vendor")
  55. Download patch Cargo.lock
  56. Download patch src/bootstrap/builder/tests.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/builder/tests.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/builder/tests.rs 2019-09-23 21:15:52.000000000 +0000 @@ -629,7 +629,6 @@ fn test_with_no_doc_stage0() { fn test_exclude() { let mut config = configure(&[], &[]); config.exclude = vec![ - "src/test/run-pass".into(), "src/tools/tidy".into(), ]; config.cmd = Subcommand::Test { @@ -648,11 +647,9 @@ fn test_exclude() { let builder = Builder::new(&build); builder.run_step_descriptions(&Builder::get_step_descriptions(Kind::Test), &[]); - // Ensure we have really excluded run-pass & tidy - assert!(!builder.cache.contains::<test::RunPass>()); + // Ensure we have really excluded tidy assert!(!builder.cache.contains::<test::Tidy>()); // Ensure other tests are not affected. - assert!(builder.cache.contains::<test::RunPassFullDeps>()); assert!(builder.cache.contains::<test::RustdocUi>()); }
  57. Download patch debian/watch

    --- 1.37.0+dfsg1-1/debian/watch 2019-05-01 06:04:54.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/watch 2019-09-18 12:26:47.000000000 +0000 @@ -6,11 +6,11 @@ version=4 opts="\ pgpsigurlmangle=s/$/.asc/,\ uversionmangle=s/(\d)[_.+-]?((beta|alpha)\.?\d*)$/$1~$2/,\ -dversionmangle=s/\+dfsg\d*$//,\ +dversionmangle=s/\+dfsg\d\+llvm*$//,\ downloadurlmangle=s/\.[gx]z/.xz/,\ filenamemangle=s/.*\/(.*)\.[gx]z(\..*)?/$1.xz$2/,\ repack,\ -repacksuffix=+dfsg1,\ +repacksuffix=+dfsg1+llvm,\ compression=xz,\ " \ https://forge.rust-lang.org/other-installation-methods.html \
  58. Download patch debian/patches/d-ignore-error-detail-diff.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-ignore-error-detail-diff.patch 2019-08-28 14:06:01.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-ignore-error-detail-diff.patch 2019-11-12 08:14:11.000000000 +0000 @@ -1,11 +1,9 @@ Description: Ignore error details with $SRC_DIR We build with --remap-path-prefix so it doesn't work, see bug below Bug: https://github.com/rust-lang/rust/issues/53081 -Index: rustc/src/test/ui/impl-trait/impl-generic-mismatch.stderr -=================================================================== ---- rustc.orig/src/test/ui/impl-trait/impl-generic-mismatch.stderr -+++ rustc/src/test/ui/impl-trait/impl-generic-mismatch.stderr -@@ -29,11 +29,6 @@ error[E0643]: method `hash` has incompat +--- a/src/test/ui/impl-trait/impl-generic-mismatch.stderr ++++ b/src/test/ui/impl-trait/impl-generic-mismatch.stderr +@@ -29,11 +29,6 @@ | LL | fn hash(&self, hasher: &mut impl Hasher) {} | ^^^^^^^^^^^ expected generic parameter, found `impl Trait` @@ -17,11 +15,9 @@ Index: rustc/src/test/ui/impl-trait/impl error: aborting due to 3 previous errors -Index: rustc/src/test/ui/consts/const-size_of-cycle.stderr -=================================================================== ---- rustc.orig/src/test/ui/consts/const-size_of-cycle.stderr -+++ rustc/src/test/ui/consts/const-size_of-cycle.stderr -@@ -5,10 +5,6 @@ LL | bytes: [u8; std::mem::size_of:: +--- a/src/test/ui/consts/const-size_of-cycle.stderr ++++ b/src/test/ui/consts/const-size_of-cycle.stderr +@@ -5,10 +5,6 @@ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...which requires const-evaluating `Foo::bytes::{{constant}}#0`...
  59. Download patch src/ci/docker/run.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/run.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/run.sh 2019-09-23 21:15:52.000000000 +0000 @@ -17,9 +17,6 @@ dist=$objdir/build/dist source "$ci_dir/shared.sh" -travis_fold start build_docker -travis_time_start - if [ -f "$docker_dir/$image/Dockerfile" ]; then if [ "$CI" != "" ]; then hash_key=/tmp/.docker-hash-key.txt @@ -94,7 +91,6 @@ elif [ -f "$docker_dir/disabled/$image/D echo Cannot run disabled images on CI! exit 1 fi - # retry messes with the pipe from tar to docker. Not needed on non-travis # Transform changes the context of disabled Dockerfiles to match the enabled ones tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \ build \ @@ -107,9 +103,6 @@ else exit 1 fi -travis_fold end build_docker -travis_time_finish - mkdir -p $HOME/.cargo mkdir -p $objdir/tmp mkdir -p $objdir/cores @@ -132,28 +125,61 @@ fi # goes ahead and sets it for all builders. args="$args --privileged" -exec docker \ +# Things get a little weird if this script is already running in a docker +# container. If we're already in a docker container then we assume it's set up +# to do docker-in-docker where we have access to a working `docker` command. +# +# If this is the case (we check via the presence of `/.dockerenv`) +# then we can't actually use the `--volume` argument. Typically we use +# `--volume` to efficiently share the build and source directory between this +# script and the container we're about to spawn. If we're inside docker already +# though the `--volume` argument maps the *host's* folder to the container we're +# about to spawn, when in fact we want the folder in this container itself. To +# work around this we use a recipe cribbed from +# https://circleci.com/docs/2.0/building-docker-images/#mounting-folders to +# create a temporary container with a volume. We then copy the entire source +# directory into this container, and then use that copy in the container we're +# about to spawn. Finally after the build finishes we re-extract the object +# directory. +# +# Note that none of this is necessary if we're *not* in a docker-in-docker +# scenario. If this script is run on a bare metal host then we share a bunch of +# data directories to share as much data as possible. Note that we also use +# `LOCAL_USER_ID` (recognized in `src/ci/run.sh`) to ensure that files are all +# read/written as the same user as the bare-metal user. +if [ -f /.dockerenv ]; then + docker create -v /checkout --name checkout alpine:3.4 /bin/true + docker cp . checkout:/checkout + args="$args --volumes-from checkout" +else + args="$args --volume $root_dir:/checkout:ro" + args="$args --volume $objdir:/checkout/obj" + args="$args --volume $HOME/.cargo:/cargo" + args="$args --volume $HOME/rustsrc:$HOME/rustsrc" + args="$args --env LOCAL_USER_ID=`id -u`" +fi + +docker \ run \ - --volume "$root_dir:/checkout:ro" \ - --volume "$objdir:/checkout/obj" \ --workdir /checkout/obj \ --env SRC=/checkout \ $args \ --env CARGO_HOME=/cargo \ --env DEPLOY \ --env DEPLOY_ALT \ - --env LOCAL_USER_ID=`id -u` \ --env CI \ - --env TRAVIS \ - --env TRAVIS_BRANCH \ --env TF_BUILD \ --env BUILD_SOURCEBRANCHNAME \ --env TOOLSTATE_REPO_ACCESS_TOKEN \ --env TOOLSTATE_REPO \ + --env TOOLSTATE_PUBLISH \ --env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \ - --volume "$HOME/.cargo:/cargo" \ - --volume "$HOME/rustsrc:$HOME/rustsrc" \ --init \ --rm \ rust-ci \ /checkout/src/ci/run.sh + +if [ -f /.dockerenv ]; then + rm -rf $objdir + docker cp checkout:/checkout/obj $objdir +fi
  60. Download patch src/bootstrap/cache.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/cache.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/cache.rs 2019-09-23 21:15:52.000000000 +0000 @@ -266,8 +266,10 @@ impl Cache { .expect("invalid type mapped"); stepcache.get(step).cloned() } +} - #[cfg(test)] +#[cfg(test)] +impl Cache { pub fn all<S: Ord + Copy + Step>(&mut self) -> Vec<(S, S::Output)> { let cache = self.0.get_mut(); let type_id = TypeId::of::<S>(); @@ -279,7 +281,6 @@ impl Cache { v } - #[cfg(test)] pub fn contains<S: Step>(&self) -> bool { self.0.borrow().contains_key(&TypeId::of::<S>()) }
  61. Download patch src/ci/install-awscli.sh

    --- 1.37.0+dfsg1-1/src/ci/install-awscli.sh 1970-01-01 00:00:00.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/install-awscli.sh 2019-09-23 21:15:52.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/bash +# This script downloads and installs awscli from the packages mirrored in our +# own S3 bucket. This follows the recommendations at: +# +# https://packaging.python.org/guides/index-mirrors-and-caches/#caching-with-pip +# +# To create a new mirrored copy you can run the command: +# +# pip wheel awscli +# +# Before compressing please make sure all the wheels end with `-none-any.whl`. +# If that's not the case you'll need to remove the non-cross-platform ones and +# replace them with the .tar.gz downloaded from https://pypi.org. Also make +# sure it's possible to call this script with both Python 2 and Python 3. + +set -euo pipefail +IFS=$'\n\t' + +MIRROR="https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2019-07-27-awscli.tar" +DEPS_DIR="/tmp/awscli-deps" + +pip="pip" +pipflags="" +if [[ "${AGENT_OS}" == "Linux" ]]; then + pip="pip3" + pipflags="--user" + + sudo apt-get install -y python3-setuptools + echo "##vso[task.prependpath]$HOME/.local/bin" +fi + +mkdir -p "${DEPS_DIR}" +curl "${MIRROR}" | tar xf - -C "${DEPS_DIR}" +"${pip}" install ${pipflags} --no-index "--find-links=${DEPS_DIR}" awscli +rm -rf "${DEPS_DIR}"
  62. Download patch debian/patches/series

    --- 1.37.0+dfsg1-1/debian/patches/series 2019-08-29 07:26:08.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/series 2019-11-12 08:14:11.000000000 +0000 @@ -17,7 +17,7 @@ d-0000-ignore-removed-submodules.patch d-0001-disable-miniz.patch d-0002-pkg-config-no-special-snowflake.patch d-0003-mdbook-strip-embedded-libs.patch -d-0004-mdbook-2-1-compat.patch +#d-0004-mdbook-2-1-compat.patch # Other patches needed by the full Debian build #d-use-system-compiler-rt.patch d-ignore-error-detail-diff.patch
  63. Download patch debian/patches/u-fix-cross-compiling-1.35-1.34-stage0.patch

    --- 1.37.0+dfsg1-1/debian/patches/u-fix-cross-compiling-1.35-1.34-stage0.patch 2019-07-13 17:22:28.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/u-fix-cross-compiling-1.35-1.34-stage0.patch 2019-11-12 08:14:11.000000000 +0000 @@ -2,7 +2,7 @@ Bug: https://github.com/rust-lang/rust/i --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs -@@ -111,7 +111,7 @@ +@@ -153,7 +153,7 @@ // Link crates to the proc macro crate for the target, but use a host proc macro crate // to actually run the macros
  64. Download patch src/ci/docker/scripts/sccache.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/scripts/sccache.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/scripts/sccache.sh 2019-09-23 21:15:52.000000000 +0000 @@ -1,6 +1,6 @@ set -ex curl -fo /usr/local/bin/sccache \ - https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-02-sccache-x86_64-unknown-linux-musl + https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2018-04-02-sccache-x86_64-unknown-linux-musl chmod +x /usr/local/bin/sccache
  65. Download patch src/ci/docker/dist-powerpc-linux/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-powerpc-linux/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-powerpc-linux/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -36,7 +36,3 @@ ENV HOSTS=powerpc-unknown-linux-gnu ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS - -# FIXME(#36150) this will fail the bootstrap. Probably means something bad is -# happening! -ENV NO_LLVM_ASSERTIONS 1
  66. Download patch debian/libstd-rust-dev-wasm32-cross.lintian-overrides

    --- 1.37.0+dfsg1-1/debian/libstd-rust-dev-wasm32-cross.lintian-overrides 2019-08-29 07:26:08.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/libstd-rust-dev-wasm32-cross.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# wasm object files count as arch-independent for now, -# at least until we starting offering Debian in wasm -libstd-rust-dev-wasm32-cross binary: arch-independent-package-contains-binary-or-object usr/lib/rustlib/wasm32-unknown-unknown/lib/lib*.rlib
  67. Download patch debian/libstd-rust-1.38.lintian-overrides

    --- 1.37.0+dfsg1-1/debian/libstd-rust-1.38.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/libstd-rust-1.38.lintian-overrides 2019-11-12 08:14:08.000000000 +0000 @@ -0,0 +1,12 @@ +# "libstd" just seemed too generic +libstd-rust-1.38 binary: package-name-doesnt-match-sonames + +# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff +libstd-rust-1.38 binary: dev-pkg-without-shlib-symlink +libstd-rust-1.38 binary: shlib-without-versioned-soname +libstd-rust-1.38 binary: unused-shlib-entry-in-control-file + +# Libraries that use libc symbols (libterm, libstd, etc) *are* linked +# to libc. Lintian gets upset that some Rust libraries don't need +# libc, boo hoo. +libstd-rust-1.38 binary: library-not-linked-against-libc
  68. Download patch debian/config.toml.in

    --- 1.37.0+dfsg1-1/debian/config.toml.in 2019-08-29 07:26:08.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/config.toml.in 2019-09-20 10:11:23.000000000 +0000 @@ -9,7 +9,7 @@ cargo = "RUST_DESTDIR/usr/bin/cargo" build = "DEB_BUILD_RUST_TYPE" host = ["DEB_HOST_RUST_TYPE"] -target = ["wasm32-unknown-unknown", "DEB_TARGET_RUST_TYPE"] +target = ["DEB_TARGET_RUST_TYPE"] #full-bootstrap = true # originally needed to work around #45317 but no longer necessary @@ -22,25 +22,6 @@ docs = false [install] prefix = "/usr" -[target.DEB_BUILD_RUST_TYPE] -llvm-config = "LLVM_DESTDIR/usr/lib/llvm-LLVM_VERSION/bin/llvm-config" -linker = "DEB_BUILD_GNU_TYPE-gcc" - -ifelse(DEB_BUILD_RUST_TYPE,DEB_HOST_RUST_TYPE,, -[target.DEB_HOST_RUST_TYPE] -llvm-config = "LLVM_DESTDIR/usr/lib/llvm-LLVM_VERSION/bin/llvm-config" -linker = "DEB_HOST_GNU_TYPE-gcc" - -)dnl -ifelse(DEB_BUILD_RUST_TYPE,DEB_TARGET_RUST_TYPE,,DEB_HOST_RUST_TYPE,DEB_TARGET_RUST_TYPE,, -[target.DEB_TARGET_RUST_TYPE] -llvm-config = "LLVM_DESTDIR/usr/lib/llvm-LLVM_VERSION/bin/llvm-config" -linker = "DEB_TARGET_GNU_TYPE-gcc" - -)dnl -[llvm] -link-shared = true - [rust] jemalloc = false optimize = MAKE_OPTIMISATIONS
  69. Download patch src/ci/docker/x86_64-gnu-nopt/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-nopt/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-nopt/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y cmake \ sudo \ gdb \ + libssl-dev \ + pkg-config \ xz-utils COPY scripts/sccache.sh /scripts/
  70. Download patch src/ci/docker/dist-various-1/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-various-1/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-various-1/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -64,7 +64,7 @@ RUN env \ env \ CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a" \ CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a" \ - bash musl.sh armv7 && \ + bash musl.sh armv7hf && \ env \ CC=aarch64-linux-gnu-gcc \ CXX=aarch64-linux-gnu-g++ \ @@ -104,7 +104,9 @@ ENV TARGETS=$TARGETS,armv5te-unknown-lin ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf ENV TARGETS=$TARGETS,aarch64-unknown-linux-musl ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu -ENV TARGETS=$TARGETS,x86_64-unknown-redox +# FIXME: temporarily disable the redox builder, +# see: https://github.com/rust-lang/rust/issues/63160 +# ENV TARGETS=$TARGETS,x86_64-unknown-redox ENV TARGETS=$TARGETS,thumbv6m-none-eabi ENV TARGETS=$TARGETS,thumbv7m-none-eabi ENV TARGETS=$TARGETS,thumbv7em-none-eabi @@ -112,6 +114,7 @@ ENV TARGETS=$TARGETS,thumbv7em-none-eabi ENV TARGETS=$TARGETS,thumbv8m.base-none-eabi ENV TARGETS=$TARGETS,thumbv8m.main-none-eabi ENV TARGETS=$TARGETS,thumbv8m.main-none-eabihf +ENV TARGETS=$TARGETS,riscv32i-unknown-none-elf ENV TARGETS=$TARGETS,riscv32imc-unknown-none-elf ENV TARGETS=$TARGETS,riscv32imac-unknown-none-elf ENV TARGETS=$TARGETS,riscv64imac-unknown-none-elf @@ -134,7 +137,7 @@ ENV RUST_CONFIGURE_ARGS \ --musl-root-armv5te=/musl-armv5te \ --musl-root-arm=/musl-arm \ --musl-root-armhf=/musl-armhf \ - --musl-root-armv7=/musl-armv7 \ + --musl-root-armv7hf=/musl-armv7hf \ --musl-root-aarch64=/musl-aarch64 \ --musl-root-mips=/musl-mips \ --musl-root-mipsel=/musl-mipsel \
  71. Download patch src/bootstrap/test.rs
  72. Download patch src/ci/docker/dist-various-1/install-mips-musl.sh

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-various-1/install-mips-musl.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-various-1/install-mips-musl.sh 2019-09-23 21:15:52.000000000 +0000 @@ -5,7 +5,7 @@ mkdir /usr/local/mips-linux-musl # originally from # https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/ # OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2 -URL="https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror" +URL="https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc" FILE="OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2" curl -L "$URL/$FILE" | tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
  73. Download patch debian/patches/d-no-jemalloc.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-no-jemalloc.patch 2019-07-13 17:22:28.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-no-jemalloc.patch 2019-11-12 08:14:11.000000000 +0000 @@ -1,8 +1,6 @@ -Index: rustc/src/rustc/Cargo.toml -=================================================================== ---- rustc.orig/src/rustc/Cargo.toml -+++ rustc/src/rustc/Cargo.toml -@@ -15,11 +15,3 @@ rustc_driver = { path = "../librustc_dri +--- a/src/rustc/Cargo.toml ++++ b/src/rustc/Cargo.toml +@@ -15,11 +15,3 @@ # Make sure rustc_codegen_ssa ends up in the sysroot, because this # crate is intended to be used by codegen backends, which may not be in-tree. rustc_codegen_ssa = { path = "../librustc_codegen_ssa" }
  74. Download patch src/bootstrap/bin/rustdoc.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/bin/rustdoc.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/bin/rustdoc.rs 2019-09-23 21:15:52.000000000 +0000 @@ -2,7 +2,8 @@ //! //! See comments in `src/bootstrap/rustc.rs` for more information. -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::env; use std::process::Command;
  75. Download patch src/ci/docker/test-various/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/test-various/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/test-various/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y cmake \ sudo \ gdb \ + libssl-dev \ + pkg-config \ xz-utils \ wget \ patch @@ -41,7 +43,6 @@ ENV WASM_TARGETS=wasm32-unknown-unknown ENV WASM_SCRIPT python2.7 /checkout/x.py test --target $WASM_TARGETS \ src/test/run-make \ src/test/ui \ - src/test/run-pass \ src/test/compile-fail \ src/test/mir-opt \ src/test/codegen-units \
  76. Download patch src/build_helper/lib.rs

    --- 1.37.0+dfsg1-1/src/build_helper/lib.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/build_helper/lib.rs 2019-09-23 21:15:52.000000000 +0000 @@ -1,4 +1,5 @@ -#![deny(rust_2018_idioms)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::fs::File; use std::path::{Path, PathBuf}; @@ -44,18 +45,19 @@ pub fn restore_library_path() { } } -pub fn run(cmd: &mut Command) { +/// Run the command, printing what we are running. +pub fn run_verbose(cmd: &mut Command) { println!("running: {:?}", cmd); - run_silent(cmd); + run(cmd); } -pub fn run_silent(cmd: &mut Command) { - if !try_run_silent(cmd) { +pub fn run(cmd: &mut Command) { + if !try_run(cmd) { std::process::exit(1); } } -pub fn try_run_silent(cmd: &mut Command) -> bool { +pub fn try_run(cmd: &mut Command) -> bool { let status = match cmd.status() { Ok(status) => status, Err(e) => fail(&format!(
  77. Download patch src/ci/azure-pipelines/try.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/try.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/try.yml 2019-09-23 21:15:52.000000000 +0000 @@ -3,7 +3,7 @@ trigger: - try variables: -- group: real-prod-credentials +- group: prod-credentials jobs: - job: Linux @@ -36,7 +36,7 @@ jobs: # matrix: # dist-x86_64-apple: # SCRIPT: ./x.py dist -# RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --enable-lldb --set rust.jemalloc +# RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc # DEPLOY: 1 # RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 # MACOSX_DEPLOYMENT_TARGET: 10.7 @@ -46,7 +46,7 @@ jobs: # # dist-x86_64-apple-alt: # SCRIPT: ./x.py dist -# RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --enable-lldb --set rust.jemalloc +# RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc # DEPLOY_ALT: 1 # RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 # MACOSX_DEPLOYMENT_TARGET: 10.7
  78. Download patch src/ci/init_repo.sh

    --- 1.37.0+dfsg1-1/src/ci/init_repo.sh 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/init_repo.sh 2019-09-23 21:15:52.000000000 +0000 @@ -11,9 +11,6 @@ set -o nounset ci_dir=$(cd $(dirname $0) && pwd) . "$ci_dir/shared.sh" -travis_fold start init_repo -travis_time_start - REPO_DIR="$1" CACHE_DIR="$2" @@ -73,5 +70,3 @@ retry sh -c "git submodule deinit -f $us git submodule sync && \ git submodule update -j 16 --init --recursive $use_git" wait -travis_fold end init_repo -travis_time_finish
  79. Download patch src/ci/azure-pipelines/steps/install-clang.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/steps/install-clang.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/steps/install-clang.yml 2019-09-23 21:15:52.000000000 +0000 @@ -26,12 +26,18 @@ steps: # # Original downloaded here came from # http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe -- script: | - powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.exe" - set CLANG_DIR=%CD%\citools\clang-rust - %TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR% - set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe - echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS% +# That installer was run through `wine` on Linux and then the resulting +# installation directory (found in `$HOME/.wine/drive_c/Program Files/LLVM`) was +# packaged up into a tarball. We've had issues otherwise that the installer will +# randomly hang, provide not a lot of useful information, pollute global state, +# etc. In general the tarball is just more confined and easier to deal with when +# working with various CI environments. +- bash: | + set -e + mkdir -p citools + cd citools + curl -f https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/LLVM-7.0.0-win64.tar.gz | tar xzf - + echo "##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$RUST_CONFIGURE_ARGS --set llvm.clang-cl=`pwd`/clang-rust/bin/clang-cl.exe" condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],'')) displayName: Install clang (Windows)
  80. Download patch src/ci/awscli-requirements.txt

    --- 1.37.0+dfsg1-1/src/ci/awscli-requirements.txt 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/awscli-requirements.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -awscli==1.16.201 -botocore==1.12.191 -colorama==0.3.9 -docutils==0.14 -jmespath==0.9.4 -pyasn1==0.4.5 -python-dateutil==2.8.0 -PyYAML==5.1 -rsa==3.4.2 -s3transfer==0.2.1 -six==1.12.0 -urllib3==1.25.3 -futures==3.3.0; python_version < '3.0'
  81. Download patch src/bootstrap/dist.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/dist.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/dist.rs 2019-09-23 21:15:52.000000000 +0000 @@ -808,6 +808,7 @@ fn copy_src_dirs(builder: &Builder<'_>, "llvm-project/lld", "llvm-project\\lld", "llvm-project/lldb", "llvm-project\\lldb", "llvm-project/llvm", "llvm-project\\llvm", + "llvm-project/compiler-rt", "llvm-project\\compiler-rt", ]; if spath.contains("llvm-project") && !spath.ends_with("llvm-project") && !LLVM_PROJECTS.iter().any(|path| spath.contains(path)) @@ -903,7 +904,7 @@ impl Step for Src { "src/libtest", "src/libterm", "src/libprofiler_builtins", - "src/stdsimd", + "src/stdarch", "src/libproc_macro", "src/tools/rustc-std-workspace-core", "src/tools/rustc-std-workspace-alloc", @@ -935,8 +936,6 @@ impl Step for Src { } } -const CARGO_VENDOR_VERSION: &str = "0.1.22"; - #[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)] pub struct PlainSourceTarball; @@ -998,26 +997,6 @@ impl Step for PlainSourceTarball { // If we're building from git sources, we need to vendor a complete distribution. if builder.rust_info.is_git() { - // Get cargo-vendor installed, if it isn't already. - let mut has_cargo_vendor = false; - let mut cmd = Command::new(&builder.initial_cargo); - for line in output(cmd.arg("install").arg("--list")).lines() { - has_cargo_vendor |= line.starts_with("cargo-vendor "); - } - if !has_cargo_vendor { - let mut cmd = builder.cargo( - builder.compiler(0, builder.config.build), - Mode::ToolBootstrap, - builder.config.build, - "install" - ); - cmd.arg("--force") - .arg("--debug") - .arg("--vers").arg(CARGO_VENDOR_VERSION) - .arg("cargo-vendor"); - builder.run(&mut cmd); - } - // Vendor all Cargo dependencies let mut cmd = Command::new(&builder.initial_cargo); cmd.arg("vendor")
  82. Download patch src/bootstrap/bin/rustc.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/bin/rustc.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/bin/rustc.rs 2019-09-23 21:15:52.000000000 +0000 @@ -15,7 +15,8 @@ //! switching compilers for the bootstrap and for build scripts will probably //! never get replaced. -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::env; use std::ffi::OsString; @@ -91,17 +92,16 @@ fn main() { cmd.args(&args) .env(bootstrap::util::dylib_path_var(), env::join_paths(&dylib_path).unwrap()); - let mut maybe_crate = None; // Get the name of the crate we're compiling, if any. - let maybe_crate_name = args.windows(2) - .find(|a| &*a[0] == "--crate-name") - .map(|crate_name| &*crate_name[1]); + let crate_name = args.windows(2) + .find(|args| args[0] == "--crate-name") + .and_then(|args| args[1].to_str()); - if let Some(current_crate) = maybe_crate_name { + if let Some(crate_name) = crate_name { if let Some(target) = env::var_os("RUSTC_TIME") { if target == "all" || - target.into_string().unwrap().split(",").any(|c| c.trim() == current_crate) + target.into_string().unwrap().split(",").any(|c| c.trim() == crate_name) { cmd.arg("-Ztime"); } @@ -125,10 +125,29 @@ fn main() { cmd.arg(format!("-Cdebuginfo={}", debuginfo_level)); } + if env::var_os("RUSTC_DENY_WARNINGS").is_some() && + env::var_os("RUSTC_EXTERNAL_TOOL").is_none() { + // When extending this list, search for `NO-RUSTC-WRAPPER` and add the new lints + // there as well, some code doesn't go through this `rustc` wrapper. + cmd.arg("-Dwarnings"); + cmd.arg("-Drust_2018_idioms"); + cmd.arg("-Dunused_lifetimes"); + // cfg(not(bootstrap)): Remove this during the next stage 0 compiler update. + // `-Drustc::internal` is a new feature and `rustc_version` mis-reports the `stage`. + let cfg_not_bootstrap = stage != "0" && crate_name != Some("rustc_version"); + if cfg_not_bootstrap && use_internal_lints(crate_name) { + cmd.arg("-Zunstable-options"); + cmd.arg("-Drustc::internal"); + } + } + if let Some(target) = target { // The stage0 compiler has a special sysroot distinct from what we - // actually downloaded, so we just always pass the `--sysroot` option. - cmd.arg("--sysroot").arg(&sysroot); + // actually downloaded, so we just always pass the `--sysroot` option, + // unless one is already set. + if !args.iter().any(|arg| arg == "--sysroot") { + cmd.arg("--sysroot").arg(&sysroot); + } cmd.arg("-Zexternal-macro-backtrace"); @@ -167,9 +186,6 @@ fn main() { cmd.arg(format!("-Clinker={}", target_linker)); } - let crate_name = maybe_crate_name.unwrap(); - maybe_crate = Some(crate_name); - // If we're compiling specifically the `panic_abort` crate then we pass // the `-C panic=abort` option. Note that we do not do this for any // other crate intentionally as this is the only crate for now that we @@ -182,8 +198,8 @@ fn main() { // `compiler_builtins` are unconditionally compiled with panic=abort to // workaround undefined references to `rust_eh_unwind_resume` generated // otherwise, see issue https://github.com/rust-lang/rust/issues/43095. - if crate_name == "panic_abort" || - crate_name == "compiler_builtins" && stage != "0" { + if crate_name == Some("panic_abort") || + crate_name == Some("compiler_builtins") && stage != "0" { cmd.arg("-C").arg("panic=abort"); } @@ -196,7 +212,7 @@ fn main() { // The compiler builtins are pretty sensitive to symbols referenced in // libcore and such, so we never compile them with debug assertions. - if crate_name == "compiler_builtins" { + if crate_name == Some("compiler_builtins") { cmd.arg("-C").arg("debug-assertions=no"); } else { cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions)); @@ -272,20 +288,6 @@ fn main() { } } - // When running miri tests, we need to generate MIR for all libraries - if env::var("TEST_MIRI").ok().map_or(false, |val| val == "true") { - // The flags here should be kept in sync with `add_miri_default_args` - // in miri's `src/lib.rs`. - cmd.arg("-Zalways-encode-mir"); - cmd.arg("--cfg=miri"); - // These options are preferred by miri, to be able to perform better validation, - // but the bootstrap compiler might not understand them. - if stage != "0" { - cmd.arg("-Zmir-emit-retag"); - cmd.arg("-Zmir-opt-level=0"); - } - } - if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") { cmd.arg("--remap-path-prefix").arg(&map); } @@ -305,9 +307,6 @@ fn main() { } } - // This is required for internal lints. - cmd.arg("-Zunstable-options"); - // Force all crates compiled by this compiler to (a) be unstable and (b) // allow the `rustc_private` feature to link to other unstable crates // also in the sysroot. We also do this for host crates, since those @@ -320,13 +319,6 @@ fn main() { cmd.arg("--cfg").arg("parallel_compiler"); } - if env::var_os("RUSTC_DENY_WARNINGS").is_some() && env::var_os("RUSTC_EXTERNAL_TOOL").is_none() - { - cmd.arg("-Dwarnings"); - cmd.arg("-Dbare_trait_objects"); - cmd.arg("-Drust_2018_idioms"); - } - if verbose > 1 { eprintln!( "rustc command: {:?}={:?} {:?}", @@ -349,7 +341,7 @@ fn main() { } if env::var_os("RUSTC_PRINT_STEP_TIMINGS").is_some() { - if let Some(krate) = maybe_crate { + if let Some(crate_name) = crate_name { let start = Instant::now(); let status = cmd .status() @@ -358,7 +350,7 @@ fn main() { let is_test = args.iter().any(|a| a == "--test"); eprintln!("[RUSTC-TIMING] {} test:{} {}.{:03}", - krate.to_string_lossy(), + crate_name, is_test, dur.as_secs(), dur.subsec_nanos() / 1_000_000); @@ -377,6 +369,14 @@ fn main() { std::process::exit(code); } +// Rustc crates for which internal lints are in effect. +fn use_internal_lints(crate_name: Option<&str>) -> bool { + crate_name.map_or(false, |crate_name| { + crate_name.starts_with("rustc") || crate_name.starts_with("syntax") || + ["arena", "fmt_macros"].contains(&crate_name) + }) +} + #[cfg(unix)] fn exec_cmd(cmd: &mut Command) -> io::Result<i32> { use std::os::unix::process::CommandExt;
  83. Download patch src/ci/docker/x86_64-gnu-debug/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-debug/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-debug/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -17,6 +17,8 @@ RUN apt-get update && apt-get install -y cmake \ sudo \ gdb \ + libssl-dev \ + pkg-config \ xz-utils \ lld \ clang @@ -31,7 +33,6 @@ ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ --enable-debug \ --enable-lld \ - --enable-lldb \ --enable-optimize \ --set llvm.use-linker=lld \ --set target.x86_64-unknown-linux-gnu.linker=clang \
  84. Download patch src/ci/docker/x86_64-gnu/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y cmake \ sudo \ gdb \ + libssl-dev \ + pkg-config \ xz-utils COPY scripts/sccache.sh /scripts/
  85. Download patch src/bootstrap/builder.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/builder.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/builder.rs 2019-09-23 21:15:52.000000000 +0000 @@ -371,7 +371,6 @@ impl<'a> Builder<'a> { Kind::Test => describe!( test::Tidy, test::Ui, - test::RunPass, test::CompileFail, test::RunFail, test::RunPassValgrind, @@ -382,10 +381,8 @@ impl<'a> Builder<'a> { test::Incremental, test::Debuginfo, test::UiFullDeps, - test::RunPassFullDeps, test::Rustdoc, test::Pretty, - test::RunPassPretty, test::RunFailPretty, test::RunPassValgrindPretty, test::Crate, @@ -405,6 +402,7 @@ impl<'a> Builder<'a> { test::TheBook, test::UnstableBook, test::RustcBook, + test::RustcGuide, test::EmbeddedBook, test::EditionGuide, test::Rustfmt, @@ -545,15 +543,6 @@ impl<'a> Builder<'a> { parent: Cell::new(None), }; - if kind == Kind::Dist { - assert!( - !builder.config.test_miri, - "Do not distribute with miri enabled.\n\ - The distributed libraries would include all MIR (increasing binary size). - The distributed MIR would include validation statements." - ); - } - builder } @@ -983,7 +972,6 @@ impl<'a> Builder<'a> { PathBuf::from("/path/to/nowhere/rustdoc/not/required") }, ) - .env("TEST_MIRI", self.config.test_miri.to_string()) .env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir()); if let Some(host_linker) = self.linker(compiler.host) {
  86. Download patch debian/patches/d-0003-mdbook-strip-embedded-libs.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-0003-mdbook-strip-embedded-libs.patch 2019-08-28 14:06:01.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-0003-mdbook-strip-embedded-libs.patch 2019-11-12 08:14:11.000000000 +0000 @@ -9,11 +9,9 @@ Comment: Make sure the paths here match the ones in debian/rust-doc.links --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -Index: rustc-1.37.0-src/src/tools/linkchecker/main.rs -=================================================================== ---- rustc-1.37.0-src.orig/src/tools/linkchecker/main.rs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/src/tools/linkchecker/main.rs 2019-08-22 11:17:30.016767983 -0700 -@@ -173,6 +173,11 @@ +--- a/src/tools/linkchecker/main.rs ++++ b/src/tools/linkchecker/main.rs +@@ -171,6 +171,11 @@ url.starts_with("irc:") || url.starts_with("data:") { return; } @@ -25,10 +23,8 @@ Index: rustc-1.37.0-src/src/tools/linkch let mut parts = url.splitn(2, "#"); let url = parts.next().unwrap(); let fragment = parts.next(); -Index: rustc-1.37.0-src/vendor/mdbook/src/book/init.rs -=================================================================== ---- rustc-1.37.0-src.orig/vendor/mdbook/src/book/init.rs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/vendor/mdbook/src/book/init.rs 2019-08-22 11:17:30.016767983 -0700 +--- a/vendor/mdbook/src/book/init.rs ++++ b/vendor/mdbook/src/book/init.rs @@ -148,12 +148,6 @@ let mut js = File::create(themedir.join("book.js"))?; js.write_all(theme::JS)?; @@ -42,10 +38,8 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr Ok(()) } -Index: rustc-1.37.0-src/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs -=================================================================== ---- rustc-1.37.0-src.orig/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs 2019-08-22 11:17:30.020768197 -0700 +--- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs ++++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs @@ -3,7 +3,7 @@ use crate::errors::*; use crate::renderer::html_handlebars::helpers; @@ -55,7 +49,7 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr use crate::utils; use std::collections::BTreeMap; -@@ -110,7 +110,7 @@ +@@ -108,7 +108,7 @@ &self, destination: &Path, theme: &Theme, @@ -64,7 +58,7 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr ) -> Result<()> { use crate::utils::fs::write_file; -@@ -126,62 +126,8 @@ +@@ -124,62 +124,8 @@ write_file(destination, "css/print.css", &theme.print_css)?; write_file(destination, "css/variables.css", &theme.variables_css)?; write_file(destination, "favicon.png", &theme.favicon)?; @@ -127,10 +121,8 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr Ok(()) } -Index: rustc-1.37.0-src/vendor/mdbook/src/renderer/html_handlebars/search.rs -=================================================================== ---- rustc-1.37.0-src.orig/vendor/mdbook/src/renderer/html_handlebars/search.rs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/vendor/mdbook/src/renderer/html_handlebars/search.rs 2019-08-22 11:17:30.020768197 -0700 +--- a/vendor/mdbook/src/renderer/html_handlebars/search.rs ++++ b/vendor/mdbook/src/renderer/html_handlebars/search.rs @@ -34,8 +34,6 @@ format!("Object.assign(window.search, {});", index).as_bytes(), )?; @@ -140,10 +132,8 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr debug!("Copying search files ✓"); } -Index: rustc-1.37.0-src/vendor/mdbook/src/theme/index.hbs -=================================================================== ---- rustc-1.37.0-src.orig/vendor/mdbook/src/theme/index.hbs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/vendor/mdbook/src/theme/index.hbs 2019-08-22 11:17:43.733501509 -0700 +--- a/vendor/mdbook/src/theme/index.hbs ++++ b/vendor/mdbook/src/theme/index.hbs @@ -20,12 +20,10 @@ <link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print"> @@ -255,10 +245,8 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script> <!-- Custom JS scripts --> -Index: rustc-1.37.0-src/vendor/mdbook/src/theme/mod.rs -=================================================================== ---- rustc-1.37.0-src.orig/vendor/mdbook/src/theme/mod.rs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/vendor/mdbook/src/theme/mod.rs 2019-08-22 11:17:30.020768197 -0700 +--- a/vendor/mdbook/src/theme/mod.rs ++++ b/vendor/mdbook/src/theme/mod.rs @@ -1,7 +1,5 @@ #![allow(missing_docs)] @@ -345,10 +333,8 @@ Index: rustc-1.37.0-src/vendor/mdbook/sr }; assert_eq!(got, empty); -Index: rustc-1.37.0-src/vendor/mdbook/src/theme/searcher/mod.rs -=================================================================== ---- rustc-1.37.0-src.orig/vendor/mdbook/src/theme/searcher/mod.rs 2019-08-22 11:17:30.020768197 -0700 -+++ rustc-1.37.0-src/vendor/mdbook/src/theme/searcher/mod.rs 2019-08-22 11:17:30.020768197 -0700 +--- a/vendor/mdbook/src/theme/searcher/mod.rs ++++ b/vendor/mdbook/src/theme/searcher/mod.rs @@ -2,5 +2,3 @@ //! the "search" cargo feature is disabled.
  87. Download patch src/bootstrap/doc.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/doc.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/doc.rs 2019-09-23 21:15:52.000000000 +0000 @@ -23,7 +23,7 @@ use crate::cache::{INTERNER, Interned}; use crate::config::Config; macro_rules! book { - ($($name:ident, $path:expr, $book_name:expr, $book_ver:expr;)+) => { + ($($name:ident, $path:expr, $book_name:expr;)+) => { $( #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct $name { @@ -49,7 +49,6 @@ macro_rules! book { builder.ensure(RustbookSrc { target: self.target, name: INTERNER.intern_str($book_name), - version: $book_ver, src: doc_src(builder), }) } @@ -61,21 +60,15 @@ macro_rules! book { // NOTE: When adding a book here, make sure to ALSO build the book by // adding a build step in `src/bootstrap/builder.rs`! book!( - EditionGuide, "src/doc/edition-guide", "edition-guide", RustbookVersion::Latest; - EmbeddedBook, "src/doc/embedded-book", "embedded-book", RustbookVersion::Latest; - Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::Latest; - Reference, "src/doc/reference", "reference", RustbookVersion::MdBook1; - RustByExample, "src/doc/rust-by-example", "rust-by-example", RustbookVersion::Latest; - RustcBook, "src/doc/rustc", "rustc", RustbookVersion::MdBook1; - RustdocBook, "src/doc/rustdoc", "rustdoc", RustbookVersion::Latest; + EditionGuide, "src/doc/edition-guide", "edition-guide"; + EmbeddedBook, "src/doc/embedded-book", "embedded-book"; + Nomicon, "src/doc/nomicon", "nomicon"; + Reference, "src/doc/reference", "reference"; + RustByExample, "src/doc/rust-by-example", "rust-by-example"; + RustcBook, "src/doc/rustc", "rustc"; + RustdocBook, "src/doc/rustdoc", "rustdoc"; ); -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -enum RustbookVersion { - MdBook1, - Latest, -} - fn doc_src(builder: &Builder<'_>) -> Interned<PathBuf> { INTERNER.intern_path(builder.src.join("src/doc")) } @@ -108,7 +101,6 @@ impl Step for UnstableBook { target: self.target, name: INTERNER.intern_str("unstable-book"), src: builder.md_doc_out(self.target), - version: RustbookVersion::Latest, }) } } @@ -162,7 +154,6 @@ struct RustbookSrc { target: Interned<String>, name: Interned<String>, src: Interned<PathBuf>, - version: RustbookVersion, } impl Step for RustbookSrc { @@ -194,18 +185,11 @@ impl Step for RustbookSrc { builder.info(&format!("Rustbook ({}) - {}", target, name)); let _ = fs::remove_dir_all(&out); - let vers = match self.version { - RustbookVersion::MdBook1 => "1", - RustbookVersion::Latest => "3", - }; - builder.run(rustbook_cmd .arg("build") .arg(&src) .arg("-d") - .arg(out) - .arg("-m") - .arg(vers)); + .arg(out)); } } @@ -251,7 +235,6 @@ impl Step for TheBook { builder.ensure(RustbookSrc { target, name: INTERNER.intern_string(name.to_string()), - version: RustbookVersion::Latest, src: doc_src(builder), }); @@ -261,7 +244,6 @@ impl Step for TheBook { builder.ensure(RustbookSrc { target, name: INTERNER.intern_string(source_name), - version: RustbookVersion::Latest, src: doc_src(builder), }); @@ -269,7 +251,6 @@ impl Step for TheBook { builder.ensure(RustbookSrc { target, name: INTERNER.intern_string(source_name), - version: RustbookVersion::Latest, src: doc_src(builder), }); @@ -277,7 +258,6 @@ impl Step for TheBook { builder.ensure(RustbookSrc { target, name: INTERNER.intern_string(source_name), - version: RustbookVersion::Latest, src: doc_src(builder), });
  88. Download patch src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md

    --- 1.37.0+dfsg1-1/src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md 2019-06-24 00:25:30.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/doc/book/src/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.md 2019-06-27 13:50:36.000000000 +0000 @@ -22,9 +22,8 @@ removing some of the modules and functio the crate root. The `eat_at_restaurant` function is part of our library crate’s public API, so we mark it with the `pub` keyword. In the [”Exposing Paths with the `pub` Keyword”][pub]<!-- ignore --> section, we’ll go into more detail -about `pub`. - -Note that this example won’t compile just yet; we’ll explain why in a bit. +about `pub`. Note that this example won’t compile just yet; we’ll explain why +in a bit. <span class="filename">Filename: src/lib.rs</span>
  89. Download patch src/ci/docker/asmjs/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/asmjs/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/asmjs/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -32,7 +32,7 @@ ENV TARGETS=asmjs-unknown-emscripten ENV RUST_CONFIGURE_ARGS --enable-emscripten --disable-optimize-tests ENV SCRIPT python2.7 ../x.py test --target $TARGETS \ - src/test/run-pass \ + src/test/ui \ src/test/run-fail \ src/libstd \ src/liballoc \
  90. Download patch debian/patches/d-0004-mdbook-2-1-compat.patch

    --- 1.37.0+dfsg1-1/debian/patches/d-0004-mdbook-2-1-compat.patch 2019-08-28 14:06:01.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/patches/d-0004-mdbook-2-1-compat.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ ---- a/src/tools/rustbook/src/main.rs -+++ b/src/tools/rustbook/src/main.rs -@@ -7,9 +7,6 @@ - - use clap::{App, ArgMatches, SubCommand, AppSettings}; - --use mdbook_1::{MDBook as MDBook1}; --use mdbook_1::errors::{Result as Result1}; -- - use mdbook::MDBook; - use mdbook::errors::Result; - -@@ -37,18 +34,11 @@ - match matches.subcommand() { - ("build", Some(sub_matches)) => { - match sub_matches.value_of("mdbook-vers") { -- None | Some("1") => { -- if let Err(e) = build_1(sub_matches) { -- eprintln!("Error: {}", e); -- -- for cause in e.iter().skip(1) { -- eprintln!("\tCaused By: {}", cause); -- } -- -- ::std::process::exit(101); -+ None | Some("1") | Some("2") | Some("3") => { -+ match sub_matches.value_of("mdbook-vers") { -+ Some("1") => env::set_var("DEB_MDBOOK_1_COMPAT", "1"), -+ _ => (), - } -- } -- Some("2") | Some("3") => { - if let Err(e) = build(sub_matches) { - eprintln!("Error: {}", e); - -@@ -69,23 +59,6 @@ - } - - // Build command implementation --pub fn build_1(args: &ArgMatches<'_>) -> Result1<()> { -- let book_dir = get_book_dir(args); -- let mut book = MDBook1::load(&book_dir)?; -- -- // Set this to allow us to catch bugs in advance. -- book.config.build.create_missing = false; -- -- if let Some(dest_dir) = args.value_of("dest-dir") { -- book.config.build.build_dir = PathBuf::from(dest_dir); -- } -- -- book.build()?; -- -- Ok(()) --} -- --// Build command implementation - pub fn build(args: &ArgMatches<'_>) -> Result<()> { - let book_dir = get_book_dir(args); - let mut book = MDBook::load(&book_dir)?; ---- a/src/tools/rustbook/Cargo.toml -+++ b/src/tools/rustbook/Cargo.toml -@@ -12,9 +12,3 @@ - version = "0.3.0" - default-features = false - features = ["search"] -- --[dependencies.mdbook_1] --package = "mdbook" --version = "0.1.7" --default-features = false --features = ["search"] ---- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs -+++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs -@@ -10,6 +10,7 @@ - use std::collections::HashMap; - use std::fs; - use std::path::{Path, PathBuf}; -+use std::env; - - use handlebars::Handlebars; - use regex::{Captures, Regex}; -@@ -66,7 +67,7 @@ - } - - ctx.data.insert("path".to_owned(), json!(path)); -- ctx.data.insert("content".to_owned(), json!(content)); -+ ctx.data.insert("content".to_owned(), json!(if env::var("DEB_MDBOOK_1_COMPAT") == Ok("1".to_string()) { fixed_content } else { content })); - ctx.data.insert("chapter_title".to_owned(), json!(ch.name)); - ctx.data.insert("title".to_owned(), json!(title)); - ctx.data.insert( ---- a/vendor/mdbook/src/utils/mod.rs -+++ b/vendor/mdbook/src/utils/mod.rs -@@ -4,6 +4,8 @@ - mod string; - use crate::errors::Error; - use regex::Regex; -+use std::path::Path; -+use std::env; - - use pulldown_cmark::{html, CowStr, Event, Options, Parser, Tag}; - -@@ -69,11 +71,13 @@ - lazy_static! { - static ref SCHEME_LINK: Regex = Regex::new(r"^[a-z][a-z0-9+.-]*:").unwrap(); - static ref MD_LINK: Regex = Regex::new(r"(?P<link>.*)\.md(?P<anchor>#.*)?").unwrap(); -+ static ref HTML_LINK: Regex = Regex::new(r"(?P<link>.*)\.html(?P<anchor>#.*)?").unwrap(); - } - - fn fix<'a>(dest: CowStr<'a>, base: &str) -> CowStr<'a> { - // Don't modify links with schemes like `https`. - if !SCHEME_LINK.is_match(&dest) { -+ let old_dest = &dest; - // This is a relative link, adjust it as necessary. - let mut fixed_link = String::new(); - if !base.is_empty() { -@@ -88,6 +92,27 @@ - fixed_link.push_str(anchor.as_str()); - } - } else { -+ // compatibility for mdbook 1 -+ if env::var("DEB_MDBOOK_1_COMPAT") == Ok("1".to_string()) { -+ if let Some(caps) = HTML_LINK.captures(&old_dest) { -+ let base = Path::new(base); -+ let mut path = Vec::new(); -+ for _ in base.components() { -+ path.push("../"); -+ } -+ path.extend(&[&caps["link"], ".html"]); -+ let mut html_link = path.concat(); -+ -+ if let Some(anchor) = caps.name("anchor") { -+ html_link.push_str(anchor.as_str().replace("#a--", "#--").as_str()); -+ } -+ -+ return CowStr::from(html_link); -+ } else { -+ return dest; -+ } -+ } -+ - fixed_link.push_str(&dest); - }; - return CowStr::from(fixed_link);
  91. Download patch src/ci/docker/armhf-gnu/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/armhf-gnu/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/armhf-gnu/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -72,7 +72,7 @@ RUN arm-linux-gnueabihf-gcc addentropy.c # TODO: What is this?! # Source of the file: https://github.com/vfdev-5/qemu-rpi2-vexpress/raw/master/vexpress-v2p-ca15-tc1.dtb -RUN curl -O https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/vexpress-v2p-ca15-tc1.dtb +RUN curl -O https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/vexpress-v2p-ca15-tc1.dtb COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh
  92. Download patch src/ci/azure-pipelines/steps/install-sccache.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/steps/install-sccache.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/steps/install-sccache.yml 2019-09-23 21:15:52.000000000 +0000 @@ -2,14 +2,14 @@ steps: - bash: | set -e - curl -fo /usr/local/bin/sccache https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin + curl -fo /usr/local/bin/sccache https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2018-04-02-sccache-x86_64-apple-darwin chmod +x /usr/local/bin/sccache displayName: Install sccache (OSX) condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) - script: | md sccache - powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc" + powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf sccache\sccache.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2018-04-26-sccache-x86_64-pc-windows-msvc" echo ##vso[task.prependpath]%CD%\sccache displayName: Install sccache (Windows) condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
  93. Download patch src/ci/azure-pipelines/auto.yml

    --- 1.37.0+dfsg1-1/src/ci/azure-pipelines/auto.yml 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/azure-pipelines/auto.yml 2019-09-23 21:15:52.000000000 +0000 @@ -7,7 +7,7 @@ trigger: - auto variables: -- group: real-prod-credentials +- group: prod-credentials jobs: - job: Linux @@ -174,7 +174,7 @@ jobs: dist-x86_64-apple: SCRIPT: ./x.py dist - RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --enable-lldb --set rust.jemalloc + RUST_CONFIGURE_ARGS: --target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc DEPLOY: 1 RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 MACOSX_DEPLOYMENT_TARGET: 10.7 @@ -184,7 +184,7 @@ jobs: dist-x86_64-apple-alt: SCRIPT: ./x.py dist - RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --enable-lldb --set rust.jemalloc + RUST_CONFIGURE_ARGS: --enable-extended --enable-profiler --set rust.jemalloc DEPLOY_ALT: 1 RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 MACOSX_DEPLOYMENT_TARGET: 10.7 @@ -202,7 +202,7 @@ jobs: dist-i686-apple: SCRIPT: ./x.py dist - RUST_CONFIGURE_ARGS: --build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc + RUST_CONFIGURE_ARGS: --build=i686-apple-darwin --enable-full-tools --enable-profiler --set rust.jemalloc DEPLOY: 1 RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 MACOSX_DEPLOYMENT_TARGET: 10.7 @@ -254,7 +254,7 @@ jobs: x86_64-msvc-tools: MSYS_BITS: 64 SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstates.json windows - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json --enable-test-miri + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json # 32/64-bit MinGW builds. # @@ -273,7 +273,7 @@ jobs: MSYS_BITS: 32 RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu SCRIPT: make ci-subset-1 - MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror + MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z MINGW_DIR: mingw32 # FIXME(#59637) @@ -283,14 +283,14 @@ jobs: MSYS_BITS: 32 RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu SCRIPT: make ci-subset-2 - MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror + MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z MINGW_DIR: mingw32 x86_64-mingw-1: MSYS_BITS: 64 SCRIPT: make ci-subset-1 RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu - MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror + MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z MINGW_DIR: mingw64 # FIXME(#59637) @@ -300,7 +300,7 @@ jobs: MSYS_BITS: 64 SCRIPT: make ci-subset-2 RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu - MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror + MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z MINGW_DIR: mingw64 @@ -327,7 +327,7 @@ jobs: MSYS_BITS: 32 RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler SCRIPT: python x.py dist - MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror + MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z MINGW_DIR: mingw32 DIST_REQUIRE_ALL_TOOLS: 1 @@ -336,7 +336,7 @@ jobs: MSYS_BITS: 64 SCRIPT: python x.py dist RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler - MINGW_URL: https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror + MINGW_URL: https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z MINGW_DIR: mingw64 DIST_REQUIRE_ALL_TOOLS: 1
  94. Download patch src/bootstrap/config.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/config.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/config.rs 2019-09-23 21:15:52.000000000 +0000 @@ -75,7 +75,7 @@ pub struct Config { pub llvm_link_shared: bool, pub llvm_clang_cl: Option<String>, pub llvm_targets: Option<String>, - pub llvm_experimental_targets: String, + pub llvm_experimental_targets: Option<String>, pub llvm_link_jobs: Option<u32>, pub llvm_version_suffix: Option<String>, pub llvm_use_linker: Option<String>, @@ -128,7 +128,6 @@ pub struct Config { pub low_priority: bool, pub channel: String, pub verbose_tests: bool, - pub test_miri: bool, pub save_toolstates: Option<PathBuf>, pub print_step_timings: bool, pub missing_tools: bool, @@ -315,7 +314,6 @@ struct Rust { debug: Option<bool>, dist_src: Option<bool>, verbose_tests: Option<bool>, - test_miri: Option<bool>, incremental: Option<bool>, save_toolstates: Option<String>, codegen_backends: Option<Vec<String>>, @@ -375,7 +373,6 @@ impl Config { config.codegen_tests = true; config.ignore_git = false; config.rust_dist_src = true; - config.test_miri = false; config.rust_codegen_backends = vec![INTERNER.intern_str("llvm")]; config.rust_codegen_backends_dir = "codegen-backends".to_owned(); config.deny_warnings = true; @@ -405,7 +402,7 @@ impl Config { config.incremental = flags.incremental; config.dry_run = flags.dry_run; config.keep_stage = flags.keep_stage; - if let Some(value) = flags.warnings { + if let Some(value) = flags.deny_warnings { config.deny_warnings = value; } @@ -524,8 +521,7 @@ impl Config { set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp); set(&mut config.llvm_link_shared, llvm.link_shared); config.llvm_targets = llvm.targets.clone(); - config.llvm_experimental_targets = llvm.experimental_targets.clone() - .unwrap_or_else(|| "WebAssembly;RISCV".to_string()); + config.llvm_experimental_targets = llvm.experimental_targets.clone(); config.llvm_link_jobs = llvm.link_jobs; config.llvm_version_suffix = llvm.version_suffix.clone(); config.llvm_clang_cl = llvm.clang_cl.clone(); @@ -558,7 +554,6 @@ impl Config { set(&mut config.channel, rust.channel.clone()); set(&mut config.rust_dist_src, rust.dist_src); set(&mut config.verbose_tests, rust.verbose_tests); - set(&mut config.test_miri, rust.test_miri); // in the case "false" is set explicitly, do not overwrite the command line args if let Some(true) = rust.incremental { config.incremental = true; @@ -571,7 +566,7 @@ impl Config { config.rustc_default_linker = rust.default_linker.clone(); config.musl_root = rust.musl_root.clone().map(PathBuf::from); config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from); - set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings)); + set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings)); set(&mut config.backtrace_on_ice, rust.backtrace_on_ice); set(&mut config.rust_verify_llvm_ir, rust.verify_llvm_ir); set(&mut config.rust_remap_debuginfo, rust.remap_debuginfo);
  95. Download patch src/ci/docker/x86_64-gnu-full-bootstrap/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/x86_64-gnu-full-bootstrap/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/x86_64-gnu-full-bootstrap/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -11,6 +11,8 @@ RUN apt-get update && apt-get install -y cmake \ sudo \ gdb \ + libssl-dev \ + pkg-config \ xz-utils COPY scripts/sccache.sh /scripts/
  96. Download patch debian/libstd-rust-1.37.lintian-overrides

    --- 1.37.0+dfsg1-1/debian/libstd-rust-1.37.lintian-overrides 2019-08-28 14:06:01.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/debian/libstd-rust-1.37.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -# "libstd" just seemed too generic -libstd-rust-1.37 binary: package-name-doesnt-match-sonames - -# Rust doesn't use dev shlib symlinks nor any of the other shlib support stuff -libstd-rust-1.37 binary: dev-pkg-without-shlib-symlink -libstd-rust-1.37 binary: shlib-without-versioned-soname -libstd-rust-1.37 binary: unused-shlib-entry-in-control-file - -# Libraries that use libc symbols (libterm, libstd, etc) *are* linked -# to libc. Lintian gets upset that some Rust libraries don't need -# libc, boo hoo. -libstd-rust-1.37 binary: library-not-linked-against-libc
  97. Download patch debian/copyright
  98. Download patch src/bootstrap/channel.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/channel.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/channel.rs 2019-09-23 21:15:52.000000000 +0000 @@ -13,7 +13,7 @@ use build_helper::output; use crate::Build; // The version number -pub const CFG_RELEASE_NUM: &str = "1.37.0"; +pub const CFG_RELEASE_NUM: &str = "1.38.0"; pub struct GitInfo { inner: Option<Info>,
  99. Download patch src/bootstrap/bin/main.rs

    --- 1.37.0+dfsg1-1/src/bootstrap/bin/main.rs 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/bootstrap/bin/main.rs 2019-09-23 21:15:52.000000000 +0000 @@ -5,7 +5,8 @@ //! parent directory, and otherwise documentation can be found throughout the `build` //! directory in each respective module. -#![deny(warnings)] +// NO-RUSTC-WRAPPER +#![deny(warnings, rust_2018_idioms, unused_lifetimes)] use std::env;
  100. Download patch src/ci/docker/dist-various-2/Dockerfile

    --- 1.37.0+dfsg1-1/src/ci/docker/dist-various-2/Dockerfile 2019-08-13 06:27:22.000000000 +0000 +++ 1.38.0+dfsg0.2+llvm-0ubuntu1/src/ci/docker/dist-various-2/Dockerfile 2019-09-23 21:15:52.000000000 +0000 @@ -8,7 +8,8 @@ RUN sed -i 's/^# deb-src/deb-src/' /etc/ RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \ build-essential \ - gcc-multilib \ +# gcc-multilib can not be installed together with gcc-arm-linux-gnueabi + gcc-7-multilib \ libedit-dev \ libgmp-dev \ libisl-dev \ @@ -21,11 +22,20 @@ RUN apt-get update && apt-get build-dep unzip \ # Needed for apt-key to work: dirmngr \ - gpg-agent + gpg-agent \ + g++-7-arm-linux-gnueabi RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486 RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2 main' +WORKDIR /build +COPY scripts/musl.sh /build +RUN env \ + CC=arm-linux-gnueabi-gcc-7 CFLAGS="-march=armv7-a" \ + CXX=arm-linux-gnueabi-g++-7 CXXFLAGS="-march=armv7-a" \ + bash musl.sh armv7 && \ + rm -rf /build/* + WORKDIR /tmp COPY dist-various-2/shared.sh /tmp/ COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/ @@ -58,7 +68,11 @@ ENV \ CXX_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-g++ \ AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \ CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \ - CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ + CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ \ + CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-7 \ + CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-7 \ + CC=gcc-7 \ + CXX=g++-7 ENV CARGO_TARGET_X86_64_FUCHSIA_AR /usr/local/bin/llvm-ar ENV CARGO_TARGET_X86_64_FUCHSIA_RUSTFLAGS \ @@ -81,9 +95,19 @@ ENV TARGETS=$TARGETS,x86_64-unknown-linu ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi ENV TARGETS=$TARGETS,x86_64-fortanix-unknown-sgx ENV TARGETS=$TARGETS,nvptx64-nvidia-cuda +ENV TARGETS=$TARGETS,armv7-unknown-linux-gnueabi +ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabi ENV X86_FORTANIX_SGX_LIBS="/x86_64-fortanix-unknown-sgx/lib/" +# As per https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1300211 +# we need asm in the search path for gcc-7 (for gnux32) but not in the search path of the +# cross compilers. +# Luckily one of the folders is /usr/local/include so symlink /usr/include/asm-generic there +RUN ln -s /usr/include/asm-generic /usr/local/include/asm + ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \ - --set target.wasm32-wasi.wasi-root=/wasm32-wasi + --set target.wasm32-wasi.wasi-root=/wasm32-wasi \ + --musl-root-armv7=/musl-armv7 + ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
  101. ...
  1. emscripten
  2. jhdf
  3. llvm-toolchain-9
  4. rustc