about summary refs log tree commit diff
path: root/src/bootstrap/native.rs
AgeCommit message (Collapse)AuthorLines
2020-05-02Extract stamp testing for LLVMMark Rousskov-45/+71
The extracted function can be used by the rest of bootstrap to detect if we've already built an up-to-date LLVM (and so it's safe for us to either request it or pretend it exists).
2020-04-24Fix cross-compiling LLD to different platformsAlex Crichton-1/+20
Looks like the native build system isn't great a coping with this, so try to work around that with a few workarounds.
2020-04-14Update the minimum external LLVM to 8Josh Stone-2/+2
LLVM 8 was released on March 20, 2019, over a year ago.
2020-04-07Make LLVM version suffix independent of rustc version on dev channelTomasz Miąsko-3/+7
Remove rustc version from LLVM version suffix on dev channel, avoiding the need for full rebuilds when moving between commits with different LLVM submodule & rustc version.
2020-03-05bootstrap: Use hash to determine if sanitizers needs to be rebuiltTomasz Miąsko-31/+67
* Rebuild sanitizers runtimes when LLVM submodule commit changes. * When rebuilding LLVM / sanitizers, remove the stamp file before starting the build process to invalidate previous build output.
2020-02-23bootstrap: Remove commit hash from LLVM version suffix to avoid rebuildsTomasz Miąsko-6/+2
The custom LLVM version suffix was introduced to avoid unintentional library names conflicts. By default it included the LLVM submodule commit hash. Changing the version suffix requires the complete LLVM rebuild, and since then every change to the submodules required it as well. Remove the commit hash from version suffix to avoid complete rebuilds, while leaving the `rust` string, the release number and release channel to disambiguate the library name.
2020-02-13Rollup merge of #69104 - tmiasko:configure-cmake, r=Mark-SimulacrumDylan DPC-9/+19
bootstrap: Configure cmake when building sanitizer runtimes Configure cmake before building sanitizer runtimes in similar way it is already configured elsewhere, to ensure that they are built with expected compiler flags. Previously this step has been intentionally omitted since sanitizer runtimes are built as universal binaries on Darwin targets, which in turn are unsupported by sccache which is also configured there. To avoid the issue everything but the compiler launcher is configured. Helps with #68863.
2020-02-12bootstrap: Configure cmake when building sanitizer runtimesTomasz Miąsko-9/+19
2020-02-11rustbuild: include channel in sanitizers installed nameMarc-Antoine Perennou-6/+10
Allows parallel install of different rust channels Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-3/+1
2020-01-22Enable ASan on FuchsiaAaron Green-0/+18
This change adds the x86_64-fuchsia and aarch64-fuchsia LLVM targets to those allowed to invoke -Zsanitizer. Currently, the only overlap between compiler_rt sanitizers supported by both rustc and Fuchsia is ASan.
2020-01-14Better support for cross compilation on Windows.Daniel Frampton-0/+2
2020-01-09Add bootstrap step for building sanitizer runtimesTomasz Miąsko-0/+115
2019-12-26Skip LLVM rebuild when skip-rebuild is trueMatthew Healy-0/+9
2019-12-22Format the worldMark Rousskov-129/+106
2019-12-02Update the minimum external LLVM to 7Josh Stone-2/+2
LLVM 7 is over a year old, which should be plenty for compatibility. The last LLVM 6 holdout was llvm-emscripten, which went away in #65501. I've also included a fix for LLVM 8 lacking `MemorySanitizerOptions`, which was broken by #66522.
2019-10-30Statically link libstdc++ on windows-gnuMateusz Mikuła-2/+2
2019-10-25Re-enable Emscripten's exception handling supportThomas Lively-0/+4
Passes LLVM codegen and Emscripten link-time flags for exception handling if and only if the panic strategy is `unwind`. Sets the default panic strategy for Emscripten targets to `unwind`. Re-enables tests that depend on unwinding support for Emscripten, including `should_panic` tests.
2019-10-21Remove `src/llvm-emscripten` submoduleAlex Crichton-50/+25
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-10-08Disable Go and OCaml bindings when building LLVMTomasz Miąsko-9/+1
Instead of instaling OCaml bindings in a location where installation will not fail, don't build them in the first place.
2019-09-04Assume non-git LLVM is fresh if the stamp file existsJosh Stone-13/+14
Rustbuild usually writes the LLVM submodule commit in a stamp file, so we can avoid rebuilding it unnecessarily. However, for builds from a source tarball (non-git), we were assuming a rebuild is always needed. This can cause a lot of extra work if any environment like `CFLAGS` changed between steps like build and install, which are often separate in distro builds. Now we also write an empty stamp file if the git commit is unknown, and its presence is trusted to indicate that no rebuild is needed. An info message reports that this is happening, along with the stamp file path that can be deleted to force a rebuild anyway.
2019-08-02rustbuild: correct line lengthSam Elliott-1/+2
2019-08-02rustbuild: WebAssembly is no longer an experimental LLVM backendSam Elliott-2/+2
2019-08-02rustbuild: RISC-V is no longer an experimental LLVM targetSam Elliott-2/+5
This commit moves RISC-V from the experimental LLVM targets to the regular LLVM targets. RISC-V was made non-experimental in https://reviews.llvm.org/rL366399 I have also sorted the list of LLVM targets, and changed the code around setting llvm_exp_targets (and its default) to match the code setting llvm_targets (and its default), ensuring future changes to the defaults, as LLVM targets become stable, affect as few places as possible.
2019-07-27Remove run-pass test suitesVadim Petrochenkov-1/+1
2019-07-17Disable Z3 in LLVM buildNikita Popov-0/+1
2019-07-15ci: Remove Travis/AppVeyor configurationAlex Crichton-3/+0
Now that we've fully moved to Azure Pipelines and bors has been updated to only gate on Azure this commit removes the remaining Travis/AppVeyor support contained in this repository. Most of the deletions here are related to producing better output on Travis by folding certain sections. This isn't supported by Azure so there's no need to keep it around, and if Azure ever adds support we can always add it back!
2019-06-09Pass cflags rather than cxxflags to LLVM as CMAKE_C_FLAGSPetr Hosek-1/+1
We mistakenly pass cxxflags from the configuration to LLVM build as CMAKE_C_FLAGS.
2019-05-27Only build clang_rt when RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.Michael Woerister-1/+15
2019-05-27rustbuild: Also build compiler-rt when building LLDB. This allows ↵Michael Woerister-1/+1
clang-based run-make tests to use PGO.
2019-05-15rustbuild/LLVM: Do not print installation messages for up-to-date filesVadim Petrochenkov-0/+4
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-1/+1
2019-04-30Rename to RUSTC_LOGYuki OKUSHI-1/+1
2019-04-15LLD is not supported on DarwinPetr Hosek-2/+4
Don't enable LLD when LTO is enabled on Darwin.
2019-03-30Use a single llvm_info variableJosh Stone-13/+8
2019-03-30Use the existing LLVM GitInfo for checking rebuildsJosh Stone-18/+11
2019-03-27replace llvm-rebuild-trigger with commit hashAndy Russell-15/+33
2019-03-14bootstrap: Default to a sensible llvm-suffix.Emilio Cobos Álvarez-1/+21
I used version-channel-sha, hopefully that should work. I checked that bootstrap builds, but I cannot check anything else since the llvm build process is started from cargo, and thus calls clang, and thus I hit the same bug I hope to fix with this change. Hopefully fixes #59034.
2019-02-27Whitelist containers that allow older toolchainsAlex Crichton-0/+4
We'll use this as a temporary measure to get an LLVM update landed, but we'll have to go through and update images later to make sure they've got the right toolchains.
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-11/+11
2019-01-31Auto merge of #57514 - michaelwoerister:xlto-tests, r=alexcrichtonbors-0/+4
compiletest: Support opt-in Clang-based run-make tests and use them for testing xLTO. Some cross-language run-make tests need a Clang compiler that matches the LLVM version of `rustc`. Since such a compiler usually isn't available these tests (marked with the `needs-matching-clang` directive) are ignored by default. For some CI jobs we do need these tests to run unconditionally though. In order to support this a `--force-clang-based-tests` flag is added to compiletest. If this flag is specified, `compiletest` will fail if it can't detect an appropriate version of Clang. @rust-lang/infra The PR doesn't yet enable the tests yet. Do you have any recommendation for which jobs to enable them? cc #57438 r? @alexcrichton
2019-01-30bootstrap: Expose LLVM_USE_LINKER cmake option to config.toml.Michael Woerister-0/+4
2019-01-25Set LLDB_NO_DEBUGSERVER=ONJosh Stone-0/+1
2019-01-25Rebase to the llvm-project monorepoJosh Stone-6/+8
The new git submodule src/llvm-project is a monorepo replacing src/llvm and src/tools/{clang,lld,lldb}. This also serves as a rebase for these projects to the new 8.x branch from trunk. The src/llvm-emscripten fork is unchanged for now.
2019-01-13Support passing cflags/cxxflags/ldflags to LLVM buildPetr Hosek-1/+14
This may be needed with some host compilers.
2019-01-12Rollup merge of #57368 - petrhosek:cmake-compiler-launcher, r=alexcrichtonMazdak Farrokhzad-8/+6
Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccache CMake 3.4 and newer which is the required minimum version for LLVM supports CMAKE_{C,CXX}_COMPILER_LAUNCHER for settting the compiler launcher such as ccache which doesn't require shifting arguments.
2019-01-07Build LLVM with -static-libstdc++ on dist buildsAlex Crichton-8/+8
This commit is intended on fixing a regression from #57286 where the distributed LLVM shared library unfortunately depends on a dynamic copy of libstdc++, meaning we're no longer as binary compatible as we thought! This tweaks the build of LLVM as out distribution is slightly different now, and is hoped to fix the issue. Closes #57426
2019-01-05Use CMAKE_{C,CXX}_COMPILER_LAUNCHER for ccachePetr Hosek-8/+6
CMake 3.4 and newer which is the required minimum version for LLVM supports CMAKE_{C,CXX}_COMPILER_LAUNCHER for settting the compiler launcher such as ccache which doesn't require shifting arguments.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-17Auto merge of #56642 - nikic:llvm-6, r=alexcrichtonbors-2/+2
Bump minimum required LLVM version to 6.0 Based on the discussion in #55842, while the overall position of Rust wrt LLVM continues to be contentious, there does seem to be a consensus that there is no need for continued support of LLVM 5. This PR bumps our version requirement to LLVM 6.0 and makes Travis run against that. I hope that this is going to unblock #52694. If I understand correctly, while this issue still exists in LLVM 6, Ubuntu has backported the relevant patch. r? @alexcrichton