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. |
||
|---|---|---|
| .. | ||
| .github/workflows | ||
| builtins-shim | ||
| builtins-test | ||
| builtins-test-intrinsics | ||
| ci | ||
| compiler-builtins | ||
| crates | ||
| etc | ||
| libm | ||
| libm-test | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .rustfmt.toml | ||
| Cargo.toml | ||
| CONTRIBUTING.md | ||
| LICENSE.txt | ||
| PUBLISHING.md | ||
| README.md | ||
| rust-version | ||
| triagebot.toml | ||
compiler-builtins and libm
This repository contains two main crates:
compiler-builtins: symbols that the compiler expects to be available at link timelibm: a Rust implementation of C math libraries, used to provide implementations incore.
More details are at compiler-builtins/README.md and libm/README.md.
For instructions on contributing, see CONTRIBUTING.md.
License
libmmay be used under the MIT Licensecompiler-builtinsmay 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.