about summary refs log tree commit diff
path: root/src/liballoc_jemalloc/build.rs
AgeCommit message (Collapse)AuthorLines
2018-11-02Remove all jemalloc-related contentAlex Crichton-151/+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-07-31enable jemalloc assertions when configured to do soRalf Jung-5/+4
2018-01-18Make liballoc_jemalloc work on CloudABI.Ed Schouten-3/+10
The automated builds for CloudABI in dist-various-2 don't use --disable-jemalloc, even though my original container image did. Instead of setting that flag, let's go the extra mile of making jemalloc work. CloudABI's C library already uses jemalloc and now exposes the API extensions used by us.
2017-12-30Add CloudABI to the list of systems on which we stub out alloc_jemalloc.Ed Schouten-3/+3
The official jemalloc sources don't build cleanly on CloudABI yet, for the reason that some of its tracing frameworks try to access the global filesystem namespace, which CloudABI doesn't provide. Always make use of the malloc implementation used by the C library, which already happens to be jemalloc with some tiny build fixes.
2017-12-27Revert "Add a file to trivially disable tool building or testing"kennytm-3/+3
This reverts commit ab018c76e14b87f3c9e0b7384cc9b02d94779cd5. This also adds the `ToolBuild::is_ext_tool` field to replace the previous `ToolBuild::expectation` field, to indicate whether a build-failure of certain tool is essential.
2017-11-28*: strip calls to cc::Build::compileTamir Duberstein-1/+1
The documentation states: "The name output should be the name of the library." and this is already done in more recently-added callers.
2017-11-19std: Add a new wasm32-unknown-unknown targetAlex Crichton-1/+1
This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld. Notable features of this target include: * There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set. * There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything. * Very small wasm modules can be generated directly from Rust code using this target. * Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc). * Naturally, any `#[no_std]` crate should be 100% compatible with this new target. This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker. This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready". --- Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is still getting LLVM bugs fixed to get that working and will take some time. Relatively simple programs all seem to work though! --- It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is: cargo install --git https://github.com/alexcrichton/wasm-gc wasm-gc foo.wasm bar.wasm And then `bar.wasm` should be the smallest we can get it! --- In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-14/+1
2017-09-28Update to the `cc` crateAlex Crichton-3/+3
This is the name the `gcc` crate has moved to
2017-09-17Add a file to trivially disable tool building or testingOliver Schneider-3/+3
2017-09-02update gcc crateRalf Jung-2/+2
Use gcc::Build rather than deprecated gcc::Config. Fixes #43973
2017-08-29give up on trying to fix the assertion failureRalf Jung-3/+5
2017-08-29Fix alloc_jemalloc debug featureRalf Jung-1/+1
At least, I think that's how it should be. 'debug' is how the feature is called in Cargo.toml.
2017-08-16Update jemalloc to 4.5.0arthurprs-23/+1
2017-06-25Stop disabling fill in jemallocSteven Fackler-2/+0
The underlying bug has been fixed for over 2 years!
2017-06-19Bump version and stage0 compilerAlex Crichton-0/+5
2017-06-09Revert "Update jemalloc to 4.5.0"arthurprs-1/+23
This reverts commit 65d0be3b7b540145c22409b1a79f7d263422e19b.
2017-05-10Update jemalloc to 4.5.0arthurprs-23/+1
2017-04-08Fix jemalloc support for muslShiz-1/+1
Just like DragonFlyBSD, using the same symbols as the system allocator will result in a segmentation fault at runtime due to allocator mismatches. As such, prefix the jemalloc symbols instead.
2017-03-04Automate timestamp creation and build skipping for native librariesVadim Petrochenkov-9/+4
Add comments
2017-03-04Build compiler-rt and sanitizers only onceVadim Petrochenkov-25/+15
2017-03-04Add/remove `rerun-if-changed` when necessaryVadim Petrochenkov-2/+0
2017-02-06std: Remove cfg(cargobuild) annotationsAlex Crichton-1/+0
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-03Merge remote tracking branch 'upstream/master'Tatsuyuki Ishi-30/+27
2017-02-03liballoc_jemalloc: fix linking with system libraryTatsuyuki Ishi-5/+6
2017-02-02Build libbacktrace/jemalloc only when their timestamps are older than sourcesVadim Petrochenkov-6/+11
2017-02-02Fix build in cross-compilation scenariosVadim Petrochenkov-2/+2
2017-02-02rustbuild: Build jemalloc and libbacktrace only once (take 2)Vadim Petrochenkov-35/+27
2017-01-26rustc: Don't export builtins/panic/alloc symsAlex Crichton-0/+11
This hides symbols from various unstable and implementation-detail crates of the standard library. Although typically transitive exported `pub extern` functions are exported from cdylibs, these crates aren't necessary as they're all implementation details. Closes #34493
2016-12-30sparc64-linux supportJorge Aparicio-0/+6
2016-12-23Auto merge of #38401 - redox-os:redox_cross, r=brsonbors-1/+2
Redox Cross Compilation I will admit - there are things here that I wish I did not have to do. This completes the ability to create a cross compiler from the rust repository for `x86_64-unknown-redox`. I will document this PR with inline comments explaining some things. [View this gist to see how a cross compiler is built](https://gist.github.com/jackpot51/6680ad973986e84d69c79854249f2b7e) Prior discussion of a smaller change is here: https://github.com/rust-lang/rust/pull/38366
2016-12-17let BSD to use gmake for GNU-makeSébastien Marie-1/+1
the diff extends build_helper to provide an function to return the expected name of GNU-make on the host: "make" or "gmake". Fixes #38429
2016-12-15WIP: Cross-compilation for Redox targetJeremy Soller-1/+2
2016-12-07mk: Switch rustbuild to the default build systemAlex Crichton-5/+11
This commit switches the default build system for Rust from the makefiles to rustbuild. The rustbuild build system has been in development for almost a year now and has become quite mature over time. This commit is an implementation of the proposal on [internals] which slates deletion of the makefiles on 2016-01-02. [internals]: https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368 This commit also updates various documentation in `README.md`, `CONTRIBUTING.md`, `src/bootstrap/README.md`, and throughout the source code of rustbuild itself. Closes #37858
2016-12-01don't rebuild alloc_jemalloc if jemalloc's .git directory has changedJorge Aparicio-0/+1
the .git directory is modified by `bootstrap` when it updates this git submodule; this triggered rebuilds every time `bootstrap` was called. likely fixes #38094
2016-10-22Add Fuchsia supportRaph Levien-1/+1
Adds support for the x86_64-unknown-fuchsia target, which covers the Fuchsia operating system.
2016-10-16run rustfmt on various foldersSrinivas Reddy Thatiparthy-18/+14
2016-09-30Build a dummy alloc_jemalloc crate on platforms that don't support itBrian Anderson-0/+18
This is a hack to support building targets that don't support jemalloc alongside hosts that do. The jemalloc build is controlled by a feature of the std crate, and if that feature changes between targets, it invalidates the fingerprint of std's build script (this is a cargo bug); so we must ensure that the feature set used by std is the same across all targets, which means we have to build the alloc_jemalloc crate for targets like emscripten, even if we don't use it.
2016-09-25Report which required build-time environment variable is not setJake Goulding-3/+3
2016-07-30Add ARM MUSL targets.Timon Van Overveldt-1/+10
The targets are: - `arm-unknown-linux-musleabi` - `arm-unknown-linux-musleabihf` - `armv7-unknown-linux-musleabihf` These mirror the existing `gnueabi` targets. All of these targets produce fully static binaries, similar to the x86 MUSL targets. For now these targets can only be used with `--rustbuild` builds, as https://github.com/rust-lang/compiler-rt/pull/22 only made the necessary compiler-rt changes in the CMake configs, not the plain GNU Make configs. I've tested these targets GCC 5.3.0 compiled again musl-1.1.12 (downloaded from http://musl.codu.org/). An example `./configure` invocation is: ``` ./configure \ --enable-rustbuild --target=arm-unknown-linux-musleabi \ --musl-root="$MUSL_ROOT" ``` where `MUSL_ROOT` points to the `arm-linux-musleabi` prefix. Usually that path will be of the form `/foobar/arm-linux-musleabi/arm-linux-musleabi`. Usually the cross-compile toolchain will live under `/foobar/arm-linux-musleabi/bin`. That path should either by added to your `PATH` variable, or you should add a section to your `config.toml` as follows: ``` [target.arm-unknown-linux-musleabi] cc = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-gcc" cxx = "/foobar/arm-linux-musleabi/bin/arm-linux-musleabi-g++" ``` As a prerequisite you'll also have to put a cross-compiled static `libunwind.a` library in `$MUSL_ROOT/lib`. This is similar to [how the x86_64 MUSL targets are built] (https://doc.rust-lang.org/book/advanced-linking.html).
2016-06-16Fix issue where rustbuild expected msvc to have arPeter Atashian-1/+2
Signed-off-by: Peter Atashian <retep998@gmail.com>
2016-06-05run rustfmt on liballoc_jemalloc folderSrinivas Reddy Thatiparthy-9/+20
2016-05-10rustbuild: Tighten dependencies of build scriptsAlex Crichton-0/+16
Ensure that `rerun-if-changed` is printed for all build scripts to ensure that they've all got the right list of dependencies.
2016-04-02Prefix jemalloc on DragonFly to prevent segfaults.Michael Neumann-0/+2
Similar to commits ed015456a114ae907a36af80c06f81ea93182a24 (iOS) and e3b414d8612314e74e2b0ebde1ed5c6997d28e8d (Android)
2016-03-06rustbuild: fix cross compilation of libstd to i686-unknown-linux-muslJorge Aparicio-1/+1
- make sure we copy the third party objects (crt*.o) to the target stage directory. - apply the x86_64-musl logic also to the i686-musl target.
2016-02-14std: Stop prefixing jemalloc symbolsAlex Crichton-3/+14
Now that we properly only link in jemalloc when building executables, we have far less to worry about in terms of polluting the global namespace with the `free` and `malloc` symbols on Linux. This commit will primarily allow LLVM to use jemalloc so the compiler will only be using one allocator overall. Locally this took compile time for libsyntax from 95 seconds to 89 (a 6% improvement).
2016-02-11bootstrap: Add directives to not double-link libsAlex Crichton-0/+2
Have all Cargo-built crates pass `--cfg cargobuild` and then add appropriate `#[cfg]` definitions to all crates to avoid linking anything if this is passed. This should help allow libstd to compile with both the makefiles and with Cargo.
2016-02-11bootstrap: Add build scripts for cratesAlex Crichton-0/+104
This commits adds build scripts to the necessary Rust crates for all the native dependencies. This is currently a duplication of the support found in mk/rt.mk and is my best effort at representing the logic twice, but there may be some unfortunate-and-inevitable divergence. As a summary: * alloc_jemalloc - build script to compile jemallocal * flate - build script to compile miniz.c * rustc_llvm - build script to run llvm-config and learn about how to link it. Note that this crucially (and will not ever) compile LLVM as that would take far too long. * rustdoc - build script to compile hoedown * std - script to determine lots of libraries/linkages as well as compile libbacktrace