Skip to content

Commit 738c7a2

Browse files
committed
---
yaml --- r: 236131 b: refs/heads/stable c: db2af71 h: refs/heads/master i: 236129: 8ab6f26 236127: ba315be v: v3
1 parent 1548472 commit 738c7a2

File tree

490 files changed

+17541
-10678
lines changed

Some content is hidden

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

490 files changed

+17541
-10678
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: 22e21004582902cc1b7d1bef89d09728cbe64ca2
32+
refs/heads/stable: db2af71d59ee1577d1a7c5b8d9c65e1301b870ca
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
9-
src/rt/msvc/* -whitespace
10-
src/rt/valgrind/* -whitespace
119
*.woff binary

branches/stable/configure

Lines changed: 83 additions & 50 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,12 +317,23 @@ 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
324324
}
325325

326+
enable_if_not_disabled() {
327+
local OP=$1
328+
local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
329+
local ENAB_V="CFG_ENABLE_$UOP"
330+
local EXPLICITLY_DISABLED="CFG_DISABLE_${UOP}_PROVIDED"
331+
eval VV=\$$EXPLICITLY_DISABLED
332+
if [ -z "$VV" ]; then
333+
eval $ENAB_V=1
334+
fi
335+
}
336+
326337
to_llvm_triple() {
327338
case $1 in
328339
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -590,7 +601,9 @@ valopt llvm-root "" "set LLVM root"
590601
valopt python "" "set path to python"
591602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
592603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
593-
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"
594607
valopt release-channel "dev" "the name of the release channel to build"
595608
valopt musl-root "/usr/local" "MUSL root installation directory"
596609

@@ -671,10 +684,12 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
671684
CFG_DISABLE_OPTIMIZE=1
672685
CFG_DISABLE_OPTIMIZE_CXX=1
673686
fi
674-
CFG_ENABLE_DEBUG_ASSERTIONS=1
675-
CFG_ENABLE_DEBUG_JEMALLOC=1
676-
CFG_ENABLE_DEBUGINFO=1
677-
CFG_ENABLE_LLVM_ASSERTIONS=1
687+
688+
# Set following variables to 1 unless setting already provided
689+
enable_if_not_disabled debug-assertions
690+
enable_if_not_disabled debug-jemalloc
691+
enable_if_not_disabled debuginfo
692+
enable_if_not_disabled llvm-assertions
678693
fi
679694

680695
# OK, now write the debugging options
@@ -754,7 +769,7 @@ probe CFG_LLDB lldb
754769
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
755770
# installed. Since `javac` is only used if `antlr4` is available,
756771
# probe for it only in this case.
757-
if [ ! -z "$CFG_ANTLR4" ]
772+
if [ -n "$CFG_ANTLR4" ]
758773
then
759774
probe CFG_JAVAC javac
760775
fi
@@ -773,14 +788,14 @@ then
773788
fi
774789
fi
775790

776-
if [ ! -z "$CFG_GDB" ]
791+
if [ -n "$CFG_GDB" ]
777792
then
778793
# Store GDB's version
779794
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
780795
putvar CFG_GDB_VERSION
781796
fi
782797

783-
if [ ! -z "$CFG_LLDB" ]
798+
if [ -n "$CFG_LLDB" ]
784799
then
785800
# Store LLDB's version
786801
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
@@ -806,7 +821,7 @@ step_msg "looking for target specific programs"
806821

807822
probe CFG_ADB adb
808823

809-
if [ ! -z "$CFG_PANDOC" ]
824+
if [ -n "$CFG_PANDOC" ]
810825
then
811826
# Extract "MAJOR MINOR" from Pandoc's version number
812827
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -832,7 +847,7 @@ then
832847
BIN_SUF=.exe
833848
fi
834849

835-
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
850+
if [ -n "$CFG_ENABLE_LOCAL_RUST" ]
836851
then
837852
system_rustc=$(which rustc)
838853
if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
@@ -917,18 +932,18 @@ fi
917932

918933
# Okay, at this point, we have made up our minds about whether we are
919934
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
920-
if [ ! -z "$CFG_ENABLE_CLANG" ]
935+
if [ -n "$CFG_ENABLE_CLANG" ]
921936
then
922937
putvar CFG_ENABLE_CLANG
923938
fi
924939

925940
# Same with jemalloc. save the setting here.
926-
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
941+
if [ -n "$CFG_DISABLE_JEMALLOC" ]
927942
then
928943
putvar CFG_DISABLE_JEMALLOC
929944
fi
930945

931-
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" ]
932947
then
933948
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
934949

@@ -957,7 +972,7 @@ fi
957972
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
958973
# running such safeguards.
959974

960-
if [ ! -z "$CC" ]
975+
if [ -n "$CC" ]
961976
then
962977
msg "skipping compiler inference steps; using provided CC=$CC"
963978
CFG_CC="$CC"
@@ -970,7 +985,7 @@ then
970985
putvar CFG_USING_CLANG
971986
fi
972987
else
973-
if [ ! -z "$CFG_ENABLE_CLANG" ]
988+
if [ -n "$CFG_ENABLE_CLANG" ]
974989
then
975990
if [ -z "$CFG_CLANG" ]
976991
then
@@ -984,23 +999,21 @@ else
984999
fi
9851000
fi
9861001

987-
if [ ! -z "$CFG_ENABLE_CLANG" ]
1002+
if [ -n "$CFG_ENABLE_CLANG" ]
9881003
then
9891004
case "$CC" in
9901005
(''|*clang)
9911006
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
9921007

993-
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
994-
then
1008+
if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
9951009
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
996-
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
997-
then
1010+
elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
9981011
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
9991012
else
10001013
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10011014
fi
10021015

1003-
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
1016+
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10041017
then
10051018
case $CFG_OSX_CLANG_VERSION in
10061019
(7.0*)
@@ -1029,7 +1042,7 @@ then
10291042
esac
10301043
fi
10311044

1032-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1045+
if [ -n "$CFG_ENABLE_CCACHE" ]
10331046
then
10341047
if [ -z "$CFG_CCACHE" ]
10351048
then
@@ -1099,20 +1112,24 @@ do
10991112
fi
11001113

11011114
case $i in
1102-
arm-linux-androideabi)
1103-
1104-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
1105-
then
1106-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc not found"
1107-
fi
1108-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ ]
1109-
then
1110-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ not found"
1111-
fi
1112-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar ]
1115+
*android*)
1116+
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1117+
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1118+
if [ -z "$ndk" ]
11131119
then
1114-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
1120+
ndk=$CFG_ANDROID_CROSS_PATH
1121+
eval "CFG_${upper_snake_target}_NDK"=$CFG_ANDROID_CROSS_PATH
1122+
warn "generic/default Android NDK option is deprecated (use --$i-ndk option instead)"
11151123
fi
1124+
1125+
# Perform a basic sanity check of the NDK
1126+
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1127+
do
1128+
if [ ! -f $android_ndk_tool ]
1129+
then
1130+
err "NDK tool $android_ndk_tool not found (bad or missing --$i-ndk option?)"
1131+
fi
1132+
done
11161133
;;
11171134

11181135
arm-apple-darwin)
@@ -1164,8 +1181,13 @@ do
11641181
# INCLUDE and LIB variables for MSVC so we can set those in the
11651182
# build system as well.
11661183
install=$(reg QUERY \
1167-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1184+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11681185
-v InstallDir)
1186+
if [ -z "$install" ]; then
1187+
install=$(reg QUERY \
1188+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1189+
-v InstallDir)
1190+
fi
11691191
need_ok "couldn't find visual studio install root"
11701192
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11711193
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1186,7 +1208,7 @@ do
11861208
;;
11871209
esac
11881210
bindir="${CFG_MSVC_ROOT}/VC/bin"
1189-
if [ ! -z "$msvc_part" ]; then
1211+
if [ -n "$msvc_part" ]; then
11901212
bindir="$bindir/$msvc_part"
11911213
fi
11921214
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1216,7 +1238,7 @@ do
12161238
esac
12171239
done
12181240

1219-
if [ ! -z "$CFG_PERF" ]
1241+
if [ -n "$CFG_PERF" ]
12201242
then
12211243
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12221244
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1326,11 +1348,11 @@ then
13261348
"${CFG_GIT}" submodule init
13271349

13281350
# Disable submodules that we're not using
1329-
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
1351+
if [ -n "${CFG_LLVM_ROOT}" ]; then
13301352
msg "git: submodule deinit src/llvm"
13311353
"${CFG_GIT}" submodule deinit src/llvm
13321354
fi
1333-
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
1355+
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
13341356
msg "git: submodule deinit src/jemalloc"
13351357
"${CFG_GIT}" submodule deinit src/jemalloc
13361358
fi
@@ -1377,7 +1399,7 @@ do
13771399
if [ -z $CFG_LLVM_ROOT ]
13781400
then
13791401
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1380-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1402+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
13811403
then
13821404
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
13831405
# Just use LLVM straight from its build directory to
@@ -1433,7 +1455,7 @@ do
14331455
msg "configuring LLVM for $t with cmake"
14341456

14351457
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1436-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1458+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14371459
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14381460
else
14391461
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1447,12 +1469,22 @@ do
14471469

14481470
msg "configuring LLVM with:"
14491471
msg "$CMAKE_ARGS"
1472+
case "$CFG_MSVC_ROOT" in
1473+
*14.0*)
1474+
generator="Visual Studio 14 2015"
1475+
;;
1476+
*12.0*)
1477+
generator="Visual Studio 12 2013"
1478+
;;
1479+
*)
1480+
err "can't determine generator for LLVM cmake"
1481+
;;
1482+
esac
14501483
case "$t" in
14511484
x86_64-*)
1452-
generator="Visual Studio 12 2013 Win64"
1485+
generator="$generator Win64"
14531486
;;
14541487
i686-*)
1455-
generator="Visual Studio 12 2013"
14561488
;;
14571489
*)
14581490
err "can only build LLVM for x86 platforms"
@@ -1525,7 +1557,7 @@ do
15251557

15261558
(*)
15271559
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1528-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1560+
if [ -n "$CFG_ENABLE_CCACHE" ]
15291561
then
15301562
if [ -z "$CFG_CCACHE" ]
15311563
then
@@ -1654,25 +1686,26 @@ putvar CFG_HOST
16541686
putvar CFG_TARGET
16551687
putvar CFG_LIBDIR_RELATIVE
16561688
putvar CFG_DISABLE_MANAGE_SUBMODULES
1657-
putvar CFG_ANDROID_CROSS_PATH
1689+
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1690+
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
16581691
putvar CFG_MANDIR
16591692

16601693
# Avoid spurious warnings from clang by feeding it original source on
16611694
# ccache-miss rather than preprocessed input.
1662-
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
1695+
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
16631696
then
16641697
CFG_CCACHE_CPP2=1
16651698
putvar CFG_CCACHE_CPP2
16661699
fi
16671700

1668-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1701+
if [ -n "$CFG_ENABLE_CCACHE" ]
16691702
then
16701703
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
16711704
putvar CFG_CCACHE_BASEDIR
16721705
fi
16731706

16741707

1675-
if [ ! -z $BAD_PANDOC ]
1708+
if [ -n $BAD_PANDOC ]
16761709
then
16771710
CFG_PANDOC=
16781711
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

0 commit comments

Comments
 (0)