mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Auto merge of #25984 - Manishearth:rollup, r=Manishearth
- Successful merges: #25939, #25963, #25970, #25971, #25974 - Failed merges:
This commit is contained in:
commit
5b56d73dc0
12
configure
vendored
12
configure
vendored
@ -582,6 +582,7 @@ valopt sysconfdir "/etc" "install system configuration files"
|
|||||||
valopt datadir "${CFG_PREFIX}/share" "install data"
|
valopt datadir "${CFG_PREFIX}/share" "install data"
|
||||||
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
|
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
|
||||||
valopt llvm-root "" "set LLVM root"
|
valopt llvm-root "" "set LLVM root"
|
||||||
|
valopt python "" "set path to python"
|
||||||
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
|
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
|
||||||
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
|
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
|
||||||
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
|
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
|
||||||
@ -695,7 +696,9 @@ putvar CFG_BOOTSTRAP_KEY
|
|||||||
step_msg "looking for build programs"
|
step_msg "looking for build programs"
|
||||||
|
|
||||||
probe_need CFG_CURLORWGET curl wget
|
probe_need CFG_CURLORWGET curl wget
|
||||||
probe_need CFG_PYTHON python2.7 python2.6 python2 python
|
if [ -z "$CFG_PYTHON_PROVIDED" ]; then
|
||||||
|
probe_need CFG_PYTHON python2.7 python2.6 python2 python
|
||||||
|
fi
|
||||||
|
|
||||||
python_version=$($CFG_PYTHON -V 2>&1)
|
python_version=$($CFG_PYTHON -V 2>&1)
|
||||||
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
|
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
|
||||||
@ -849,13 +852,6 @@ then
|
|||||||
putvar CFG_LOCAL_RUST_ROOT
|
putvar CFG_LOCAL_RUST_ROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Force freebsd to build with clang; gcc doesn't like us there
|
|
||||||
if [ $CFG_OSTYPE = unknown-freebsd ]
|
|
||||||
then
|
|
||||||
step_msg "on FreeBSD, forcing use of clang"
|
|
||||||
CFG_ENABLE_CLANG=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Force bitrig to build with clang; gcc doesn't like us there
|
# Force bitrig to build with clang; gcc doesn't like us there
|
||||||
if [ $CFG_OSTYPE = unknown-bitrig ]
|
if [ $CFG_OSTYPE = unknown-bitrig ]
|
||||||
then
|
then
|
||||||
|
@ -265,7 +265,7 @@ endef
|
|||||||
$(foreach crate,$(CRATES),$(eval $(call DEF_LIB_DOC,$(crate))))
|
$(foreach crate,$(CRATES),$(eval $(call DEF_LIB_DOC,$(crate))))
|
||||||
|
|
||||||
COMPILER_DOC_TARGETS := $(CRATES:%=doc/%/index.html)
|
COMPILER_DOC_TARGETS := $(CRATES:%=doc/%/index.html)
|
||||||
ifdef CFG_COMPILER_DOCS
|
ifdef CFG_ENABLE_COMPILER_DOCS
|
||||||
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
|
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
|
||||||
else
|
else
|
||||||
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)
|
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)
|
||||||
|
@ -159,7 +159,7 @@ b.x = 10; // error: cannot assign to immutable field `b.x`
|
|||||||
|
|
||||||
[struct]: structs.html
|
[struct]: structs.html
|
||||||
|
|
||||||
However, by using `Cell<T>`, you can emulate field-level mutability:
|
However, by using [`Cell<T>`][cell], you can emulate field-level mutability:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
@ -176,4 +176,6 @@ point.y.set(7);
|
|||||||
println!("y: {:?}", point.y);
|
println!("y: {:?}", point.y);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[cell]: ../std/cell/struct.Cell.html
|
||||||
|
|
||||||
This will print `y: Cell { value: 7 }`. We’ve successfully updated `y`.
|
This will print `y: Cell { value: 7 }`. We’ve successfully updated `y`.
|
||||||
|
@ -18,11 +18,6 @@ pub fn opts() -> TargetOptions {
|
|||||||
executables: true,
|
executables: true,
|
||||||
morestack: true,
|
morestack: true,
|
||||||
has_rpath: true,
|
has_rpath: true,
|
||||||
pre_link_args: vec!(
|
|
||||||
"-L/usr/local/lib".to_string(),
|
|
||||||
"-L/usr/local/lib/gcc46".to_string(),
|
|
||||||
"-L/usr/local/lib/gcc44".to_string(),
|
|
||||||
),
|
|
||||||
|
|
||||||
.. Default::default()
|
.. Default::default()
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,6 @@ pub unsafe fn record_os_managed_stack_bounds(stack_lo: usize, _stack_hi: usize)
|
|||||||
pub unsafe fn record_sp_limit(limit: usize) {
|
pub unsafe fn record_sp_limit(limit: usize) {
|
||||||
return target_record_sp_limit(limit);
|
return target_record_sp_limit(limit);
|
||||||
|
|
||||||
// x86-64
|
|
||||||
#[cfg(all(target_arch = "x86_64",
|
#[cfg(all(target_arch = "x86_64",
|
||||||
any(target_os = "macos", target_os = "ios")))]
|
any(target_os = "macos", target_os = "ios")))]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@ -164,7 +163,6 @@ pub unsafe fn record_sp_limit(limit: usize) {
|
|||||||
asm!("movq $0, %fs:32" :: "r"(limit) :: "volatile")
|
asm!("movq $0, %fs:32" :: "r"(limit) :: "volatile")
|
||||||
}
|
}
|
||||||
|
|
||||||
// x86
|
|
||||||
#[cfg(all(target_arch = "x86",
|
#[cfg(all(target_arch = "x86",
|
||||||
any(target_os = "macos", target_os = "ios")))]
|
any(target_os = "macos", target_os = "ios")))]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@ -182,8 +180,8 @@ pub unsafe fn record_sp_limit(limit: usize) {
|
|||||||
unsafe fn target_record_sp_limit(_: usize) {
|
unsafe fn target_record_sp_limit(_: usize) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// mips, arm - Some brave soul can port these to inline asm, but it's over
|
// mips, arm - The implementations are a bit big for inline asm!
|
||||||
// my head personally
|
// They can be found in src/rt/arch/$target_arch/record_sp.S
|
||||||
#[cfg(any(target_arch = "mips",
|
#[cfg(any(target_arch = "mips",
|
||||||
target_arch = "mipsel",
|
target_arch = "mipsel",
|
||||||
all(target_arch = "arm", not(target_os = "ios"))))]
|
all(target_arch = "arm", not(target_os = "ios"))))]
|
||||||
@ -221,7 +219,6 @@ pub unsafe fn record_sp_limit(limit: usize) {
|
|||||||
pub unsafe fn get_sp_limit() -> usize {
|
pub unsafe fn get_sp_limit() -> usize {
|
||||||
return target_get_sp_limit();
|
return target_get_sp_limit();
|
||||||
|
|
||||||
// x86-64
|
|
||||||
#[cfg(all(target_arch = "x86_64",
|
#[cfg(all(target_arch = "x86_64",
|
||||||
any(target_os = "macos", target_os = "ios")))]
|
any(target_os = "macos", target_os = "ios")))]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@ -255,7 +252,6 @@ pub unsafe fn get_sp_limit() -> usize {
|
|||||||
return limit;
|
return limit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// x86
|
|
||||||
#[cfg(all(target_arch = "x86",
|
#[cfg(all(target_arch = "x86",
|
||||||
any(target_os = "macos", target_os = "ios")))]
|
any(target_os = "macos", target_os = "ios")))]
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@ -278,8 +274,8 @@ pub unsafe fn get_sp_limit() -> usize {
|
|||||||
return 1024;
|
return 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mips, arm - Some brave soul can port these to inline asm, but it's over
|
// mips, arm - The implementations are a bit big for inline asm!
|
||||||
// my head personally
|
// They can be found in src/rt/arch/$target_arch/record_sp.S
|
||||||
#[cfg(any(target_arch = "mips",
|
#[cfg(any(target_arch = "mips",
|
||||||
target_arch = "mipsel",
|
target_arch = "mipsel",
|
||||||
all(target_arch = "arm", not(target_os = "ios"))))]
|
all(target_arch = "arm", not(target_os = "ios"))))]
|
||||||
|
Loading…
Reference in New Issue
Block a user