about summary refs log tree commit diff
path: root/src/libprofiler_builtins
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-119/+0
2020-07-22build: Avoid unnecessary build script reruns in libstdVadim Petrochenkov-0/+2
Add a FIXME to build scripts in profiler_builtins
2020-07-22build: Remove unnecessary `build = "build.rs"` annotationsVadim Petrochenkov-1/+0
2020-06-25Prepare for LLVM 11Josh Stone-6/+10
2020-04-11Require compiler-rt root at ../src/llvm-project/compiler-rtLuca Barbieri-2/+3
2020-03-18Remove -ffreestanding from libprofiler_builtins because we do need the ↵rojamd-1/+0
standard library
2020-01-07Handle changed InstrProfilingRuntime pathNikita Popov-2/+7
2020-01-07Add include path when compiling profiler runtimeNikita Popov-0/+1
InstrProfData.inc has been moved to include/
2019-12-22Format the worldMark Rousskov-21/+26
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-1/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-15Compile new InstrProfilingPlatformWindows.c fileNikita Popov-0/+1
2019-05-23Ship profiler with windows-gnuMateusz Mikuła-1/+5
2019-05-22Bump compiler-builtins to 0.1.15Alex Crichton-3/+1
This commit bumps the `compiler-builtins` dependency to 0.1.15 which expects to have the source for `compiler-rt` provided externally if the `c` feature is enabled. This then plumbs through the necessary support in the build system to ensure that if the `llvm-project` directory is checked out and present that we enable the `c` feature of `compiler-builtins` and compile in all the C intrinsics.
2019-05-08libprofiler_builtins: Set compilation flags more correctly for C code.Michael Woerister-0/+13
In particular, set COMPILER_RT_HAS_FCNTL_LCK and COMPILER_RT_HAS_ATOMICS as appropriate.
2019-02-10Revert removed #![feature(nll)]Taiki Endo-0/+1
2019-02-06libprofiler_builtins => 2018Taiki Endo-3/+2
2018-12-25Remove licensesMark Rousskov-20/+0
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-2/+8
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-09[nll] libprofiler_builtins: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-1/+0
2018-07-12Deny bare trait objects in the rest of rustljedrz-0/+1
2018-04-07Inject the `compiler_builtins` crate whenever the `core` crate is injectedOliver Schneider-0/+1
2018-03-25pgo: Blindly try to fix Windows build.Emilio Cobos Álvarez-0/+2
2018-03-25profiler_builtins: Add missing ProfilingNameVar file to the profiler build.Emilio Cobos Álvarez-0/+1
Otherwise opt builds with pgo-gen fail, d'oh. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2018-03-25profiler-builtins: define COMPILER_RT_HAS_UNAME on non-msvc platforms.Emilio Cobos Álvarez-0/+1
Otherwise lprofGetHostName, used by the PGO generator, won't be available. This means that PGO and coverage profiling would be restricted to systems with uname, but that seems acceptable. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
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-10-11Bump cc to 1.01 to include x86_64-unknown-linux-gnux32 supportMarco A L Barbosa-1/+1
2017-09-28Update to the `cc` crateAlex Crichton-3/+3
This is the name the `gcc` crate has moved to
2017-09-02update gcc crateRalf Jung-1/+1
Use gcc::Build rather than deprecated gcc::Config. Fixes #43973
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-2/+0
Fixes #41701.
2017-07-25Bump master to 1.21.0Alex Crichton-2/+2
This commit bumps the master branch's version to 1.21.0 and also updates the bootstrap compiler from the freshly minted beta release.
2017-07-05Switch to rust-lang-nursery/compiler-builtinsAlex Crichton-1/+1
This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-06-13Fix gcc version required by libprofiler_builtinsMarco Castelluccio-1/+1
2017-06-12Redefine strdup, open, fdopen as _strdup, _open, _fdopen to avoid linking ↵Marco Castelluccio-0/+3
errors on MSVC
2017-06-12Compile WindowsMMap too on MSVCMarco Castelluccio-14/+15
2017-05-01Add profiling support, through the rustc -Z profile flag.whitequark-0/+94
When -Z profile is passed, the GCDAProfiling LLVM pass is added to the pipeline, which uses debug information to instrument the IR. After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno file is created, containing initial profiling information. After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda file is created, containing branch counters. The created *.gcno and *.gcda files can be processed using the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM generates does not faithfully follow the GCC's format for *.gcno and *.gcda files, and so it will probably not work with other tools (such as gcov itself) that consume these files.