Skip to content

Commit 6e8cc28

Browse files
committed
---
yaml --- r: 235999 b: refs/heads/stable c: 1f80880 h: refs/heads/master i: 235997: 5038b3d 235995: 899109e 235991: 52eb315 235983: 7e841ed 235967: 029c54d v: v3
1 parent 88cee85 commit 6e8cc28

File tree

420 files changed

+10612
-11811
lines changed

Some content is hidden

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

420 files changed

+10612
-11811
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: 56bb9ed8054c4774c52c8799c78787154ac4cd84
32+
refs/heads/stable: 1f80880467c6bab0903b7790c9b40a3d4c92a47c
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
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
911
*.woff binary

branches/stable/configure

Lines changed: 46 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ opt_core() {
283283
fi
284284
done
285285
else
286-
if [ -n "$META" ]
286+
if [ ! -z "$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 [ -n "$VV" ]
320+
if [ ! -z "$VV" ]
321321
then
322322
putvar $V
323323
fi
@@ -601,9 +601,7 @@ 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 (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"
604+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
607605
valopt release-channel "dev" "the name of the release channel to build"
608606
valopt musl-root "/usr/local" "MUSL root installation directory"
609607

@@ -769,7 +767,7 @@ probe CFG_LLDB lldb
769767
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
770768
# installed. Since `javac` is only used if `antlr4` is available,
771769
# probe for it only in this case.
772-
if [ -n "$CFG_ANTLR4" ]
770+
if [ ! -z "$CFG_ANTLR4" ]
773771
then
774772
probe CFG_JAVAC javac
775773
fi
@@ -788,14 +786,14 @@ then
788786
fi
789787
fi
790788

791-
if [ -n "$CFG_GDB" ]
789+
if [ ! -z "$CFG_GDB" ]
792790
then
793791
# Store GDB's version
794792
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
795793
putvar CFG_GDB_VERSION
796794
fi
797795

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

822820
probe CFG_ADB adb
823821

824-
if [ -n "$CFG_PANDOC" ]
822+
if [ ! -z "$CFG_PANDOC" ]
825823
then
826824
# Extract "MAJOR MINOR" from Pandoc's version number
827825
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -847,7 +845,7 @@ then
847845
BIN_SUF=.exe
848846
fi
849847

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

933931
# Okay, at this point, we have made up our minds about whether we are
934932
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
935-
if [ -n "$CFG_ENABLE_CLANG" ]
933+
if [ ! -z "$CFG_ENABLE_CLANG" ]
936934
then
937935
putvar CFG_ENABLE_CLANG
938936
fi
939937

940938
# Same with jemalloc. save the setting here.
941-
if [ -n "$CFG_DISABLE_JEMALLOC" ]
939+
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
942940
then
943941
putvar CFG_DISABLE_JEMALLOC
944942
fi
945943

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

@@ -972,7 +970,7 @@ fi
972970
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
973971
# running such safeguards.
974972

975-
if [ -n "$CC" ]
973+
if [ ! -z "$CC" ]
976974
then
977975
msg "skipping compiler inference steps; using provided CC=$CC"
978976
CFG_CC="$CC"
@@ -985,7 +983,7 @@ then
985983
putvar CFG_USING_CLANG
986984
fi
987985
else
988-
if [ -n "$CFG_ENABLE_CLANG" ]
986+
if [ ! -z "$CFG_ENABLE_CLANG" ]
989987
then
990988
if [ -z "$CFG_CLANG" ]
991989
then
@@ -999,21 +997,23 @@ else
999997
fi
1000998
fi
1001999

1002-
if [ -n "$CFG_ENABLE_CLANG" ]
1000+
if [ ! -z "$CFG_ENABLE_CLANG" ]
10031001
then
10041002
case "$CC" in
10051003
(''|*clang)
10061004
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
10071005

1008-
if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
1006+
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
1007+
then
10091008
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
1010-
elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
1009+
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
1010+
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 [ -n "$CFG_OSX_CLANG_VERSION" ]
1016+
if [ ! -z "$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 [ -n "$CFG_ENABLE_CCACHE" ]
1045+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10461046
then
10471047
if [ -z "$CFG_CCACHE" ]
10481048
then
@@ -1112,24 +1112,20 @@ do
11121112
fi
11131113

11141114
case $i in
1115-
*android*)
1116-
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1117-
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1118-
if [ -z "$ndk" ]
1115+
arm-linux-androideabi)
1116+
1117+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
11191118
then
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)"
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 ]
1126+
then
1127+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
11231128
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
11331129
;;
11341130

11351131
arm-apple-darwin)
@@ -1181,13 +1177,8 @@ do
11811177
# INCLUDE and LIB variables for MSVC so we can set those in the
11821178
# build system as well.
11831179
install=$(reg QUERY \
1184-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
1180+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
11851181
-v InstallDir)
1186-
if [ -z "$install" ]; then
1187-
install=$(reg QUERY \
1188-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1189-
-v InstallDir)
1190-
fi
11911182
need_ok "couldn't find visual studio install root"
11921183
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11931184
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1208,7 +1199,7 @@ do
12081199
;;
12091200
esac
12101201
bindir="${CFG_MSVC_ROOT}/VC/bin"
1211-
if [ -n "$msvc_part" ]; then
1202+
if [ ! -z "$msvc_part" ]; then
12121203
bindir="$bindir/$msvc_part"
12131204
fi
12141205
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1238,7 +1229,7 @@ do
12381229
esac
12391230
done
12401231

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

13501341
# Disable submodules that we're not using
1351-
if [ -n "${CFG_LLVM_ROOT}" ]; then
1342+
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
13521343
msg "git: submodule deinit src/llvm"
13531344
"${CFG_GIT}" submodule deinit src/llvm
13541345
fi
1355-
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
1346+
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
13561347
msg "git: submodule deinit src/jemalloc"
13571348
"${CFG_GIT}" submodule deinit src/jemalloc
13581349
fi
@@ -1399,7 +1390,7 @@ do
13991390
if [ -z $CFG_LLVM_ROOT ]
14001391
then
14011392
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1402-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1393+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
14031394
then
14041395
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
14051396
# Just use LLVM straight from its build directory to
@@ -1455,7 +1446,7 @@ do
14551446
msg "configuring LLVM for $t with cmake"
14561447

14571448
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1458-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1449+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14591450
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14601451
else
14611452
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1469,22 +1460,12 @@ do
14691460

14701461
msg "configuring LLVM with:"
14711462
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
14831463
case "$t" in
14841464
x86_64-*)
1485-
generator="$generator Win64"
1465+
generator="Visual Studio 12 2013 Win64"
14861466
;;
14871467
i686-*)
1468+
generator="Visual Studio 12 2013"
14881469
;;
14891470
*)
14901471
err "can only build LLVM for x86 platforms"
@@ -1557,7 +1538,7 @@ do
15571538

15581539
(*)
15591540
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1560-
if [ -n "$CFG_ENABLE_CCACHE" ]
1541+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
15611542
then
15621543
if [ -z "$CFG_CCACHE" ]
15631544
then
@@ -1686,26 +1667,25 @@ putvar CFG_HOST
16861667
putvar CFG_TARGET
16871668
putvar CFG_LIBDIR_RELATIVE
16881669
putvar CFG_DISABLE_MANAGE_SUBMODULES
1689-
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1690-
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1670+
putvar CFG_ANDROID_CROSS_PATH
16911671
putvar CFG_MANDIR
16921672

16931673
# Avoid spurious warnings from clang by feeding it original source on
16941674
# ccache-miss rather than preprocessed input.
1695-
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
1675+
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
16961676
then
16971677
CFG_CCACHE_CPP2=1
16981678
putvar CFG_CCACHE_CPP2
16991679
fi
17001680

1701-
if [ -n "$CFG_ENABLE_CCACHE" ]
1681+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
17021682
then
17031683
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
17041684
putvar CFG_CCACHE_BASEDIR
17051685
fi
17061686

17071687

1708-
if [ -n $BAD_PANDOC ]
1688+
if [ ! -z $BAD_PANDOC ]
17091689
then
17101690
CFG_PANDOC=
17111691
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_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
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
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_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
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
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ 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
5766
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
5867
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
5968

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

6877
RT_OUTPUT_DIR_$(1) := $(1)/rt
6978

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+
7087
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
7188
@mkdir -p $$(@D)
7289
@$$(call E, compile: $$@)
@@ -105,6 +122,7 @@ define THIRD_PARTY_LIB
105122
OBJS_$(2)_$(1) := $$(NATIVE_DEPS_$(2)_$(1):%=$$(RT_OUTPUT_DIR_$(1))/%)
106123
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.c=.o)
107124
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.cpp=.o)
125+
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.ll=.o)
108126
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.S=.o)
109127
NATIVE_$(2)_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),$(2))
110128
$$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1)): $$(OBJS_$(2)_$(1))

0 commit comments

Comments
 (0)