Skip to content

Commit 2ecb43e

Browse files
committed
---
yaml --- r: 236003 b: refs/heads/stable c: 6b564a6 h: refs/heads/master i: 236001: 5529efe 235999: 6e8cc28 v: v3
1 parent 82bbb17 commit 2ecb43e

File tree

419 files changed

+11795
-10572
lines changed

Some content is hidden

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

419 files changed

+11795
-10572
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: 8fee56777c2b88509e81e5e71773e1b588fee614
32+
refs/heads/stable: 6b564a663bbf753f895bf2d7d271f2adc1eb6b48
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: 66 additions & 46 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,23 +999,21 @@ 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)
10041006
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
10051007

1006-
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
1007-
then
1008+
if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
10081009
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
1009-
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
1010-
then
1010+
elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
10111011
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10121012
else
10131013
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10141014
fi
10151015

1016-
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
1016+
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10171017
then
10181018
case $CFG_OSX_CLANG_VERSION in
10191019
(7.0*)
@@ -1042,7 +1042,7 @@ then
10421042
esac
10431043
fi
10441044

1045-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1045+
if [ -n "$CFG_ENABLE_CCACHE" ]
10461046
then
10471047
if [ -z "$CFG_CCACHE" ]
10481048
then
@@ -1112,20 +1112,24 @@ do
11121112
fi
11131113

11141114
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++ ]
1115+
*android*)
1116+
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1117+
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1118+
if [ -z "$ndk" ]
11221119
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 ]
1126-
then
1127-
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)"
11281123
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
11291133
;;
11301134

11311135
arm-apple-darwin)
@@ -1177,8 +1181,13 @@ do
11771181
# INCLUDE and LIB variables for MSVC so we can set those in the
11781182
# build system as well.
11791183
install=$(reg QUERY \
1180-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1184+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11811185
-v InstallDir)
1186+
if [ -z "$install" ]; then
1187+
install=$(reg QUERY \
1188+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1189+
-v InstallDir)
1190+
fi
11821191
need_ok "couldn't find visual studio install root"
11831192
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11841193
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1199,7 +1208,7 @@ do
11991208
;;
12001209
esac
12011210
bindir="${CFG_MSVC_ROOT}/VC/bin"
1202-
if [ ! -z "$msvc_part" ]; then
1211+
if [ -n "$msvc_part" ]; then
12031212
bindir="$bindir/$msvc_part"
12041213
fi
12051214
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1229,7 +1238,7 @@ do
12291238
esac
12301239
done
12311240

1232-
if [ ! -z "$CFG_PERF" ]
1241+
if [ -n "$CFG_PERF" ]
12331242
then
12341243
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12351244
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1339,11 +1348,11 @@ then
13391348
"${CFG_GIT}" submodule init
13401349

13411350
# Disable submodules that we're not using
1342-
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
1351+
if [ -n "${CFG_LLVM_ROOT}" ]; then
13431352
msg "git: submodule deinit src/llvm"
13441353
"${CFG_GIT}" submodule deinit src/llvm
13451354
fi
1346-
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
1355+
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
13471356
msg "git: submodule deinit src/jemalloc"
13481357
"${CFG_GIT}" submodule deinit src/jemalloc
13491358
fi
@@ -1390,7 +1399,7 @@ do
13901399
if [ -z $CFG_LLVM_ROOT ]
13911400
then
13921401
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1393-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1402+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
13941403
then
13951404
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
13961405
# Just use LLVM straight from its build directory to
@@ -1446,7 +1455,7 @@ do
14461455
msg "configuring LLVM for $t with cmake"
14471456

14481457
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1449-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1458+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14501459
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14511460
else
14521461
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1460,12 +1469,22 @@ do
14601469

14611470
msg "configuring LLVM with:"
14621471
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
14631483
case "$t" in
14641484
x86_64-*)
1465-
generator="Visual Studio 12 2013 Win64"
1485+
generator="$generator Win64"
14661486
;;
14671487
i686-*)
1468-
generator="Visual Studio 12 2013"
14691488
;;
14701489
*)
14711490
err "can only build LLVM for x86 platforms"
@@ -1538,7 +1557,7 @@ do
15381557

15391558
(*)
15401559
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1541-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1560+
if [ -n "$CFG_ENABLE_CCACHE" ]
15421561
then
15431562
if [ -z "$CFG_CCACHE" ]
15441563
then
@@ -1667,25 +1686,26 @@ putvar CFG_HOST
16671686
putvar CFG_TARGET
16681687
putvar CFG_LIBDIR_RELATIVE
16691688
putvar CFG_DISABLE_MANAGE_SUBMODULES
1670-
putvar CFG_ANDROID_CROSS_PATH
1689+
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1690+
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
16711691
putvar CFG_MANDIR
16721692

16731693
# Avoid spurious warnings from clang by feeding it original source on
16741694
# ccache-miss rather than preprocessed input.
1675-
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
1695+
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
16761696
then
16771697
CFG_CCACHE_CPP2=1
16781698
putvar CFG_CCACHE_CPP2
16791699
fi
16801700

1681-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1701+
if [ -n "$CFG_ENABLE_CCACHE" ]
16821702
then
16831703
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
16841704
putvar CFG_CCACHE_BASEDIR
16851705
fi
16861706

16871707

1688-
if [ ! -z $BAD_PANDOC ]
1708+
if [ -n $BAD_PANDOC ]
16891709
then
16901710
CFG_PANDOC=
16911711
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/mk/rt.mk

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ NATIVE_DEPS_miniz_$(1) = miniz.c
5454
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5555
rust_android_dummy.c
5656
NATIVE_DEPS_rustrt_native_$(1) := arch/$$(HOST_$(1))/record_sp.S
57-
ifeq ($$(findstring msvc,$(1)),msvc)
58-
ifeq ($$(findstring i686,$(1)),i686)
59-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_32.ll
60-
else
61-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_64.ll
62-
endif
63-
else
64-
NATIVE_DEPS_rustrt_native_$(1) += rust_try.ll
65-
endif
6657
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
6758
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6859

@@ -76,14 +67,6 @@ NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
7667

7768
RT_OUTPUT_DIR_$(1) := $(1)/rt
7869

79-
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \
80-
$$(LLVM_CONFIG_$$(CFG_BUILD))
81-
@mkdir -p $$(@D)
82-
@$$(call E, compile: $$@)
83-
$$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \
84-
-filetype=obj -mtriple=$$(CFG_LLVM_TARGET_$(1)) \
85-
-relocation-model=pic -o $$@ $$<
86-
8770
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
8871
@mkdir -p $$(@D)
8972
@$$(call E, compile: $$@)
@@ -122,7 +105,6 @@ define THIRD_PARTY_LIB
122105
OBJS_$(2)_$(1) := $$(NATIVE_DEPS_$(2)_$(1):%=$$(RT_OUTPUT_DIR_$(1))/%)
123106
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.c=.o)
124107
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.cpp=.o)
125-
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.ll=.o)
126108
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.S=.o)
127109
NATIVE_$(2)_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),$(2))
128110
$$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1)): $$(OBJS_$(2)_$(1))

0 commit comments

Comments
 (0)