rust/library/compiler-builtins
Trevor Gross 016bc61312
Test building custom targets and resolve an issue probing rustc
The `rustc` probe done in our build scripts needs to pass `--target` to
get the correct configuration, which usually comes from the `TARGET`
environment variable. However, for targets specified via a `target.json`
file, `TARGET` gets set to the file name without an extension or path.
`rustc` will check a search path to attempt to locate the file, but this
is likely to fail since the directory where Cargo invokes build scripts
(and hence where those scripts invoke `rustc`) might not have any
relation to the JSON spec file.

Resolve this for now by leaving `f16` and `f128` disabled if the `rustc`
command fails. Result of the discussion at CARGO-14208 may eventually
provide a better solution.

A CI test is also added since custom JSON files are an edge case that
could fail in other ways. I verified this fails without the fix here.
The JSON file is the output for `thumbv7em-none-eabi`, just renamed so
`rustc` doesn't identify it.
2025-07-04 21:09:56 -05:00
..
.github/workflows Test building custom targets and resolve an issue probing rustc 2025-07-04 21:09:56 -05:00
builtins-shim Work around out-of-tree testing with a shim crate 2025-06-14 06:56:18 +00:00
builtins-test Use the compiler to determine whether or not to enable f16 and f128 2025-07-02 01:18:54 -05:00
builtins-test-intrinsics Use the compiler to determine whether or not to enable f16 and f128 2025-07-02 01:18:54 -05:00
ci symcheck: Make target a positional argument 2025-07-04 17:44:54 -05:00
compiler-builtins Test building custom targets and resolve an issue probing rustc 2025-07-04 21:09:56 -05:00
crates symcheck: Improve diagnostics from spawned Cargo 2025-07-04 18:18:31 -05:00
etc Test building custom targets and resolve an issue probing rustc 2025-07-04 21:09:56 -05:00
libm Test building custom targets and resolve an issue probing rustc 2025-07-04 21:09:56 -05:00
libm-test libm: Improved integer utilities, implement shifts and bug fixes for i256 and u256 2025-07-01 08:07:48 +00:00
.editorconfig Move the libm .editorconfig to root 2025-04-19 20:42:40 -04:00
.git-blame-ignore-revs Update .git-blame-ignore-revs after the libm merge 2025-04-19 20:18:22 +00:00
.gitignore Replace the musl submodule with a download script 2025-06-04 17:20:43 +00:00
.rustfmt.toml Add a .rustfmt.toml with style edition 2024 2025-04-19 19:05:49 -04:00
Cargo.toml Work around out-of-tree testing with a shim crate 2025-06-14 06:56:18 +00:00
CONTRIBUTING.md Update README and CONTRIBUTING for the new repository layout 2025-04-21 06:16:12 -04:00
LICENSE.txt Update licensing information after repository refactoring 2025-04-21 06:16:12 -04:00
PUBLISHING.md Update publishing instructions 2019-11-11 10:40:09 -08:00
README.md fixed typo in readme 2025-05-22 11:51:54 +02:00
rust-version Update the upstream Rust version 2025-06-14 04:25:55 +00:00
triagebot.toml Add minimal triagebot config 2025-06-14 22:43:17 +00:00

compiler-builtins and libm

This repository contains two main crates:

  • compiler-builtins: symbols that the compiler expects to be available at link time
  • libm: a Rust implementation of C math libraries, used to provide implementations in core.

More details are at compiler-builtins/README.md and libm/README.md.

For instructions on contributing, see CONTRIBUTING.md.

License

  • libm may be used under the MIT License
  • compiler-builtins may be used under the MIT License and the Apache License, Version 2.0 with the LLVM exception.
  • All original contributions must be under all of: the MIT license, the Apache-2.0 license, and the Apache-2.0 license with the LLVM exception.

More details are in LICENSE.txt and libm/LICENSE.txt.