about summary refs log tree commit diff
path: root/library/profiler_builtins
AgeCommit message (Collapse)AuthorLines
2025-04-11Fix profiler_builtins build script to handle full path to profiler libJesus Checa Hidalgo-2/+8
LLVM_PROFILER_RT_LIB may be set to an absolute path (e.g., in Fedora builds), but `-l` expects a library name, not a path. After #138273, this caused builds to fail with a "could not find native static library" error. This patch updates the build script to split the path into directory and filename, using `cargo::rustc-link-search` for the directory and `cargo::rustc-link-lib=+verbatim` for the file. This allows profiler_builtins to correctly link the static library even when an absolute path is provided.
2025-03-11Migrate profiler_builtins to Rust 2024Eric Huss-1/+1
2024-12-17compiler & tools dependencies:clubby789-1/+2
Updating allocator-api2 v0.2.20 -> v0.2.21 Updating annotate-snippets v0.11.4 -> v0.11.5 Updating anyhow v1.0.93 -> v1.0.94 Updating bstr v1.11.0 -> v1.11.1 Updating chrono v0.4.38 -> v0.4.39 Updating clap v4.5.21 -> v4.5.23 Updating clap_builder v4.5.21 -> v4.5.23 Updating clap_complete v4.5.38 -> v4.5.39 Updating clap_lex v0.7.3 -> v0.7.4 Updating colored v2.1.0 -> v2.2.0 Updating console v0.15.8 -> v0.15.10 Updating crossbeam-channel v0.5.13 -> v0.5.14 Updating crossbeam-deque v0.8.5 -> v0.8.6 Updating crossbeam-utils v0.8.20 -> v0.8.21 Updating encode_unicode v0.3.6 -> v1.0.0 Updating fastrand v2.2.0 -> v2.3.0 Updating home v0.5.9 -> v0.5.11 Updating js-sys v0.3.74 -> v0.3.76 Updating libc v0.2.167 -> v0.2.168 Updating miniz_oxide v0.8.0 -> v0.8.1 Updating pest v2.7.14 -> v2.7.15 Updating pest_derive v2.7.14 -> v2.7.15 Updating pest_generator v2.7.14 -> v2.7.15 Updating pest_meta v2.7.14 -> v2.7.15 Updating redox_syscall v0.5.7 -> v0.5.8 Updating rustc-stable-hash v0.1.0 -> v0.1.1 Updating rustix v0.38.41 -> v0.38.42 Updating self_cell v1.0.4 -> v1.1.0 Updating semver v1.0.23 -> v1.0.24 Updating serde v1.0.215 -> v1.0.216 Updating serde_derive v1.0.215 -> v1.0.216 Adding thiserror v2.0.7 Adding thiserror-impl v2.0.7 Updating time v0.3.36 -> v0.3.37 Updating time-macros v0.2.18 -> v0.2.19 Updating tokio v1.41.1 -> v1.42.0 Updating wasm-bindgen v0.2.97 -> v0.2.99 Updating wasm-bindgen-backend v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99 Updating wasm-bindgen-shared v0.2.97 -> v0.2.99 Updating wasm-encoder v0.221.0 -> v0.221.2 Updating wasmparser v0.221.0 -> v0.221.2 Updating wast v221.0.0 -> v221.0.2 Updating wat v1.221.0 -> v1.221.2 library dependencies: Updating allocator-api2 v0.2.20 -> v0.2.21 Updating libc v0.2.167 -> v0.2.168 rustbook dependencies: Updating anyhow v1.0.93 -> v1.0.94 Updating bstr v1.11.0 -> v1.11.1 Updating chrono v0.4.38 -> v0.4.39 Updating clap v4.5.21 -> v4.5.23 Updating clap_builder v4.5.21 -> v4.5.23 Updating clap_complete v4.5.38 -> v4.5.39 Updating clap_lex v0.7.3 -> v0.7.4 Updating fastrand v2.2.0 -> v2.3.0 Updating js-sys v0.3.74 -> v0.3.76 Updating libc v0.2.167 -> v0.2.168 Updating miniz_oxide v0.8.0 -> v0.8.1 Updating pest v2.7.14 -> v2.7.15 Updating pest_derive v2.7.14 -> v2.7.15 Updating pest_generator v2.7.14 -> v2.7.15 Updating pest_meta v2.7.14 -> v2.7.15 Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1 Updating redox_syscall v0.5.7 -> v0.5.8 Updating rustix v0.38.41 -> v0.38.42 Updating semver v1.0.23 -> v1.0.24 Updating serde v1.0.215 -> v1.0.216 Updating serde_derive v1.0.215 -> v1.0.216 Adding thiserror v2.0.7 Adding thiserror-impl v2.0.7 Updating wasm-bindgen v0.2.97 -> v0.2.99 Updating wasm-bindgen-backend v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99 Updating wasm-bindgen-shared v0.2.97 -> v0.2.99 Removing windows-sys v0.52.0
2024-11-27Auto merge of #133369 - Zalathar:profiler-builtins-no-core, r=jieyouxubors-6/+8
Allow injecting a profiler runtime into `#![no_core]` crates An alternative to #133300, allowing `-Cinstrument-coverage` to be used with `-Zbuild-std`. The incompatibility between `profiler_builtins` and `#![no_core]` crates appears to have been caused by profiler_builtins depending on core, and therefore conflicting with core (or minicore). But that's a false dependency, because the profiler doesn't contain any actual Rust code. So we can just mark the profiler itself as `#![no_core]`, and remove the incompatibility error. --- For context, the error was originally added by #79958.
2024-11-24Make profiler_builtins `#![no_core]` instead of just `#![no_std]`Zalathar-3/+2
This crate doesn't contain any actual Rust code; it's just C/C++ code built and packaged in a Rust-friendly way.
2024-11-24Remove unnecessary `#![allow(unused_features)]`Zalathar-1/+0
2024-11-24Sort and separate lint/feature attributes in `profiler_builtins`Zalathar-4/+8
2024-11-13Bump `cc`clubby789-2/+1
2024-11-13Run `cargo update` and update licensesclubby789-1/+2
2024-08-27Don't skip nonexistent source filesZalathar-8/+2
This behaviour was introduced during the upgrade to LLVM 11. Now that the list of source files has been cleaned up, we can reasonably expect _all_ of the listed source files to be present.
2024-08-27Add `cargo::rerun-if-changed` directives for source directoriesZalathar-3/+5
2024-08-27Always include `WindowsMMap.c` in the list of source filesZalathar-4/+2
The whole file is surrounded by `#if defined(_WIN32)`, so there's no need to have separate logic to exclue it from non-Windows builds.
2024-08-27Sort the list of source filesZalathar-2/+3
2024-08-27Remove `InstrProfilingBiasVar.c` from the list of source filesZalathar-1/+0
This file was introduced in LLVM 11, but was then removed in LLVM 13.
2024-08-27Use helper functions to read environment variablesZalathar-9/+17
This also migrates from legacy `cargo:` directives to the newer `cargo::` prefix.
2024-08-27Update old comment referring to `libcompiler_builtins`Zalathar-1/+3
2024-08-24Build `library/profiler_builtins` from `ci-llvm` if appropriateZalathar-4/+8
2024-08-23Check that `library/profiler_builtins` actually found some source filesZalathar-0/+4
The current `build.rs` will automatically skip source files that don't exist. An unfortunate side-effect is that if _no_ files could be found (e.g. because the directory was wrong), the build fails with a mysterious linker error. We can reduce the awkwardness of this by explicitly checking that at least one source file was found.
2024-05-08Update cc crate to v1.0.97James Farrell-1/+1
2024-03-14Update version of cc crateJames Farrell-1/+1
Reason: In order to build the Windows version of the Rust toolchain for the Android platform, the following patch to the cc is crate is required to avoid incorrectly determining that we are building with the Android NDK: https://github.com/rust-lang/cc-rs/commit/57853c4bf8a89a0f4c9137eb367ac580305c6919 This patch is present in version 1.0.80 and newer versions of the cc crate. The rustc source distribution currently has 3 different versions of cc in the vendor directory, only one of which has the necessary fix. We (the Android Rust toolchain) are currently maintaining local patches to upgrade the cc crate dependency versions, which we would like to upstream.
2024-02-28Add profiling support to AIXQiu Chaofan-0/+1
AIX ld needs special option to merge objects with profiling. Also, profiler_builtins should include builtins for AIX from compiler-rt.
2024-02-05Add support for custom JSON targets when using build-std.Lawrence Tang-3/+4
Currently, when building with `build-std`, some library build scripts check properties of the target by inspecting the target triple at `env::TARGET`, which is simply set to the filename of the JSON file when using JSON target files. This patch alters these build scripts to use `env::CARGO_CFG_*` to fetch target information instead, allowing JSON target files describing platforms without `restricted_std` to build correctly when using `-Z build-std`. Fixes wg-cargo-std-aware/#60.
2023-08-23Bump cfg(bootstrap)Mark Rousskov-1/+1
2023-08-13Rollup merge of #114069 - cuviper:profiler-path, r=Mark-SimulacrumGuillaume Gomez-0/+6
Allow using external builds of the compiler-rt profile lib This changes the bootstrap config `target.*.profiler` from a plain bool to also allow a string, which will be used as a path to the pre-built profiling runtime for that target. Then `profiler_builtins/build.rs` reads that in a `LLVM_PROFILER_RT_LIB` environment variable.
2023-08-03Add `internal_features` lintNilstrieb-0/+1
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
2023-07-25Allow using external builds of the compiler-rt profile libJosh Stone-0/+6
This changes the bootstrap config `target.*.profiler` from a plain bool to also allow a string, which will be used as a path to the pre-built profiling runtime for that target. Then `profiler_builtins/build.rs` reads that in a `LLVM_PROFILER_RT_LIB` environment variable.
2022-06-03Fully stabilize NLLJack Huey-1/+0
2021-12-23Switch all libraries to the 2021 editionDeadbeef-1/+1
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-07-13Upgrade `cc` crate to 1.0.69Yuki Okushi-1/+1
2021-05-24Update ccChris Denton-1/+1
Recent commits to cc have helped to address #83043 and #43468
2021-05-12update cc crateMateusz Mikuła-1/+1
To pull in this fix: https://github.com/alexcrichton/cc-rs/commit/801a87bf2f31ad1ad8bd7e8fa4f5a52b0e2b4c00
2021-03-22Update the minimum external LLVM to 10Josh Stone-3/+1
2021-03-01Build newly added InstrProfilingVersionVar.c fileNikita Popov-0/+1
2020-09-04Fix warning whe building profiler_builtins crateMateusz Mikuła-1/+1
2020-08-27Add InstrProfilingPlatformFuchsia.c to profiler_builtinsRich Kadel-0/+1
All other Platform files included in `llvm-project/compiler-rt` were present, except Fuchsia. Now that there is a functional end-to-end version of `-Zinstrument-coverage`, I need to start building and testing coverage-enabled Rust programs on Fuchsia, and this file is required.
2020-08-23Profiler: reenable atomics after #65214Mateusz Mikuła-1/+1
2020-07-27mv std libs to library/mark-0/+117