Skip to content

Commit 658e402

Browse files
committed
---
yaml --- r: 226261 b: refs/heads/snap-stage3 c: 68fc2d9 h: refs/heads/master i: 226259: a818ec6 v: v3
1 parent fc3383d commit 658e402

File tree

247 files changed

+7061
-2232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+7061
-2232
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: e5d90d98402475b6e154ce216f9efcb80da1a747
3-
refs/heads/snap-stage3: b345437c3c1f73cc5c97544f07ab327abe86a2ed
3+
refs/heads/snap-stage3: 68fc2d98d547a7045e918b03117c740179addb77
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/configure

Lines changed: 64 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ opt_core() {
283283
fi
284284
done
285285
else
286-
if [ ! -z "$META" ]
286+
if [ -n "$META" ]
287287
then
288288
OP="$OP=<$META>"
289289
fi
@@ -317,7 +317,7 @@ envopt() {
317317
fi
318318

319319
# If script or environment provided a value, save it.
320-
if [ ! -z "$VV" ]
320+
if [ -n "$VV" ]
321321
then
322322
putvar $V
323323
fi
@@ -601,7 +601,9 @@ valopt llvm-root "" "set LLVM root"
601601
valopt python "" "set path to python"
602602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
604+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
605+
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
606+
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
605607
valopt release-channel "dev" "the name of the release channel to build"
606608
valopt musl-root "/usr/local" "MUSL root installation directory"
607609

@@ -767,7 +769,7 @@ probe CFG_LLDB lldb
767769
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
768770
# installed. Since `javac` is only used if `antlr4` is available,
769771
# probe for it only in this case.
770-
if [ ! -z "$CFG_ANTLR4" ]
772+
if [ -n "$CFG_ANTLR4" ]
771773
then
772774
probe CFG_JAVAC javac
773775
fi
@@ -786,14 +788,14 @@ then
786788
fi
787789
fi
788790

789-
if [ ! -z "$CFG_GDB" ]
791+
if [ -n "$CFG_GDB" ]
790792
then
791793
# Store GDB's version
792794
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
793795
putvar CFG_GDB_VERSION
794796
fi
795797

796-
if [ ! -z "$CFG_LLDB" ]
798+
if [ -n "$CFG_LLDB" ]
797799
then
798800
# Store LLDB's version
799801
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
@@ -819,7 +821,7 @@ step_msg "looking for target specific programs"
819821

820822
probe CFG_ADB adb
821823

822-
if [ ! -z "$CFG_PANDOC" ]
824+
if [ -n "$CFG_PANDOC" ]
823825
then
824826
# Extract "MAJOR MINOR" from Pandoc's version number
825827
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -845,7 +847,7 @@ then
845847
BIN_SUF=.exe
846848
fi
847849

848-
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
850+
if [ -n "$CFG_ENABLE_LOCAL_RUST" ]
849851
then
850852
system_rustc=$(which rustc)
851853
if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
@@ -930,18 +932,18 @@ fi
930932

931933
# Okay, at this point, we have made up our minds about whether we are
932934
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
933-
if [ ! -z "$CFG_ENABLE_CLANG" ]
935+
if [ -n "$CFG_ENABLE_CLANG" ]
934936
then
935937
putvar CFG_ENABLE_CLANG
936938
fi
937939

938940
# Same with jemalloc. save the setting here.
939-
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
941+
if [ -n "$CFG_DISABLE_JEMALLOC" ]
940942
then
941943
putvar CFG_DISABLE_JEMALLOC
942944
fi
943945

944-
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
946+
if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
945947
then
946948
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
947949

@@ -970,7 +972,7 @@ fi
970972
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
971973
# running such safeguards.
972974

973-
if [ ! -z "$CC" ]
975+
if [ -n "$CC" ]
974976
then
975977
msg "skipping compiler inference steps; using provided CC=$CC"
976978
CFG_CC="$CC"
@@ -983,7 +985,7 @@ then
983985
putvar CFG_USING_CLANG
984986
fi
985987
else
986-
if [ ! -z "$CFG_ENABLE_CLANG" ]
988+
if [ -n "$CFG_ENABLE_CLANG" ]
987989
then
988990
if [ -z "$CFG_CLANG" ]
989991
then
@@ -997,7 +999,7 @@ else
997999
fi
9981000
fi
9991001

1000-
if [ ! -z "$CFG_ENABLE_CLANG" ]
1002+
if [ -n "$CFG_ENABLE_CLANG" ]
10011003
then
10021004
case "$CC" in
10031005
(''|*clang)
@@ -1013,7 +1015,7 @@ then
10131015
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10141016
fi
10151017

1016-
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
1018+
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10171019
then
10181020
case $CFG_OSX_CLANG_VERSION in
10191021
(7.0*)
@@ -1042,7 +1044,7 @@ then
10421044
esac
10431045
fi
10441046

1045-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1047+
if [ -n "$CFG_ENABLE_CCACHE" ]
10461048
then
10471049
if [ -z "$CFG_CCACHE" ]
10481050
then
@@ -1112,20 +1114,24 @@ do
11121114
fi
11131115

11141116
case $i in
1115-
arm-linux-androideabi)
1116-
1117-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
1118-
then
1119-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc not found"
1120-
fi
1121-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ ]
1122-
then
1123-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ not found"
1124-
fi
1125-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar ]
1117+
*android*)
1118+
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1119+
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1120+
if [ -z "$ndk" ]
11261121
then
1127-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
1122+
ndk=$CFG_ANDROID_CROSS_PATH
1123+
eval "CFG_${upper_snake_target}_NDK"=$CFG_ANDROID_CROSS_PATH
1124+
warn "generic/default Android NDK option is deprecated (use --$i-ndk option instead)"
11281125
fi
1126+
1127+
# Perform a basic sanity check of the NDK
1128+
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1129+
do
1130+
if [ ! -f $android_ndk_tool ]
1131+
then
1132+
err "NDK tool $android_ndk_tool not found (bad or missing --$i-ndk option?)"
1133+
fi
1134+
done
11291135
;;
11301136

11311137
arm-apple-darwin)
@@ -1177,8 +1183,13 @@ do
11771183
# INCLUDE and LIB variables for MSVC so we can set those in the
11781184
# build system as well.
11791185
install=$(reg QUERY \
1180-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1186+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11811187
-v InstallDir)
1188+
if [ -z "$install" ]; then
1189+
install=$(reg QUERY \
1190+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1191+
-v InstallDir)
1192+
fi
11821193
need_ok "couldn't find visual studio install root"
11831194
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11841195
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1199,7 +1210,7 @@ do
11991210
;;
12001211
esac
12011212
bindir="${CFG_MSVC_ROOT}/VC/bin"
1202-
if [ ! -z "$msvc_part" ]; then
1213+
if [ -n "$msvc_part" ]; then
12031214
bindir="$bindir/$msvc_part"
12041215
fi
12051216
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1229,7 +1240,7 @@ do
12291240
esac
12301241
done
12311242

1232-
if [ ! -z "$CFG_PERF" ]
1243+
if [ -n "$CFG_PERF" ]
12331244
then
12341245
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12351246
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1339,11 +1350,11 @@ then
13391350
"${CFG_GIT}" submodule init
13401351

13411352
# Disable submodules that we're not using
1342-
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
1353+
if [ -n "${CFG_LLVM_ROOT}" ]; then
13431354
msg "git: submodule deinit src/llvm"
13441355
"${CFG_GIT}" submodule deinit src/llvm
13451356
fi
1346-
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
1357+
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
13471358
msg "git: submodule deinit src/jemalloc"
13481359
"${CFG_GIT}" submodule deinit src/jemalloc
13491360
fi
@@ -1390,7 +1401,7 @@ do
13901401
if [ -z $CFG_LLVM_ROOT ]
13911402
then
13921403
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1393-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1404+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
13941405
then
13951406
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
13961407
# Just use LLVM straight from its build directory to
@@ -1446,7 +1457,7 @@ do
14461457
msg "configuring LLVM for $t with cmake"
14471458

14481459
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1449-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1460+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14501461
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14511462
else
14521463
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1460,12 +1471,22 @@ do
14601471

14611472
msg "configuring LLVM with:"
14621473
msg "$CMAKE_ARGS"
1474+
case "$CFG_MSVC_ROOT" in
1475+
*14.0*)
1476+
generator="Visual Studio 14 2015"
1477+
;;
1478+
*12.0*)
1479+
generator="Visual Studio 12 2013"
1480+
;;
1481+
*)
1482+
err "can't determine generator for LLVM cmake"
1483+
;;
1484+
esac
14631485
case "$t" in
14641486
x86_64-*)
1465-
generator="Visual Studio 12 2013 Win64"
1487+
generator="$generator Win64"
14661488
;;
14671489
i686-*)
1468-
generator="Visual Studio 12 2013"
14691490
;;
14701491
*)
14711492
err "can only build LLVM for x86 platforms"
@@ -1538,7 +1559,7 @@ do
15381559

15391560
(*)
15401561
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1541-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1562+
if [ -n "$CFG_ENABLE_CCACHE" ]
15421563
then
15431564
if [ -z "$CFG_CCACHE" ]
15441565
then
@@ -1667,25 +1688,26 @@ putvar CFG_HOST
16671688
putvar CFG_TARGET
16681689
putvar CFG_LIBDIR_RELATIVE
16691690
putvar CFG_DISABLE_MANAGE_SUBMODULES
1670-
putvar CFG_ANDROID_CROSS_PATH
1691+
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1692+
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
16711693
putvar CFG_MANDIR
16721694

16731695
# Avoid spurious warnings from clang by feeding it original source on
16741696
# ccache-miss rather than preprocessed input.
1675-
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
1697+
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
16761698
then
16771699
CFG_CCACHE_CPP2=1
16781700
putvar CFG_CCACHE_CPP2
16791701
fi
16801702

1681-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1703+
if [ -n "$CFG_ENABLE_CCACHE" ]
16821704
then
16831705
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
16841706
putvar CFG_CCACHE_BASEDIR
16851707
fi
16861708

16871709

1688-
if [ ! -z $BAD_PANDOC ]
1710+
if [ -n $BAD_PANDOC ]
16891711
then
16901712
CFG_PANDOC=
16911713
putvar CFG_PANDOC

branches/snap-stage3/mk/cfg/aarch64-linux-android.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# aarch64-linux-android configuration
22
# CROSS_PREFIX_aarch64-linux-android-
3-
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
4-
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
5-
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
6-
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
3+
CC_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc
4+
CXX_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-g++
5+
CPP_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc -E
6+
AR_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-ar
77
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
88
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
99
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so

branches/snap-stage3/mk/cfg/arm-linux-androideabi.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# arm-linux-androideabi configuration
2-
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
3-
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
4-
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E
5-
AR_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar
2+
CC_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc
3+
CXX_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-g++
4+
CPP_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc -E
5+
AR_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-ar
66
CFG_LIB_NAME_arm-linux-androideabi=lib$(1).so
77
CFG_STATIC_LIB_NAME_arm-linux-androideabi=lib$(1).a
88
CFG_LIB_GLOB_arm-linux-androideabi=lib$(1)-*.so

branches/snap-stage3/src/doc/reference.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,9 @@ always been designed to be compiled. For these reasons, this section assumes a
591591
compiler.
592592

593593
Rust's semantics obey a *phase distinction* between compile-time and
594-
run-time.[^phase-distinction] Those semantic rules that have a *static
595-
interpretation* govern the success or failure of compilation. Those semantics
594+
run-time.[^phase-distinction] Semantic rules that have a *static
595+
interpretation* govern the success or failure of compilation, while
596+
semantic rules
596597
that have a *dynamic interpretation* govern the behavior of the program at
597598
run-time.
598599

@@ -1636,6 +1637,10 @@ The type of a function declared in an extern block is `extern "abi" fn(A1, ...,
16361637
An) -> R`, where `A1...An` are the declared types of its arguments and `R` is
16371638
the declared return type.
16381639

1640+
It is valid to add the `link` attribute on an empty extern block. You can use
1641+
this to satisfy the linking requirements of extern blocks elsewhere in your code
1642+
(including upstream crates) instead of adding the attribute to each extern block.
1643+
16391644
## Visibility and Privacy
16401645

16411646
These two terms are often used interchangeably, and what they are attempting to
@@ -2364,6 +2369,8 @@ The currently implemented features of the reference compiler are:
23642369
internally without imposing on callers
23652370
(i.e. making them behave like function calls in
23662371
terms of encapsulation).
2372+
* - `default_type_parameter_fallback` - Allows type parameter defaults to
2373+
influence type inference.
23672374

23682375
If a feature is promoted to a language feature, then all existing programs will
23692376
start to receive compilation warnings about `#![feature]` directives which enabled

branches/snap-stage3/src/doc/rust.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ a > code {
221221
color: #428BCA;
222222
}
223223

224+
.section-header > a > code {
225+
color: #8D1A38;
226+
}
227+
224228
/* Code highlighting */
225229
pre.rust .kw { color: #8959A8; }
226230
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }

0 commit comments

Comments
 (0)