-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into asm-compile-tests
- Loading branch information
Showing
478 changed files
with
5,342 additions
and
4,188 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# This script runs `musl-cross-make` to prepare C toolchain (Binutils, GCC, musl itself) | ||
# and builds static libunwind that we distribute for static target. | ||
# | ||
# Versions of the toolchain components are configurable in `musl-cross-make/Makefile` and | ||
# musl unlike GLIBC is forward compatible so upgrading it shouldn't break old distributions. | ||
# Right now we have: Binutils 2.27, GCC 6.3.0, musl 1.1.18 | ||
set -ex | ||
|
||
hide_output() { | ||
set +x | ||
on_err=" | ||
echo ERROR: An error was encountered with the build. | ||
cat /tmp/build.log | ||
exit 1 | ||
" | ||
trap "$on_err" ERR | ||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & | ||
PING_LOOP_PID=$! | ||
$@ &> /tmp/build.log | ||
trap - ERR | ||
kill $PING_LOOP_PID | ||
rm /tmp/build.log | ||
set -x | ||
} | ||
|
||
ARCH=$1 | ||
TARGET=$ARCH-linux-musl | ||
|
||
OUTPUT=/usr/local | ||
shift | ||
|
||
git clone https://github.com/richfelker/musl-cross-make -b v0.9.7 | ||
cd musl-cross-make | ||
|
||
hide_output make -j$(nproc) TARGET=$TARGET | ||
hide_output make install TARGET=$TARGET OUTPUT=$OUTPUT | ||
|
||
cd - | ||
|
||
# Install musl library to make binaries executable | ||
ln -s $OUTPUT/$TARGET/lib/libc.so /lib/ld-musl-$ARCH.so.1 | ||
echo $OUTPUT/$TARGET/lib >> /etc/ld-musl-$ARCH.path | ||
|
||
|
||
export CC=$TARGET-gcc | ||
export CXX=$TARGET-g++ | ||
|
||
LLVM=70 | ||
|
||
# may have been downloaded in a previous run | ||
if [ ! -d libunwind-release_$LLVM ]; then | ||
curl -L https://github.com/llvm-mirror/llvm/archive/release_$LLVM.tar.gz | tar xzf - | ||
curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM.tar.gz | tar xzf - | ||
fi | ||
|
||
# fixme(mati865): Replace it with https://github.com/rust-lang/rust/pull/59089 | ||
mkdir libunwind-build | ||
cd libunwind-build | ||
cmake ../libunwind-release_$LLVM \ | ||
-DLLVM_PATH=/build/llvm-release_$LLVM \ | ||
-DLIBUNWIND_ENABLE_SHARED=0 \ | ||
-DCMAKE_C_COMPILER=$CC \ | ||
-DCMAKE_CXX_COMPILER=$CXX \ | ||
-DCMAKE_C_FLAGS="$CFLAGS" \ | ||
-DCMAKE_CXX_FLAGS="$CXXFLAGS" | ||
|
||
hide_output make -j$(nproc) | ||
cp lib/libunwind.a $OUTPUT/$TARGET/lib | ||
cd - && rm -rf libunwind-build | ||
|
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 was deleted.
Oops, something went wrong.
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,16 @@ | ||
//! The alloc Prelude | ||
//! | ||
//! The purpose of this module is to alleviate imports of commonly-used | ||
//! items of the `alloc` crate by adding a glob import to the top of modules: | ||
//! | ||
//! ``` | ||
//! # #![allow(unused_imports)] | ||
//! # #![feature(alloc)] | ||
//! #![feature(alloc_prelude)] | ||
//! extern crate alloc; | ||
//! use alloc::prelude::v1::*; | ||
//! ``` | ||
|
||
#![unstable(feature = "alloc_prelude", issue = "58935")] | ||
|
||
pub mod v1; |
Oops, something went wrong.