about summary refs log tree commit diff
path: root/src/bootstrap/configure.py
AgeCommit message (Collapse)AuthorLines
2020-02-17configure: set LLVM flags with a valueJosh Stone-3/+3
Rather than a boolean `--enable-cflags` etc., these options should reflect that they are for LLVM, and that they need a value. You would now use `./configure --llvm-cflags="..."`.
2020-02-12Rollup merge of #68947 - chrissimpkins:python-fmt, r=alexcrichtonYuki Okushi-5/+6
Python script PEP8 style guide space formatting and minor Python source cleanup This PR includes the following changes in the Python sources based on a flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.6 on Darwin lint: - PEP8 style guide spacing updates *without* line length changes - removal of unused local variable assignments in context managers and exception handling - removal of unused Python import statements - removal of unnecessary semicolons
2020-02-10Enable Control Flow Guard in rustbuildAndrew Paverd-0/+1
2020-02-07PEP8 format spacingChris Simpkins-5/+6
2019-12-13Fix the configure.py TOML field for a couple LLVM optionsJosh Stone-2/+2
The actual fields in `config.toml.example` have dashes, not underscores.
2019-10-26ci: add support for MIPS64 musl targetsWang Xuerui-0/+4
2019-10-21Remove `src/llvm-emscripten` submoduleAlex Crichton-4/+1
With #65251 landed there's no need to build two LLVM backends and ship them with rustc, every target we have now uses the same LLVM backend! This removes the `src/llvm-emscripten` submodule and additionally removes all support from rustbuild for building the emscripten LLVM backend. Multiple codegen backend support is left in place for now, and this is intended to be an easy 10-15 minute win on CI times by avoiding having to build LLVM twice.
2019-08-08remove test-miri flag from bootstrapRalf Jung-1/+0
2019-08-02Added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-musleabi.Adrian Budau-1/+3
Support for the targets in the compiler and std build in the CI.
2019-07-23Require a value for configure --debuginfo-levelJosh Stone-5/+5
In `configure.py`, using the `o` function creates an enable/disable boolean setting, and writes `true` or `false` in `config.toml`. However, rustbuild is expecting to parse a `u32` debuginfo level. We can change to the `v` function to have the options require a value.
2019-05-24rustbuild: Simplify debuginfo configurationVadim Petrochenkov-5/+5
2019-04-03Support using LLVM's libunwind as the unwinder implementationPetr Hosek-0/+2
This avoids the dependency on host libraries such as libgcc_s which may be undesirable in some deployment environments where these aren't available.
2019-01-28Fix CIJohn Kåre Alsaker-1/+1
2019-01-13Support passing cflags/cxxflags/ldflags to LLVM buildPetr Hosek-0/+4
This may be needed with some host compilers.
2019-01-05Provide the option to use libc++ even on all platformsPetr Hosek-0/+1
This is the default on platforms which use libc++ as the default C++ library but this option allows using libc++ on others as well.
2018-12-25Remove licensesMark Rousskov-9/+0
2018-12-13Add targets thumbv7neon-linux-androideabi and ↵Henri Sivonen-0/+2
thumbv7neon-unknown-linux-gnueabihf These two targets enable both thumb-mode and NEON for ARMv7 CPUs.
2018-11-06Rollup merge of #55703 - pnkfelix:update-configure-help-to-reflect-pr-54811, ↵kennytm-1/+1
r=Mark-Simulacrum Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize This should have been part of PR #54811 (my bad).
2018-11-06Auto merge of #55106 - petrhosek:fuchsia-lld, r=alexcrichtonbors-0/+1
Use lld directly for Fuchsia target Fuchsia already uses lld as the default linker, so there's no reason to always invoke it through Clang, instead we can simply invoke lld directly and pass the set of flags that matches Clang.
2018-11-05Use lld directly for Fuchsia targetPetr Hosek-0/+1
Fuchsia already uses lld as the default linker, so there's no reason to always invoke it through Clang, instead we can simply invoke lld directly and pass the set of flags that matches Clang.
2018-11-05This should have been part of PR #54811 (my bad).Felix S. Klock II-1/+1
2018-11-02Remove all jemalloc-related contentAlex Crichton-5/+0
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
2018-10-28Avoid directly catching BaseException in bootstrap configure scriptKonrad Borowski-1/+1
It includes stuff like pressing CTRL+C, which likely isn't intended.
2018-10-26Make configure.py handle numeric arguments for `--set` a little better.Michael Woerister-1/+12
2018-10-20Update Cargo, build curl/OpenSSL statically via featuresAlex Crichton-1/+1
In addition to to updating Cargo's submodule and Cargo's dependencies, this also updates Cargo's build to build OpenSSL statically into Cargo as well as libcurl unconditionally. This removes OpenSSL build logic from the bootstrap code, and otherwise requests that even on OSX we build curl statically.
2018-10-01Fix conditions to allow missing tools in CIChristian Poveda-1/+1
2018-09-28Add enable-missing-tools optionChristian Poveda-0/+1
2018-09-25Improvements to finding LLVM's FileCheckTom Tromey-0/+6
This patch adds a few improvements to how the build system finds LLVM's FileCheck program. * On Fedora, the system LLVM installs FileCheck in the "llvm" subdirectory of the LLVM libdir. This patch teaches the build system to look there. * This adds a configure option to specify which llvm-config executable to use. This is handy on systems that can parallel install multiple versions of LLVM; for example I can now: ./configure --llvm-config=/bin/llvm-config-5.0-64 ... to build against LLVM 5, rather than whatever the default llvm-config might be. * Finally, this adds a configure- and config.toml- option to set the path to FileCheck. This is handy when building against an LLVM where FileCheck was not installed. This happens on compatibility installs of LLVM on Fedora.
2018-08-14Add lldb to the buildTom Tromey-1/+2
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-07-10bootstrap: write texts to a .tmp file first for atomicityNODA, Kai-2/+2
If you are using a hard-linked file as your config.toml, this change will affect the way other instances of the file is modified. The original version would modify all other instances whereas the new version will leave others unchanged, reducing the ref count by one. Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-06-21Auto merge of #50336 - japaric:llvm-tools, r=Mark-Simulacrumbors-0/+1
ship LLVM tools with the toolchain this PR adds llvm-{nm,objcopy,objdump,size} to the rustc sysroot (right next to LLD) this slightly increases the size of the rustc component. I measured these numbers on x86_64 Linux: - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.gz 180M -> 193M (+7%) - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.xz 129M -> 137M (+6%) r? @alexcrichton cc #49584
2018-06-07quiet-tests -> !verbose-testsOliver Schneider-1/+1
2018-06-03ship LLVM tools with the toolchainJorge Aparicio-0/+1
2018-05-04Add eabi suffix to armv5te musl targetHarm Berntsen-1/+1
2018-05-03Add armv5te-unknown-linux-musl targetHarm Berntsen-0/+2
2018-04-13rustbuild: allow building tools with debuginfoJosh Stone-0/+1
Debugging information for the extended tools is currently disabled for concerns about the size. This patch adds `--enable-debuginfo-tools` to let one opt into having that debuginfo. This is useful for debugging the tools in distro packages. We always strip debuginfo into separate packages anyway, so the extra size is not a concern in regular use.
2018-04-08configure.py --tools should set a list instead of a stringDan Callaghan-1/+3
Currently the --tools option does not work because it is setting a string value for 'build.tools'. It should be a list of strings instead.
2018-03-18Add a CI job for parallel rustc using x.py checkJohn Kåre Alsaker-0/+1
2018-03-09rustbuild: Remove ThinLTO-related configurationAlex Crichton-1/+0
This commit removes some ThinLTO/codegen unit cruft primarily only needed during the initial phase where we were adding ThinLTO support to rustc itself. The current bootstrap compiler knows about ThinLTO and has it enabled by default for multi-CGU builds which are also enabled by default. One CGU builds (aka disabling ThinLTO) can be achieved by configuring the number of codegen units to 1 for a particular builds. This also changes the defaults for our dist builders to go back to multiple CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right now so we need to recover any time we can.
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-0/+5
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
2018-02-05Add build.tools option to manage installation of extended rust tools.O01eg-0/+1
2018-02-03Disable ThinLTO for dist builds.Mark Simulacrum-0/+1
Dist builds should always be as fast as we can make them, and since those run on CI we don't care quite as much for the build being somewhat slower. As such, we don't automatically enable ThinLTO on builds for the dist builders.
2018-01-28rustc: Split Emscripten to a separate codegen backendAlex Crichton-0/+3
This commit introduces a separately compiled backend for Emscripten, avoiding compiling the `JSBackend` target in the main LLVM codegen backend. This builds on the foundation provided by #47671 to create a new codegen backend dedicated solely to Emscripten, removing the `JSBackend` of the main codegen backend in the process. A new field was added to each target for this commit which specifies the backend to use for translation, the default being `llvm` which is the main backend that we use. The Emscripten targets specify an `emscripten` backend instead of the main `llvm` one. There's a whole bunch of consequences of this change, but I'll try to enumerate them here: * A *second* LLVM submodule was added in this commit. The main LLVM submodule will soon start to drift from the Emscripten submodule, but currently they're both at the same revision. * Logic was added to rustbuild to *not* build the Emscripten backend by default. This is gated behind a `--enable-emscripten` flag to the configure script. By default users should neither check out the emscripten submodule nor compile it. * The `init_repo.sh` script was updated to fetch the Emscripten submodule from GitHub the same way we do the main LLVM submodule (a tarball fetch). * The Emscripten backend, turned off by default, is still turned on for a number of targets on CI. We'll only be shipping an Emscripten backend with Tier 1 platforms, though. All cross-compiled platforms will not be receiving an Emscripten backend yet. This commit means that when you download the `rustc` package in Rustup for Tier 1 platforms you'll be receiving two trans backends, one for Emscripten and one that's the general LLVM backend. If you never compile for Emscripten you'll never use the Emscripten backend, so we may update this one day to only download the Emscripten backend when you add the Emscripten target. For now though it's just an extra 10MB gzip'd. Closes #46819
2018-01-22Do not assume dynamic linking for musl/mips[el] targetsMarco A L Barbosa-0/+4
All musl targets except mips[el] assume static linking by default. This can be confusing https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084 When the musl/mips[el] targets was [added](https://github.com/rust-lang/rust/pull/31298), dynamic linking was chosen because of binary size concerns, and probably also because libunwind [didn't](https://users.rust-lang.org/t/static-cross-compiled-binaries-arent-really-static/6084/8) supported mips. Now that we have `crt-static` target-feature (the user can choose dynamic link for musl targets), and libunwind [6.0](https://github.com/llvm-mirror/libunwind/commits/release_60) add support to mips, we do not need to assume dynamic linking.
2018-01-11Add i586-unknown-linux-musl targetMarco A L Barbosa-0/+2
2017-12-03Record build and test result of extended tools into toolstates.json.kennytm-0/+1
2017-10-26configure.py: fix --disable-option-checkingJosh Stone-4/+9
Getting the value of this argument needs another level of indexing, as `known_args` are stored in `{dict}[list](opt, value)` form. Also, when option-checking is disabled, let this bypass the check that options are only passed once, and just apply the last value.
2017-10-16Merge branch 'master' into future_importsjohnthagen-28/+36
2017-10-14Auto merge of #45102 - petrochenkov:noar, r=alexcrichtonbors-2/+1
cleanup: rustc doesn't use an external archiver cc https://github.com/rust-lang/rust/pull/45090 r? @alexcrichton
2017-10-13Rollup merge of #45121 - johnthagen:pep8-bootstrap, r=alexcrichtonkennytm-17/+31
Fix PEP8 style issues in bootstrap code This fixes PEP8 style issues (other than line-length) in the bootstrap Python code. The most important fix is in the `set` function where the code was indented with 6 spaces instead of 4.