-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #43454 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 11 pull requests - Successful merges: #43297, #43322, #43342, #43361, #43366, #43374, #43379, #43401, #43421, #43428, #43446 - Failed merges:
- Loading branch information
Showing
43 changed files
with
275 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/doc/unstable-book/src/library-features/compiler-builtins-lib.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# `compiler_builtins_lib` | ||
|
||
The tracking issue for this feature is: None. | ||
|
||
------------------------ | ||
|
||
This feature is required to link to the `compiler_builtins` crate which contains | ||
"compiler intrinsics". Compiler intrinsics are software implementations of basic | ||
operations like multiplication of `u64`s. These intrinsics are only required on | ||
platforms where these operations don't directly map to a hardware instruction. | ||
|
||
You should never need to explicitly link to the `compiler_builtins` crate when | ||
building "std" programs as `compiler_builtins` is already in the dependency | ||
graph of `std`. But you may need it when building `no_std` **binary** crates. If | ||
you get a *linker* error like: | ||
|
||
``` text | ||
$PWD/src/main.rs:11: undefined reference to `__aeabi_lmul' | ||
$PWD/src/main.rs:11: undefined reference to `__aeabi_uldivmod' | ||
``` | ||
|
||
That means that you need to link to this crate. | ||
|
||
When you link to this crate, make sure it only appears once in your crate | ||
dependency graph. Also, it doesn't matter where in the dependency graph you | ||
place the `compiler_builtins` crate. | ||
|
||
<!-- NOTE(ignore) doctests don't support `no_std` binaries --> | ||
|
||
``` rust,ignore | ||
#![feature(compiler_builtins_lib)] | ||
#![no_std] | ||
extern crate compiler_builtins; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule liblibc
updated
62 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=build.rs"); | ||
println!("cargo:rerun-if-env-changed=CFG_LIBDIR_RELATIVE"); | ||
println!("cargo:rerun-if-env-changed=CFG_COMPILER_HOST_TRIPLE"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.