Commit Graph

29 Commits

Author SHA1 Message Date
Zalathar
5b6ff4fe18 Don't skip nonexistent source files
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-27 17:30:42 +10:00
Zalathar
7f90aa5538 Add cargo::rerun-if-changed directives for source directories 2024-08-27 17:30:25 +10:00
Zalathar
842cda6865 Always include WindowsMMap.c in the list of source files
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-27 17:30:25 +10:00
Zalathar
25ca8a283f Sort the list of source files 2024-08-27 17:30:19 +10:00
Zalathar
b6dba995b4 Remove InstrProfilingBiasVar.c from the list of source files
This file was introduced in LLVM 11, but was then removed in LLVM 13.
2024-08-27 17:30:06 +10:00
Zalathar
fcce75e9a6 Use helper functions to read environment variables
This also migrates from legacy `cargo:` directives to the newer `cargo::`
prefix.
2024-08-27 17:29:47 +10:00
Zalathar
2c141a4542 Update old comment referring to libcompiler_builtins 2024-08-27 15:22:35 +10:00
Zalathar
94aadf0f62 Build library/profiler_builtins from ci-llvm if appropriate 2024-08-24 21:21:34 +10:00
Zalathar
585804fcee Check that library/profiler_builtins actually found some source files
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-08-23 10:10:34 +10:00
James Farrell
fbc2abd6be Update cc crate to v1.0.97 2024-05-08 15:06:35 +00:00
James Farrell
21904319f8 Update version of cc crate
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: 57853c4bf8

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-03-14 16:42:15 +00:00
Qiu Chaofan
9d71386252 Add profiling support to AIX
AIX ld needs special option to merge objects with profiling. Also,
profiler_builtins should include builtins for AIX from compiler-rt.
2024-02-28 17:41:12 +08:00
Lawrence Tang
1ecb08409d Add support for custom JSON targets when using build-std.
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.
2024-02-05 10:20:42 +00:00
Mark Rousskov
0a916062aa Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
Guillaume Gomez
99144c3f04
Rollup merge of #114069 - cuviper:profiler-path, r=Mark-Simulacrum
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-13 21:00:45 +02:00
Nilstrieb
5830ca216d Add internal_features lint
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-08-03 14:50:50 +02:00
Josh Stone
d0b58f40a0 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-07-25 13:11:50 -07:00
Jack Huey
410dcc9674 Fully stabilize NLL 2022-06-03 17:16:41 -04:00
Deadbeef
06a1c14d52
Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
Jade
3cf820e17d rfc3052: Remove authors field from Cargo manifests
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-29 14:56:05 -07:00
Yuki Okushi
e457c2739b
Upgrade cc crate to 1.0.69 2021-07-13 17:58:50 +09:00
Chris Denton
e238ee31d4
Update cc
Recent commits to cc have helped to address #83043 and #43468
2021-05-24 23:34:12 +01:00
Mateusz Mikuła
b04fd78d66 update cc crate
To pull in this fix: 801a87bf2f
2021-05-12 00:55:03 +02:00
Josh Stone
7d872f538e Update the minimum external LLVM to 10 2021-03-22 11:33:43 -07:00
Nikita Popov
41b81584e2 Build newly added InstrProfilingVersionVar.c file 2021-03-01 23:35:35 +01:00
Mateusz Mikuła
1ea121c74f Fix warning whe building profiler_builtins crate 2020-09-04 15:10:29 +02:00
Rich Kadel
dd96996c70 Add InstrProfilingPlatformFuchsia.c to profiler_builtins
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-27 11:52:36 -07:00
Mateusz Mikuła
1a9def139e Profiler: reenable atomics after #65214 2020-08-23 15:55:18 +02:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00