summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-03-02 17:58:27 +0000
committerPavel Labath <labath@google.com>2016-03-02 17:58:27 +0000
commit435a0e2e73a6a79ecf2d9737410814780c0c6a9b (patch)
tree3aff5725d8d4171f7ba838db41e3829c123a17c4
parent475056006c3814688aef730813ada4d21524aa1e (diff)
downloadwindows-x86-435a0e2e73a6a79ecf2d9737410814780c0c6a9b.tar.gz
Reapply "Prebuilts built with MSVC2015"
This reverts commit 475056006c3814688aef730813ada4d21524aa1e. Change-Id: Ie0e0e288f88c09ad8ea3f27b5c9da513165cc5cf
-rwxr-xr-xDebug/libglog.dllbin227328 -> 241664 bytes
-rwxr-xr-xDebug/libglog.expbin32030 -> 33184 bytes
-rwxr-xr-xDebug/libglog.ilkbin927972 -> 941220 bytes
-rwxr-xr-xDebug/libglog.libbin50698 -> 52586 bytes
-rwxr-xr-xDebug/libglog.pdbbin1404928 -> 1519616 bytes
-rwxr-xr-xDebug/libglog_static.libbin1533894 -> 1394124 bytes
-rwxr-xr-xDebug/libglog_static.pdbbin0 -> 602112 bytes
-rwxr-xr-xDebug/logging_unittest.exebin333312 -> 352256 bytes
-rwxr-xr-xDebug/logging_unittest.ilkbin1118052 -> 1167964 bytes
-rwxr-xr-xDebug/logging_unittest.pdbbin1798144 -> 1986560 bytes
-rwxr-xr-xDebug/logging_unittest_static.exebin412160 -> 431616 bytes
-rwxr-xr-xDebug/logging_unittest_static.ilkbin1368540 -> 1371728 bytes
-rwxr-xr-xDebug/logging_unittest_static.pdbbin2142208 -> 2306048 bytes
-rwxr-xr-xRelease/libglog.dllbin76800 -> 78336 bytes
-rwxr-xr-xRelease/libglog.expbin32032 -> 33186 bytes
-rwxr-xr-xRelease/libglog.iobjbin0 -> 924700 bytes
-rwxr-xr-xRelease/libglog.ipdbbin0 -> 238240 bytes
-rwxr-xr-xRelease/libglog.libbin50698 -> 52586 bytes
-rwxr-xr-xRelease/libglog.pdbbin880640 -> 1126400 bytes
-rwxr-xr-xRelease/libglog_static.libbin5374554 -> 5020334 bytes
-rwxr-xr-xRelease/logging_unittest.exebin95232 -> 98304 bytes
-rwxr-xr-xRelease/logging_unittest.iobjbin0 -> 1461432 bytes
-rwxr-xr-xRelease/logging_unittest.ipdbbin0 -> 342176 bytes
-rwxr-xr-xRelease/logging_unittest.pdbbin1019904 -> 1314816 bytes
-rwxr-xr-xRelease/logging_unittest_static.exebin139264 -> 138752 bytes
-rwxr-xr-xRelease/logging_unittest_static.iobjbin0 -> 1929782 bytes
-rwxr-xr-xRelease/logging_unittest_static.ipdbbin0 -> 448240 bytes
-rwxr-xr-xRelease/logging_unittest_static.pdbbin1200128 -> 1568768 bytes
-rwxr-xr-xbuild-common.sh114
-rwxr-xr-xbuild-glog.sh7
-rw-r--r--glog.patches36
31 files changed, 109 insertions, 48 deletions
diff --git a/Debug/libglog.dll b/Debug/libglog.dll
index ff20b7a..838eff2 100755
--- a/Debug/libglog.dll
+++ b/Debug/libglog.dll
Binary files differ
diff --git a/Debug/libglog.exp b/Debug/libglog.exp
index 158b995..23eca20 100755
--- a/Debug/libglog.exp
+++ b/Debug/libglog.exp
Binary files differ
diff --git a/Debug/libglog.ilk b/Debug/libglog.ilk
index 2a3e82c..032ea0e 100755
--- a/Debug/libglog.ilk
+++ b/Debug/libglog.ilk
Binary files differ
diff --git a/Debug/libglog.lib b/Debug/libglog.lib
index da3f5f1..a478437 100755
--- a/Debug/libglog.lib
+++ b/Debug/libglog.lib
Binary files differ
diff --git a/Debug/libglog.pdb b/Debug/libglog.pdb
index 5190d31..bbc70d9 100755
--- a/Debug/libglog.pdb
+++ b/Debug/libglog.pdb
Binary files differ
diff --git a/Debug/libglog_static.lib b/Debug/libglog_static.lib
index 5409dd5..a235d50 100755
--- a/Debug/libglog_static.lib
+++ b/Debug/libglog_static.lib
Binary files differ
diff --git a/Debug/libglog_static.pdb b/Debug/libglog_static.pdb
new file mode 100755
index 0000000..459e88b
--- /dev/null
+++ b/Debug/libglog_static.pdb
Binary files differ
diff --git a/Debug/logging_unittest.exe b/Debug/logging_unittest.exe
index c9e3f1b..0db5a9d 100755
--- a/Debug/logging_unittest.exe
+++ b/Debug/logging_unittest.exe
Binary files differ
diff --git a/Debug/logging_unittest.ilk b/Debug/logging_unittest.ilk
index 96fde5c..b800f70 100755
--- a/Debug/logging_unittest.ilk
+++ b/Debug/logging_unittest.ilk
Binary files differ
diff --git a/Debug/logging_unittest.pdb b/Debug/logging_unittest.pdb
index 345d59d..fd7eee5 100755
--- a/Debug/logging_unittest.pdb
+++ b/Debug/logging_unittest.pdb
Binary files differ
diff --git a/Debug/logging_unittest_static.exe b/Debug/logging_unittest_static.exe
index fc27067..f8e061e 100755
--- a/Debug/logging_unittest_static.exe
+++ b/Debug/logging_unittest_static.exe
Binary files differ
diff --git a/Debug/logging_unittest_static.ilk b/Debug/logging_unittest_static.ilk
index bc4445d..35c4ebd 100755
--- a/Debug/logging_unittest_static.ilk
+++ b/Debug/logging_unittest_static.ilk
Binary files differ
diff --git a/Debug/logging_unittest_static.pdb b/Debug/logging_unittest_static.pdb
index 204defb..68ecd73 100755
--- a/Debug/logging_unittest_static.pdb
+++ b/Debug/logging_unittest_static.pdb
Binary files differ
diff --git a/Release/libglog.dll b/Release/libglog.dll
index c6f472f..fba2b5b 100755
--- a/Release/libglog.dll
+++ b/Release/libglog.dll
Binary files differ
diff --git a/Release/libglog.exp b/Release/libglog.exp
index 8ddad28..da329b6 100755
--- a/Release/libglog.exp
+++ b/Release/libglog.exp
Binary files differ
diff --git a/Release/libglog.iobj b/Release/libglog.iobj
new file mode 100755
index 0000000..e61f338
--- /dev/null
+++ b/Release/libglog.iobj
Binary files differ
diff --git a/Release/libglog.ipdb b/Release/libglog.ipdb
new file mode 100755
index 0000000..5f18d6c
--- /dev/null
+++ b/Release/libglog.ipdb
Binary files differ
diff --git a/Release/libglog.lib b/Release/libglog.lib
index 2b46801..0c04494 100755
--- a/Release/libglog.lib
+++ b/Release/libglog.lib
Binary files differ
diff --git a/Release/libglog.pdb b/Release/libglog.pdb
index 3614f69..67a77a3 100755
--- a/Release/libglog.pdb
+++ b/Release/libglog.pdb
Binary files differ
diff --git a/Release/libglog_static.lib b/Release/libglog_static.lib
index 3d06fc9..8fec134 100755
--- a/Release/libglog_static.lib
+++ b/Release/libglog_static.lib
Binary files differ
diff --git a/Release/logging_unittest.exe b/Release/logging_unittest.exe
index 56f00bc..fd57b8b 100755
--- a/Release/logging_unittest.exe
+++ b/Release/logging_unittest.exe
Binary files differ
diff --git a/Release/logging_unittest.iobj b/Release/logging_unittest.iobj
new file mode 100755
index 0000000..9a3fbf2
--- /dev/null
+++ b/Release/logging_unittest.iobj
Binary files differ
diff --git a/Release/logging_unittest.ipdb b/Release/logging_unittest.ipdb
new file mode 100755
index 0000000..9347a84
--- /dev/null
+++ b/Release/logging_unittest.ipdb
Binary files differ
diff --git a/Release/logging_unittest.pdb b/Release/logging_unittest.pdb
index e05ed09..f645d6a 100755
--- a/Release/logging_unittest.pdb
+++ b/Release/logging_unittest.pdb
Binary files differ
diff --git a/Release/logging_unittest_static.exe b/Release/logging_unittest_static.exe
index 762055e..1de0efd 100755
--- a/Release/logging_unittest_static.exe
+++ b/Release/logging_unittest_static.exe
Binary files differ
diff --git a/Release/logging_unittest_static.iobj b/Release/logging_unittest_static.iobj
new file mode 100755
index 0000000..2a1dbc4
--- /dev/null
+++ b/Release/logging_unittest_static.iobj
Binary files differ
diff --git a/Release/logging_unittest_static.ipdb b/Release/logging_unittest_static.ipdb
new file mode 100755
index 0000000..eb00c56
--- /dev/null
+++ b/Release/logging_unittest_static.ipdb
Binary files differ
diff --git a/Release/logging_unittest_static.pdb b/Release/logging_unittest_static.pdb
index 74be1c4..916bd0c 100755
--- a/Release/logging_unittest_static.pdb
+++ b/Release/logging_unittest_static.pdb
Binary files differ
diff --git a/build-common.sh b/build-common.sh
index 70c3a70..1ab2249 100755
--- a/build-common.sh
+++ b/build-common.sh
@@ -4,27 +4,69 @@
# inputs
# $PROJ - project name
# $VER - project version
-# $1 - name of this file
+# $1 - (temporary) output directory
+# $2 - build directory for build artefacts
+# $3 - build number
#
# this file does the following:
#
# 1) define the following env vars
# OS - linux|darwin|windows
-# USER - username
# CORES - numer of cores (for parallel builds)
# PATH (with appropriate compilers)
# CFLAGS/CXXFLAGS/LDFLAGS
# RD - root directory for source and object files
-# INSTALL - install directory/git repo root
+# INSTALL - install directory
# SCRIPT_FILE - absolute path to the parent build script
# SCRIPT_DIR - absolute path to the parent build script's directory
# COMMON_FILE - absolute path to this file
-# 2) create an empty tmp directory at /tmp/$PROJ-$USER
-# 3) checkout the destination git repo to /tmp/prebuilts/$PROJ/$OS-x86/$VER
-# 4) cd $RD
+# 2) cd $RD
+#
+# after placing all your build products into $INSTALL you should call finalize_build to produce
+# the final build artifact
+
+# exit on error
+set -e
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[1]}")" && pwd -P)"
+SCRIPT_FILE="$SCRIPT_DIR/$(basename "${BASH_SOURCE[1]}")"
+COMMON_FILE="$SCRIPT_DIR/$(basename "${BASH_SOURCE[0]}")"
+
+# calculate the root directory from the script path
+# this script lives three directories down from the root
+# external/lldb-utils/prebuilts/build-common.sh
+ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd -P)"
+cd "$ROOT_DIR"
+
+function die() {
+ echo "$*" > /dev/stderr
+ echo "Usage: $0 <out_dir> <dest_dir> <build_number>" > /dev/stderr
+ exit 1
+}
+
+(($# > 3)) && die "[$0] Unknown parameter: $4"
+
+OUT="$1"
+DEST="$2"
+BNUM="$3"
+
+[ ! "$OUT" ] && die "## Error: Missing out folder"
+[ ! "$DEST" ] && die "## Error: Missing destination folder"
+[ ! "$BNUM" ] && die "## Error: Missing build number"
+
+mkdir -p "$OUT" "$DEST"
+OUT="$(cd "$OUT" && pwd -P)"
+DEST="$(cd "$DEST" && pwd -P)"
+
+cat <<END_INFO
+## Building $PROJ ##
+## Out Dir : $OUT
+## Dest Dir : $DEST
+## Build Num: $BNUM
+
+END_INFO
UNAME="$(uname)"
-SCRATCH=/tmp
UPSTREAM=sso://googleplex-android/platform/prebuilts
case "$UNAME" in
Linux)
@@ -38,14 +80,19 @@ Darwin)
export CXX=$CC++
export CFLAGS="$CFLAGS -mmacosx-version-min=$OSX_MIN"
export CXXFLAGS="$CXXFLAGS -mmacosx-version-min=$OSX_MIN -stdlib=libc++"
+ export LDFLAGS="$LDFLAGS -mmacosx-version-min=$OSX_MIN"
INSTALL_VER=$VER
;;
*_NT-*)
- USER=$USERNAME
OS='windows'
CORES=$NUMBER_OF_PROCESSORS
- # VS2013 x64 Native Tools Command Prompt
case "$MSVS" in
+ 2015)
+ devenv() {
+ cmd /c "${VS140COMNTOOLS}VsDevCmd.bat" '&' devenv.com "$@"
+ }
+ INSTALL_VER=${VER}_${MSVS}
+ ;;
2013)
devenv() {
cmd /c "${VS120COMNTOOLS}VsDevCmd.bat" '&' devenv.com "$@"
@@ -65,18 +112,9 @@ Darwin)
;;
esac
-RD=$SCRATCH/$PROJ-$USER
+RD=$OUT/$PROJ
INSTALL="$RD/install"
-# OSX lacks a "realpath" bash command
-realpath() {
- [[ "$1" == /* ]] && echo "$1" || echo "$PWD/${1#./}"
-}
-
-SCRIPT_FILE=$(realpath "$0")
-SCRIPT_DIR="$(dirname "$SCRIPT_FILE")"
-COMMON_FILE="$SCRIPT_DIR/$1"
-
cd /tmp # windows can't delete if you're in the dir
rm -rf $RD
mkdir -p $INSTALL
@@ -86,44 +124,30 @@ cd $RD
# clone prebuilt gcc
case "$OS" in
linux)
- CLANG_DIR=$RD/clang
+ # can't get prebuilt clang working so we're using host clang-3.5 https://b/22748915
+ #CLANG_DIR=$RD/clang
+ #git clone $UPSTREAM/clang/linux-x86/host/3.6 $CLANG_DIR
+ #export CC="$CLANG_DIR/bin/clang"
+ #export CXX="$CC++"
+ export CC=clang-3.5
+ export CXX=clang++-3.5
+
GCC_DIR=$RD/gcc
- git clone $UPSTREAM/clang/linux-x86/host/3.6 $CLANG_DIR
git clone $UPSTREAM/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 $GCC_DIR
find "$GCC_DIR" -name x86_64-linux -exec ln -fns {} {}-gnu \;
- export CC="$CLANG_DIR/bin/clang"
- export CXX="$CC++"
FLAGS+=(-fuse-ld=gold)
FLAGS+=(--gcc-toolchain="$GCC_DIR")
FLAGS+=(--sysroot "$GCC_DIR/sysroot")
FLAGS+=(-B"$GCC_DIR/bin/x86_64-linux-")
export CFLAGS="$CFLAGS ${FLAGS[*]}"
export CXXFLAGS="$CXXFLAGS ${FLAGS[*]}"
+ export LDFLAGS="$LDFLAGS -m64"
;;
esac
-commit_and_push()
-{
- BRANCH=studio-master-dev
- # check into a local git clone
- rm -rf $SCRATCH/prebuilts/$PROJ/
- mkdir -p $SCRATCH/prebuilts/$PROJ/
- cd $SCRATCH/prebuilts/$PROJ/
- git clone $UPSTREAM/$PROJ/$OS-x86 -b $BRANCH
- GIT_REPO="$SCRATCH/prebuilts/$PROJ/$OS-x86"
- cd $GIT_REPO
- rm -rf *
- mv $INSTALL/* $GIT_REPO
- cp $SCRIPT_FILE $GIT_REPO
- cp $COMMON_FILE $GIT_REPO
-
- git add .
- git commit -m "Adding binaries for $INSTALL_VER"
-
- # execute this command to upload
- #git push origin HEAD:refs/for/$BRANCH
-
- rm -rf $RD
+function finalize_build() {
+ cp "$SCRIPT_FILE" "$COMMON_FILE" "$INSTALL"
+ (cd "$INSTALL" && zip --symlinks -r "$DEST/$PROJ-$BNUM.zip" .)
}
diff --git a/build-glog.sh b/build-glog.sh
index a8802e4..2439ad8 100755
--- a/build-glog.sh
+++ b/build-glog.sh
@@ -8,9 +8,9 @@
PROJ=libglog
VER=0.3.4
-MSVS=2013
+MSVS=2015
-source $(dirname "$0")/build-common.sh build-common.sh
+source "$(dirname "${BASH_SOURCE[0]}")/build-common.sh" "$@"
BASE=${PROJ#lib}-$VER
TGZ=v${VER}.tar.gz
@@ -19,6 +19,7 @@ curl -L https://github.com/google/glog/archive/$TGZ -o $TGZ
tar xzf $TGZ || cat $TGZ # if this fails, we're probably getting an http error
cd $BASE
+patch -p3 <"$SCRIPT_DIR/glog.patches"
case "$OS" in
windows)
devenv google-glog.sln /Upgrade
@@ -45,4 +46,4 @@ case "$OS" in
;;
esac
-commit_and_push
+finalize_build
diff --git a/glog.patches b/glog.patches
new file mode 100644
index 0000000..cf6977a
--- /dev/null
+++ b/glog.patches
@@ -0,0 +1,36 @@
+diff -aur OUTa/libglog/glog-0.3.4/src/windows/port.cc OUT/libglog/glog-0.3.4/src/windows/port.cc
+--- OUTa/libglog/glog-0.3.4/src/windows/port.cc 2015-03-10 21:02:27.000000000 -0700
++++ OUT/libglog/glog-0.3.4/src/windows/port.cc 2016-02-04 06:39:15.020941800 -0800
+@@ -36,6 +36,7 @@
+ # error You should only be including windows/port.cc in a windows environment!
+ #endif
+
++#if !defined(_MSC_VER) || _MSC_VER < 1900
+ #include "config.h"
+ #include <stdarg.h> // for va_list, va_start, va_end
+ #include <string.h> // for strstr()
+@@ -62,3 +63,4 @@
+ va_end(ap);
+ return r;
+ }
++#endif
+\ No newline at end of file
+diff -aur OUTa/libglog/glog-0.3.4/src/windows/port.h OUT/libglog/glog-0.3.4/src/windows/port.h
+--- OUTa/libglog/glog-0.3.4/src/windows/port.h 2015-03-10 21:02:27.000000000 -0700
++++ OUT/libglog/glog-0.3.4/src/windows/port.h 2016-02-04 06:46:29.038741800 -0800
+@@ -107,6 +107,7 @@
+ /* Sleep is in ms, on windows */
+ #define sleep(secs) Sleep((secs) * 1000)
+
++#if _MSC_VER < 1900
+ /* We can't just use _vsnprintf and _snprintf as drop-in-replacements,
+ * because they don't always NUL-terminate. :-( We also can't use the
+ * name vsnprintf, since windows defines that (but not snprintf (!)).
+@@ -117,6 +118,7 @@
+ const char *format, va_list ap);
+ #define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap)
+ #define va_copy(dst, src) (dst) = (src)
++#endif // _MSC_VER < 1900
+
+ /* Windows doesn't support specifying the number of buckets as a
+ * hash_map constructor arg, so we leave this blank.