Skip to content

Commit d963407

Browse files
author
Mark Buer
committed
---
yaml --- r: 235930 b: refs/heads/stable c: 33a7e67 h: refs/heads/master v: v3
1 parent 596be48 commit d963407

File tree

295 files changed

+2845
-10062
lines changed

Some content is hidden

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

295 files changed

+2845
-10062
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: 661a5ad38e79f336976b529aa717871d177ab7ed
32+
refs/heads/stable: 33a7e67904a500b11973a197f53a0a47501baa48
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: 53 additions & 74 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,23 +317,12 @@ 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
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-
337326
to_llvm_triple() {
338327
case $1 in
339328
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -601,7 +590,9 @@ valopt llvm-root "" "set LLVM root"
601590
valopt python "" "set path to python"
602591
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603592
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
593+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
594+
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
595+
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
605596
valopt release-channel "dev" "the name of the release channel to build"
606597
valopt musl-root "/usr/local" "MUSL root installation directory"
607598

@@ -682,12 +673,10 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
682673
CFG_DISABLE_OPTIMIZE=1
683674
CFG_DISABLE_OPTIMIZE_CXX=1
684675
fi
685-
686-
# Set following variables to 1 unless setting already provided
687-
enable_if_not_disabled debug-assertions
688-
enable_if_not_disabled debug-jemalloc
689-
enable_if_not_disabled debuginfo
690-
enable_if_not_disabled llvm-assertions
676+
CFG_ENABLE_DEBUG_ASSERTIONS=1
677+
CFG_ENABLE_DEBUG_JEMALLOC=1
678+
CFG_ENABLE_DEBUGINFO=1
679+
CFG_ENABLE_LLVM_ASSERTIONS=1
691680
fi
692681

693682
# OK, now write the debugging options
@@ -767,7 +756,7 @@ probe CFG_LLDB lldb
767756
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
768757
# installed. Since `javac` is only used if `antlr4` is available,
769758
# probe for it only in this case.
770-
if [ -n "$CFG_ANTLR4" ]
759+
if [ ! -z "$CFG_ANTLR4" ]
771760
then
772761
probe CFG_JAVAC javac
773762
fi
@@ -786,14 +775,14 @@ then
786775
fi
787776
fi
788777

789-
if [ -n "$CFG_GDB" ]
778+
if [ ! -z "$CFG_GDB" ]
790779
then
791780
# Store GDB's version
792781
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
793782
putvar CFG_GDB_VERSION
794783
fi
795784

796-
if [ -n "$CFG_LLDB" ]
785+
if [ ! -z "$CFG_LLDB" ]
797786
then
798787
# Store LLDB's version
799788
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
@@ -819,7 +808,7 @@ step_msg "looking for target specific programs"
819808

820809
probe CFG_ADB adb
821810

822-
if [ -n "$CFG_PANDOC" ]
811+
if [ ! -z "$CFG_PANDOC" ]
823812
then
824813
# Extract "MAJOR MINOR" from Pandoc's version number
825814
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -845,7 +834,7 @@ then
845834
BIN_SUF=.exe
846835
fi
847836

848-
if [ -n "$CFG_ENABLE_LOCAL_RUST" ]
837+
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
849838
then
850839
system_rustc=$(which rustc)
851840
if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
@@ -930,18 +919,18 @@ fi
930919

931920
# Okay, at this point, we have made up our minds about whether we are
932921
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
933-
if [ -n "$CFG_ENABLE_CLANG" ]
922+
if [ ! -z "$CFG_ENABLE_CLANG" ]
934923
then
935924
putvar CFG_ENABLE_CLANG
936925
fi
937926

938927
# Same with jemalloc. save the setting here.
939-
if [ -n "$CFG_DISABLE_JEMALLOC" ]
928+
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
940929
then
941930
putvar CFG_DISABLE_JEMALLOC
942931
fi
943932

944-
if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
933+
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
945934
then
946935
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
947936

@@ -970,7 +959,7 @@ fi
970959
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
971960
# running such safeguards.
972961

973-
if [ -n "$CC" ]
962+
if [ ! -z "$CC" ]
974963
then
975964
msg "skipping compiler inference steps; using provided CC=$CC"
976965
CFG_CC="$CC"
@@ -983,7 +972,7 @@ then
983972
putvar CFG_USING_CLANG
984973
fi
985974
else
986-
if [ -n "$CFG_ENABLE_CLANG" ]
975+
if [ ! -z "$CFG_ENABLE_CLANG" ]
987976
then
988977
if [ -z "$CFG_CLANG" ]
989978
then
@@ -997,7 +986,7 @@ else
997986
fi
998987
fi
999988

1000-
if [ -n "$CFG_ENABLE_CLANG" ]
989+
if [ ! -z "$CFG_ENABLE_CLANG" ]
1001990
then
1002991
case "$CC" in
1003992
(''|*clang)
@@ -1013,7 +1002,7 @@ then
10131002
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10141003
fi
10151004

1016-
if [ -n "$CFG_OSX_CLANG_VERSION" ]
1005+
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
10171006
then
10181007
case $CFG_OSX_CLANG_VERSION in
10191008
(7.0*)
@@ -1042,7 +1031,7 @@ then
10421031
esac
10431032
fi
10441033

1045-
if [ -n "$CFG_ENABLE_CCACHE" ]
1034+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10461035
then
10471036
if [ -z "$CFG_CCACHE" ]
10481037
then
@@ -1112,20 +1101,24 @@ do
11121101
fi
11131102

11141103
case $i in
1115-
arm-linux-androideabi)
1116-
1117-
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
1104+
*android*)
1105+
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1106+
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1107+
if [ -z "$ndk" ]
11181108
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 ]
1126-
then
1127-
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
1109+
ndk=$CFG_ANDROID_CROSS_PATH
1110+
eval "CFG_${upper_snake_target}_NDK"=$CFG_ANDROID_CROSS_PATH
1111+
warn "generic/default Android NDK option is deprecated (use --$i-ndk option instead)"
11281112
fi
1113+
1114+
# Perform a basic sanity check of the NDK
1115+
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1116+
do
1117+
if [ ! -f $android_ndk_tool ]
1118+
then
1119+
err "NDK tool $android_ndk_tool not found (bad or missing --$i-ndk option?)"
1120+
fi
1121+
done
11291122
;;
11301123

11311124
arm-apple-darwin)
@@ -1177,13 +1170,8 @@ do
11771170
# INCLUDE and LIB variables for MSVC so we can set those in the
11781171
# build system as well.
11791172
install=$(reg QUERY \
1180-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
1173+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
11811174
-v InstallDir)
1182-
if [ -z "$install" ]; then
1183-
install=$(reg QUERY \
1184-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1185-
-v InstallDir)
1186-
fi
11871175
need_ok "couldn't find visual studio install root"
11881176
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11891177
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1204,7 +1192,7 @@ do
12041192
;;
12051193
esac
12061194
bindir="${CFG_MSVC_ROOT}/VC/bin"
1207-
if [ -n "$msvc_part" ]; then
1195+
if [ ! -z "$msvc_part" ]; then
12081196
bindir="$bindir/$msvc_part"
12091197
fi
12101198
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1234,7 +1222,7 @@ do
12341222
esac
12351223
done
12361224

1237-
if [ -n "$CFG_PERF" ]
1225+
if [ ! -z "$CFG_PERF" ]
12381226
then
12391227
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12401228
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1344,11 +1332,11 @@ then
13441332
"${CFG_GIT}" submodule init
13451333

13461334
# Disable submodules that we're not using
1347-
if [ -n "${CFG_LLVM_ROOT}" ]; then
1335+
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
13481336
msg "git: submodule deinit src/llvm"
13491337
"${CFG_GIT}" submodule deinit src/llvm
13501338
fi
1351-
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
1339+
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
13521340
msg "git: submodule deinit src/jemalloc"
13531341
"${CFG_GIT}" submodule deinit src/jemalloc
13541342
fi
@@ -1395,7 +1383,7 @@ do
13951383
if [ -z $CFG_LLVM_ROOT ]
13961384
then
13971385
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1398-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1386+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
13991387
then
14001388
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
14011389
# Just use LLVM straight from its build directory to
@@ -1451,7 +1439,7 @@ do
14511439
msg "configuring LLVM for $t with cmake"
14521440

14531441
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1454-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1442+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14551443
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14561444
else
14571445
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1465,22 +1453,12 @@ do
14651453

14661454
msg "configuring LLVM with:"
14671455
msg "$CMAKE_ARGS"
1468-
case "$CFG_MSVC_ROOT" in
1469-
*14.0*)
1470-
generator="Visual Studio 14 2015"
1471-
;;
1472-
*12.0*)
1473-
generator="Visual Studio 12 2013"
1474-
;;
1475-
*)
1476-
err "can't determine generator for LLVM cmake"
1477-
;;
1478-
esac
14791456
case "$t" in
14801457
x86_64-*)
1481-
generator="$generator Win64"
1458+
generator="Visual Studio 12 2013 Win64"
14821459
;;
14831460
i686-*)
1461+
generator="Visual Studio 12 2013"
14841462
;;
14851463
*)
14861464
err "can only build LLVM for x86 platforms"
@@ -1553,7 +1531,7 @@ do
15531531

15541532
(*)
15551533
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1556-
if [ -n "$CFG_ENABLE_CCACHE" ]
1534+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
15571535
then
15581536
if [ -z "$CFG_CCACHE" ]
15591537
then
@@ -1682,25 +1660,26 @@ putvar CFG_HOST
16821660
putvar CFG_TARGET
16831661
putvar CFG_LIBDIR_RELATIVE
16841662
putvar CFG_DISABLE_MANAGE_SUBMODULES
1685-
putvar CFG_ANDROID_CROSS_PATH
1663+
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1664+
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
16861665
putvar CFG_MANDIR
16871666

16881667
# Avoid spurious warnings from clang by feeding it original source on
16891668
# ccache-miss rather than preprocessed input.
1690-
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
1669+
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
16911670
then
16921671
CFG_CCACHE_CPP2=1
16931672
putvar CFG_CCACHE_CPP2
16941673
fi
16951674

1696-
if [ -n "$CFG_ENABLE_CCACHE" ]
1675+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
16971676
then
16981677
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
16991678
putvar CFG_CCACHE_BASEDIR
17001679
fi
17011680

17021681

1703-
if [ -n $BAD_PANDOC ]
1682+
if [ ! -z $BAD_PANDOC ]
17041683
then
17051684
CFG_PANDOC=
17061685
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)