Skip to content

Commit 778f824

Browse files
committed
---
yaml --- r: 235933 b: refs/heads/stable c: ba9224f h: refs/heads/master i: 235931: df2c4fd v: v3
1 parent 8ba2e34 commit 778f824

File tree

90 files changed

+1630
-554
lines changed

Some content is hidden

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

90 files changed

+1630
-554
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: e24423091f0690a83e63ee234bee5627a86b51f0
32+
refs/heads/stable: ba9224f35451e5d5ef7647bd2b40e5da80ce2735
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/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/stable/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/stable/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/stable/src/doc/trpl/choosing-your-guarantees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The main guarantee provided here is that the data will not be destroyed until al
8181
are out of scope.
8282

8383
This should be used when we wish to dynamically allocate and share some data (read-only) between
84-
various portions of yur program, where it is not certain which portion will finish using the pointer
84+
various portions of your program, where it is not certain which portion will finish using the pointer
8585
last. It's a viable alternative to `&T` when `&T` is either impossible to statically check for
8686
correctness, or creates extremely unergonomic code where the programmer does not wish to spend the
8787
development cost of working with.

0 commit comments

Comments
 (0)