about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/etc/Dockerfile27
-rw-r--r--src/etc/apple-darwin.supp75
-rw-r--r--src/etc/check-sanitycheck.py58
-rwxr-xr-xsrc/etc/check-summary.py57
-rw-r--r--src/etc/get-stage0.py46
-rwxr-xr-xsrc/etc/local_stage0.sh79
-rw-r--r--src/etc/mklldeps.py113
-rw-r--r--src/etc/x86.supp65
8 files changed, 0 insertions, 520 deletions
diff --git a/src/etc/Dockerfile b/src/etc/Dockerfile
deleted file mode 100644
index 83d54789ff3..00000000000
--- a/src/etc/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-FROM ubuntu:xenial
-
-# curl
-#   Download stage0, see src/bootstrap/bootstrap.py
-# g++
-#   Compile LLVM binding in src/rustllvm
-# gdb
-#   Used to run tests in src/test/debuginfo
-# git
-#   Get commit hash and commit date in version string
-# make
-#   Run build scripts in mk
-# libedit-dev zlib1g-dev
-#   LLVM dependencies as packaged in Ubuntu
-#   (They are optional, but Ubuntu package enables them)
-# llvm-3.7-dev (installed by llvm-3.7-tools)
-#   LLVM
-# llvm-3.7-tools
-#   FileCheck is used to run tests in src/test/codegen
-
-RUN apt-get update && apt-get -y install \
-    curl g++ gdb git make \
-    libedit-dev zlib1g-dev \
-    llvm-3.7-tools cmake
-
-RUN mkdir /build
-WORKDIR /build
diff --git a/src/etc/apple-darwin.supp b/src/etc/apple-darwin.supp
deleted file mode 100644
index 50e30caa2b3..00000000000
--- a/src/etc/apple-darwin.supp
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-   osx-frameworks.rs-fails-otherwise-1
-   Memcheck:Leak
-   match-leak-kinds: definite,possible
-   fun:malloc
-   ...
-   fun:__CFInitialize
-   ...
-}
-
-{
-   osx-frameworks.rs-fails-otherwise-2
-   Memcheck:Leak
-   match-leak-kinds: possible
-   fun:malloc_zone_calloc
-   ...
-   fun:__CFInitialize
-   fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
-}
-
-{
-   osx-frameworks.rs-fails-otherwise-3
-   Memcheck:Leak
-   match-leak-kinds: possible
-   fun:realloc
-   ...
-   fun:_read_images
-   fun:map_images_nolock
-   ...
-   fun:_ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoE
-   fun:_ZN4dyld36registerImageStateBatchChangeHandlerE17dyld_image_statesPFPKcS0_jPK15dyld_image_infoE
-   fun:dyld_register_image_state_change_handler
-   fun:_objc_init
-   fun:_os_object_init
-}
-
-{
-   osx-frameworks.rs-fails-otherwise-4
-   Memcheck:Leak
-   match-leak-kinds: definite,possible
-   fun:calloc
-   ...
-   fun:__CFInitialize
-   fun:_ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE
-   fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
-   fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
-}
-
-{
-   osx-frameworks.rs-fails-otherwise-5
-   Memcheck:Leak
-   match-leak-kinds: definite,possible
-   fun:malloc_zone_malloc
-   ...
-   fun:__CFInitialize
-   ...
-}
-
-{
-   fails-since-xcode-7.2
-   Memcheck:Leak
-   match-leak-kinds: possible
-   fun:malloc_zone_malloc
-   fun:_objc_copyClassNamesForImage
-   fun:_ZL9protocolsv
-   fun:_Z9readClassP10objc_classbb
-   fun:gc_init
-   fun:_ZL33objc_initializeClassPair_internalP10objc_classPKcS0_S0_
-   fun:layout_string_create
-   fun:_ZL12realizeClassP10objc_class
-   fun:_ZL22copySwiftV1MangledNamePKcb
-   fun:_ZL22copySwiftV1MangledNamePKcb
-   fun:_ZL22copySwiftV1MangledNamePKcb
-   fun:_ZL22copySwiftV1MangledNamePKcb
-}
diff --git a/src/etc/check-sanitycheck.py b/src/etc/check-sanitycheck.py
deleted file mode 100644
index 0e103fbcffb..00000000000
--- a/src/etc/check-sanitycheck.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-import os
-import subprocess
-import sys
-import functools
-
-STATUS = 0
-
-def error_unless_permitted(env_var, message):
-    global STATUS
-    if not os.getenv(env_var):
-        sys.stderr.write(message)
-        STATUS = 1
-
-def only_on(platforms):
-    def decorator(func):
-        @functools.wraps(func)
-        def inner():
-            if any(map(lambda x: sys.platform.startswith(x), platforms)):
-                func()
-        return inner
-    return decorator
-
-@only_on(['linux', 'darwin', 'freebsd', 'openbsd'])
-def check_rlimit_core():
-    import resource
-    soft, hard = resource.getrlimit(resource.RLIMIT_CORE)
-    if soft > 0:
-        error_unless_permitted('ALLOW_NONZERO_RLIMIT_CORE', """\
-RLIMIT_CORE is set to a nonzero value (%d). During debuginfo, the test suite
-will segfault many rustc's, creating many potentially large core files.
-set ALLOW_NONZERO_RLIMIT_CORE to ignore this warning
-""" % (soft))
-
-@only_on(['win32'])
-def check_console_code_page():
-    if '65001' not in subprocess.check_output(['cmd', '/c', 'chcp']):
-        sys.stderr.write('Warning: the console output code page is not UTF-8, \
-some tests may fail. Use `cmd /c "chcp 65001"` to setup UTF-8 code page.\n')
-
-def main():
-    check_console_code_page()
-    check_rlimit_core()
-
-if __name__ == '__main__':
-    main()
-    sys.exit(STATUS)
diff --git a/src/etc/check-summary.py b/src/etc/check-summary.py
deleted file mode 100755
index 9312b685c14..00000000000
--- a/src/etc/check-summary.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-import glob
-import sys
-
-if __name__ == '__main__':
-    summaries = []
-
-    def summarise(fname):
-        summary = {}
-        with open(fname) as fd:
-            for line in fd:
-                splitline = line.strip().split(' ')
-                if len(splitline) == 1:
-                    continue
-                status = splitline[0]
-                test = splitline[-1]
-                # track bench runs
-                if splitline[1] == 'ns/iter':
-                    status = 'bench'
-                if status not in summary:
-                    summary[status] = []
-                summary[status].append(test)
-            summaries.append((fname, summary))
-
-    def count(t):
-        return sum(map(lambda f: len(f[1].get(t, [])), summaries))
-
-    logfiles = sys.argv[1:]
-    for files in map(glob.glob, logfiles):
-        map(summarise, files)
-    ok = count('ok')
-    failed = count('failed')
-    ignored = count('ignored')
-    measured = count('bench')
-    print("summary of %d test runs: %d passed; %d failed; %d ignored; %d measured" %
-          (len(logfiles), ok, failed, ignored, measured))
-    print("")
-
-    if failed > 0:
-        print("failed tests:")
-        for f, s in summaries:
-            failures = s.get('failed', [])
-            if len(failures) > 0:
-                print("  %s:" % (f))
-            for test in failures:
-                print("    %s" % (test))
diff --git a/src/etc/get-stage0.py b/src/etc/get-stage0.py
deleted file mode 100644
index 127251cc802..00000000000
--- a/src/etc/get-stage0.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-import os
-import sys
-
-path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../bootstrap"))
-sys.path.append(path)
-
-import bootstrap
-
-def main(triple):
-    src_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
-    data = bootstrap.stage0_data(src_root)
-
-    channel, date = data['rustc'].split('-', 1)
-
-    dl_dir = 'dl'
-    if not os.path.exists(dl_dir):
-        os.makedirs(dl_dir)
-
-    filename = 'rustc-{}-{}.tar.gz'.format(channel, triple)
-    url = 'https://static.rust-lang.org/dist/{}/{}'.format(date, filename)
-    dst = dl_dir + '/' + filename
-    bootstrap.get(url, dst)
-
-    stage0_dst = triple + '/stage0'
-    if os.path.exists(stage0_dst):
-        for root, _, files in os.walk(stage0_dst):
-            for f in files:
-                os.unlink(os.path.join(root, f))
-    else:
-        os.makedirs(stage0_dst)
-    bootstrap.unpack(dst, stage0_dst, match='rustc', verbose=True)
-
-if __name__ == '__main__':
-    main(sys.argv[1])
diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh
deleted file mode 100755
index ee77206640e..00000000000
--- a/src/etc/local_stage0.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-# Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-TARG_DIR=$1
-PREFIX=$2
-RUSTLIBDIR=$3
-
-LIB_DIR=lib
-LIB_PREFIX=lib
-
-OS=`uname -s`
-case $OS in
-    ("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS"|"Haiku")
-    BIN_SUF=
-    LIB_SUF=.so
-    ;;
-    ("Darwin")
-    BIN_SUF=
-    LIB_SUF=.dylib
-    ;;
-    (*)
-    BIN_SUF=.exe
-    LIB_SUF=.dll
-    LIB_DIR=bin
-    LIB_PREFIX=
-    ;;
-esac
-
-if [ -z $PREFIX ]; then
-    echo "No local rust specified."
-    exit 1
-fi
-
-if [ ! -e ${PREFIX}/bin/rustc${BIN_SUF} ]; then
-    echo "No local rust installed at ${PREFIX}"
-    exit 1
-fi
-
-if [ -z $TARG_DIR ]; then
-    echo "No target directory specified."
-    exit 1
-fi
-
-case "$TARG_DIR" in
---print-rustc-release)
-  # not actually copying to TARG_DIR, just print the local rustc version and exit
-  ${PREFIX}/bin/rustc${BIN_SUF} --version --verbose | sed -ne 's/^release: //p'
-;;
-*)
-
-cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
-cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}arena*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}flate*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}fmt_macros*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}getopts*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}graphviz*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}log*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rbml*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}serialize*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}term*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}proc_macro*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-
-# do not fail if one of the above fails, as all we need is a working rustc!
-exit 0
-
-esac
diff --git a/src/etc/mklldeps.py b/src/etc/mklldeps.py
deleted file mode 100644
index 24b007576aa..00000000000
--- a/src/etc/mklldeps.py
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-import os
-import sys
-import subprocess
-
-f = open(sys.argv[1], 'wb')
-
-components = sys.argv[2].split() # splits on whitespace
-enable_static = sys.argv[3]
-llvm_config = sys.argv[4]
-stdcpp_name = sys.argv[5]
-use_libcpp = sys.argv[6]
-
-f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// WARNING: THIS IS A GENERATED FILE, DO NOT MODIFY
-//          take a look at src/etc/mklldeps.py if you're interested
-""")
-
-
-def run(args):
-    proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    out, err = proc.communicate()
-
-    if err:
-        print("failed to run llvm_config: args = `{}`".format(args))
-        print(err)
-        sys.exit(1)
-    return out
-
-def runErr(args):
-    proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    out, err = proc.communicate()
-
-    if err:
-        return False, out
-    else:
-        return True, out
-
-f.write("\n")
-
-args = [llvm_config, '--shared-mode']
-args.extend(components)
-llvm_shared, out = runErr(args)
-if llvm_shared:
-    llvm_shared = 'shared' in out
-
-# LLVM libs
-args = [llvm_config, '--libs', '--system-libs']
-args.extend(components)
-out = run(args)
-for lib in out.strip().replace("\n", ' ').split(' '):
-    if len(lib) == 0:
-        continue
-    # in some cases we get extra spaces in between libs so ignore those
-    if len(lib) == 1 and lib == ' ':
-        continue
-    # not all libs strictly follow -lfoo, on Bitrig, there is -pthread
-    if lib[0:2] == '-l':
-        lib = lib.strip()[2:]
-    elif lib[0] == '-':
-        lib = lib.strip()[1:]
-    # If this actually points at a literal file then we're on MSVC which now
-    # prints full paths, so get just the name of the library and strip off the
-    # trailing ".lib"
-    elif os.path.exists(lib):
-        lib = os.path.basename(lib)[:-4]
-    elif lib[-4:] == '.lib':
-        lib = lib[:-4]
-    f.write("#[link(name = \"" + lib + "\"")
-    if not llvm_shared and 'LLVM' in lib:
-        f.write(", kind = \"static\"")
-    f.write(")]\n")
-
-# LLVM ldflags
-out = run([llvm_config, '--ldflags'])
-for lib in out.strip().split(' '):
-    if lib[:2] == "-l":
-        f.write("#[link(name = \"" + lib[2:] + "\")]\n")
-
-# C++ runtime library
-out = run([llvm_config, '--cxxflags'])
-if enable_static == '1':
-    assert('stdlib=libc++' not in out)
-    f.write("#[link(name = \"" + stdcpp_name + "\", kind = \"static\")]\n")
-else:
-    # Note that we use `cfg_attr` here because on MSVC the C++ standard library
-    # is not c++ or stdc++, but rather the linker takes care of linking the
-    # right standard library.
-    if use_libcpp != "0" or 'stdlib=libc++' in out:
-        f.write("#[cfg_attr(not(target_env = \"msvc\"), link(name = \"c++\"))]\n")
-    else:
-        f.write("#[cfg_attr(not(target_env = \"msvc\"), link(name = \"" + stdcpp_name + "\"))]\n")
-
-# Attach everything to an extern block
-f.write("extern {}\n")
diff --git a/src/etc/x86.supp b/src/etc/x86.supp
deleted file mode 100644
index 6e409af79ae..00000000000
--- a/src/etc/x86.supp
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-   goddammit-llvm-why-u-no-valgrind
-   Memcheck:Cond
-   fun:*
-   ...
-}
-
-{
-   down-with-thread-dtors.rs-fails-otherwise-1
-   Memcheck:Addr1
-   ...
-   fun:tlv_finalize
-   fun:_pthread_tsd_cleanup
-   fun:_pthread_exit
-   ...
-   fun:_pthread_start
-   fun:thread_start
-}
-
-{
-   down-with-thread-dtors.rs-fails-otherwise-2
-   Memcheck:Addr2
-   ...
-   fun:tlv_finalize
-   fun:_pthread_tsd_cleanup
-   fun:_pthread_exit
-   ...
-   fun:_pthread_start
-   fun:thread_start
-}
-
-{
-   down-with-thread-dtors.rs-fails-otherwise-3
-   Memcheck:Addr4
-   ...
-   fun:tlv_finalize
-   fun:_pthread_tsd_cleanup
-   fun:_pthread_exit
-   ...
-   fun:_pthread_start
-   fun:thread_start
-}
-
-{
-   down-with-thread-dtors.rs-fails-otherwise-4
-   Memcheck:Addr8
-   ...
-   fun:tlv_finalize
-   fun:_pthread_tsd_cleanup
-   fun:_pthread_exit
-   ...
-   fun:_pthread_start
-   fun:thread_start
-}
-
-{
-   down-with-thread-dtors.rs-fails-otherwise-5
-   Memcheck:Leak
-   match-leak-kinds: definite
-   fun:malloc
-   fun:tlv_allocate_and_initialize_for_key
-   fun:tlv_get_addr
-   ...
-   fun:start
-}