Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #45204

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bb74c20
Inline eq_slice into str::eq
leoyvens Oct 3, 2017
47fc913
Update the `jobserver` crate
alexcrichton Oct 5, 2017
270c517
Re-do the FreeBSD cross-builds to use Clang and libc++. Fixes #44433.
jld Sep 16, 2017
e6728ec
fix documentation typo
camsteffen Oct 8, 2017
a263a78
Fix PEP8 style issues in bootstrap code
johnthagen Oct 9, 2017
7735f59
unstable book: OIBIT
tinaun Oct 10, 2017
364148d
unstable book: unboxed_closures
tinaun Oct 10, 2017
d078252
unstable book: fn_traits
tinaun Oct 10, 2017
ca61ea2
Shorten some test names
petrochenkov Oct 10, 2017
db91b00
output compiler message updated
jean-lourenco Oct 8, 2017
d5ef9f9
formatting fixes
tinaun Oct 10, 2017
787f9f4
Prevent fmt::Arguments from being shared across threads
oli-obk Oct 11, 2017
23a5fb8
Merge branch 'master' into pep8-bootstrap
johnthagen Oct 11, 2017
3cb5294
Fix typo during merge from master
johnthagen Oct 11, 2017
dc7de37
Explain the `_oibit_remover` field
oli-obk Oct 11, 2017
4f6d24e
Rollup merge of #45005 - leodasvacas:inline-eq-slice-into-eq, r=jseyf…
kennytm Oct 11, 2017
3b4afa2
Rollup merge of #45049 - alexcrichton:update-jobserver, r=sfackler
kennytm Oct 11, 2017
4627306
Rollup merge of #45077 - jld:freebsd-build-update, r=alexcrichton
kennytm Oct 11, 2017
a460ceb
Rollup merge of #45105 - camsteffen:patch-2, r=pnkfelix
kennytm Oct 11, 2017
fcded52
Rollup merge of #45121 - johnthagen:pep8-bootstrap, r=alexcrichton
kennytm Oct 11, 2017
b3b3b6a
Rollup merge of #45122 - jean-lourenco:master, r=nikomatsakis
kennytm Oct 11, 2017
1faf129
Rollup merge of #45166 - tinaun:more_unstable_docs, r=steveklabnik
kennytm Oct 11, 2017
ec3caf9
Rollup merge of #45190 - petrochenkov:shorten, r=alexcrichton
kennytm Oct 11, 2017
b03a244
Rollup merge of #45198 - oli-obk:fmt_args, r=arielb1
kennytm Oct 11, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ def default_build_triple():

return "{}-{}".format(cputype, ostype)


class RustBuild(object):
"""Provide all the methods required to build Rust"""
def __init__(self):
Expand Down
48 changes: 31 additions & 17 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,26 @@
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
import bootstrap


class Option:
def __init__(self, name, rustbuild, desc, value):
self.name = name
self.rustbuild = rustbuild
self.desc = desc
self.value = value


options = []


def o(*args):
options.append(Option(*args, value=False))


def v(*args):
options.append(Option(*args, value=True))


o("debug", "rust.debug", "debug mode; disables optimization unless `--enable-optimize` given")
o("docs", "build.docs", "build standard library documentation")
o("compiler-docs", "build.compiler-docs", "build compiler documentation")
Expand Down Expand Up @@ -136,13 +141,16 @@ def v(*args):

v("set", None, "set arbitrary key/value pairs in TOML configuration")


def p(msg):
print("configure: " + msg)


def err(msg):
print("configure: error: " + msg)
sys.exit(1)


if '--help' in sys.argv or '-h' in sys.argv:
print('Usage: ./configure [options]')
print('')
Expand Down Expand Up @@ -208,7 +216,7 @@ def err(msg):
continue

found = True
if not option.name in known_args:
if option.name not in known_args:
known_args[option.name] = []
known_args[option.name].append((option, value))
break
Expand All @@ -227,27 +235,30 @@ def err(msg):
# TOML we're going to write out
config = {}


def build():
if 'build' in known_args:
return known_args['build'][0][1]
return bootstrap.default_build_triple()


def set(key, value):
s = "{:20} := {}".format(key, value)
if len(s) < 70:
p(s)
else:
p(s[:70] + " ...")

arr = config
parts = key.split('.')
for i, part in enumerate(parts):
if i == len(parts) - 1:
arr[part] = value
else:
if not part in arr:
arr[part] = {}
arr = arr[part]
s = "{:20} := {}".format(key, value)
if len(s) < 70:
p(s)
else:
p(s[:70] + " ...")

arr = config
parts = key.split('.')
for i, part in enumerate(parts):
if i == len(parts) - 1:
arr[part] = value
else:
if part not in arr:
arr[part] = {}
arr = arr[part]


for key in known_args:
# The `set` option is special and can be passed a bunch of times
Expand Down Expand Up @@ -345,6 +356,7 @@ def set(key, value):
targets[target] = sections['target'][:]
targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", target)


# Here we walk through the constructed configuration we have from the parsed
# command line arguments. We then apply each piece of configuration by
# basically just doing a `sed` to change the various configuration line to what
Expand All @@ -362,6 +374,7 @@ def to_toml(value):
else:
raise RuntimeError('no toml')


def configure_section(lines, config):
for key in config:
value = config[key]
Expand All @@ -375,9 +388,10 @@ def configure_section(lines, config):
if not found:
raise RuntimeError("failed to find config line for {}".format(key))


for section_key in config:
section_config = config[section_key]
if not section_key in sections:
if section_key not in sections:
raise RuntimeError("config key {} not in sections".format(section_key))

if section_key == 'target':
Expand Down
10 changes: 5 additions & 5 deletions src/ci/docker/dist-i686-freebsd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
clang \
make \
file \
curl \
Expand All @@ -16,16 +16,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config

COPY dist-i686-freebsd/build-toolchain.sh /tmp/
RUN /tmp/build-toolchain.sh i686
COPY scripts/freebsd-toolchain.sh /tmp/
RUN /tmp/freebsd-toolchain.sh i686

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV \
AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \
CC_i686_unknown_freebsd=i686-unknown-freebsd10-gcc \
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-g++
CC_i686_unknown_freebsd=i686-unknown-freebsd10-clang \
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-clang++

ENV HOSTS=i686-unknown-freebsd

Expand Down
112 changes: 0 additions & 112 deletions src/ci/docker/dist-i686-freebsd/build-toolchain.sh

This file was deleted.

10 changes: 5 additions & 5 deletions src/ci/docker/dist-x86_64-freebsd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
clang \
make \
file \
curl \
Expand All @@ -16,16 +16,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config

COPY dist-x86_64-freebsd/build-toolchain.sh /tmp/
RUN /tmp/build-toolchain.sh x86_64
COPY scripts/freebsd-toolchain.sh /tmp/
RUN /tmp/freebsd-toolchain.sh x86_64

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV \
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc \
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-clang \
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-clang++

ENV HOSTS=x86_64-unknown-freebsd

Expand Down
Loading