Suppress a "unused variable" warning.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Suppress warnings on 32bit platforms.

On 32bit platforms, int is the same as i32, so 0xffffffff is "out of
range." Annotating variables as u32 fixes the problems.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Get rid of the android-cross-path flag to rustc.

There's no need to include this specific flag just for android. We can
already deal with what it tries to solve by using -C linker=/path/to/cc
and -C ar=/path/to/ar. The Makefiles for rustc already set this up when
we're crosscompiling.

I did add the flag to compiletest though so it can find gdb. Though, I'm
pretty sure we don't run debuginfo tests on android anyways right now.

[breaking-change]
librustc: Make sure to add argument attributes to extern fns from non-local crates.
core: Inherit the atomics module
core: Add a crate doc block
core: Document should_not_exist's existence

Explain why it should not exist, and the plan of attack for removing it.
core: Allow using failure outside of libcore

Due to our excellent macro hygiene, this involves having a global path and a
hidden module in libcore itself.
auto merge of #14169 : alexcrichton/rust/atomics, r=sanxiyn

This module is a foundation on which many other algorithms are built. When hardware support is missing, stubs are provided in libcompiler-rt.a, so this should be available on all platforms.
auto merge of #14179 : luqmana/rust/acp, r=alexcrichton

It's a bit odd to single out just android when we don't do this for any other cross compiling targets. Android builds will still work since we just pass the full path for gcc and ar with `-C linker` and `-C ar`.

I did add the flag to compiletest though so it can find gdb. Though, i'm pretty sure we don't run debuginfo tests on android anyways right now.

[breaking-change]
auto merge of #14186 : omasanori/rust/suppress-warnings, r=alexcrichton
auto merge of #14191 : luqmana/rust/eu, r=alexcrichton

We were correctly determining the attributes needed for the parameters for extern fns, but when that extern fn was from another crate we never bothered to pass that information along to LLVM. (i.e never called `foreign::add_argument_attributes`).

I've just changed both local and non-local (crate) extern fn's to be dealt with together (through `foreign::register_foreign_item_fn`) so we don't run into something like again.

Fixes #14177.
Add ToCStr impl for &Path and StrBuf

This is a stopgap until DST (#12938) lands.

Until DST lands, we cannot decompose &str into & and str, so we cannot
usefully take ToCStr arguments by reference (without forcing an
additional & around &str). So we are instead temporarily adding an
instance for &Path and StrBuf, so that we can take ToCStr as owned. When
DST lands, the &Path instance should be removed, the string instances
should be revisted, and arguments bound by ToCStr should be passed by
reference.

FIXMEs have been added accordingly.
Process::new etc should support non-utf8 commands/args

The existing APIs for spawning processes took strings for the command
and arguments, but the underlying system may not impose utf8 encoding,
so this is overly limiting.

The assumption we actually want to make is just that the command and
arguments are viewable as [u8] slices with no interior NULLs, i.e., as
CStrings. The ToCStr trait is a handy bound for types that meet this
requirement (such as &str and Path).

However, since the commands and arguments are often a mixture of
strings and paths, it would be inconvenient to take a slice with a
single T: ToCStr bound. So this patch revamps the process creation API
to instead use a builder-style interface, called `Command`, allowing
arguments to be added one at a time with differing ToCStr
implementations for each.

The initial cut of the builder API has some drawbacks that can be
addressed once issue #13851 (libstd as a facade) is closed. These are
detailed as FIXMEs.

Closes #11650.

[breaking-change]
Change dynamic_library::open_external to take ToCStr

`std::unstable::dynamic_library::open_external` currently takes a
`Path`, but because `Paths` produce normalized strings, this can
change the semantics of lookups in a given environment. This patch
generalizes the function to take a `ToCStr`-bounded type, which
includes both `Path`s and `str`s.

Closes #11650.