-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bf8e94eefa074737 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool-bazel-0.26.1-linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"backup_data_uid": "bf8e94eefa074737", | ||
"backup_module_uid": "1dc07ee0f4742028", | ||
"backup_module_uoa": "package", | ||
"control": { | ||
"engine": "CK", | ||
"iso_datetime": "2020-04-03T08:26:57.472577", | ||
"version": [ | ||
"1", | ||
"12", | ||
"2" | ||
] | ||
}, | ||
"data_name": "tool-bazel-0.26.1-linux" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"customize": { | ||
"extra_dir": "", | ||
"git_src_dir": "src", | ||
"install_env": { | ||
"BAZEL_PATCH1": "javac-max-heap-500mb.patch", | ||
"BAZEL_PATCH2": "non-64bit-unix-warning.patch", | ||
"BAZEL_URL": "https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel-0.26.1-dist.zip", | ||
"BAZEL_ZIP": "bazel-0.26.1-dist.zip" | ||
}, | ||
"use_git_revision": "no", | ||
"version": "0.26.1" | ||
}, | ||
"deps": { | ||
"java-compiler": { | ||
"local": "yes", | ||
"name": "Java compiler", | ||
"sort": 10, | ||
"tags": "compiler,lang-java", | ||
"version_from": [ | ||
1, | ||
8, | ||
0, | ||
131 | ||
], | ||
"version_to": [ | ||
1, | ||
8, | ||
0, | ||
131 | ||
] | ||
} | ||
}, | ||
"end_full_path": { | ||
"linux": "install/bin/bazel" | ||
}, | ||
"need_cpu_info": "yes", | ||
"only_for_host_os_tags": [ | ||
"linux" | ||
], | ||
"only_for_target_os_tags": [ | ||
"linux" | ||
], | ||
"process_script": "install", | ||
"soft_uoa": "359f7730bd23ec60", | ||
"suggested_path": "tool-bazel", | ||
"tags": [ | ||
"tool", | ||
"bazel", | ||
"v0.26.1", | ||
"v0.26", | ||
"v0", | ||
"channel-stable" | ||
], | ||
"template": "yes", | ||
"template_type": "Bazel" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Pre-requisites: | ||
* zip (sudo apt-get install zip) | ||
* protobuf 3.6.0 or newer (pip install -U protobuf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
#! /bin/bash | ||
|
||
# | ||
# Installation script for Bazel on (AArch64) Linux platforms. | ||
# | ||
# See CK LICENSE.txt for licensing details. | ||
# See CK COPYRIGHT.txt for copyright details. | ||
# | ||
# Developer(s): | ||
# - Anton Lokhmotov, 2017. | ||
# | ||
|
||
# | ||
# NB: Implicit dependencies (not yet in metadata): | ||
# - Java SDK (but detected via soft description?) | ||
# - C++ compiler | ||
# | ||
|
||
# PACKAGE_DIR | ||
# INSTALL_DIR | ||
|
||
export BAZEL_SRC_DIR=${INSTALL_DIR}/src | ||
export BAZEL_TMP_DIR=/tmp | ||
|
||
################################################################################ | ||
export BAZEL_INSTALL_LOG=${INSTALL_DIR}/ck-install.log | ||
|
||
echo | ||
echo "Logging into '${BAZEL_INSTALL_LOG}' ..." | ||
|
||
echo "** DATE **" >> ${BAZEL_INSTALL_LOG} | ||
date >> ${BAZEL_INSTALL_LOG} | ||
|
||
echo "** SET **" >> ${BAZEL_INSTALL_LOG} | ||
set >> ${BAZEL_INSTALL_LOG} | ||
|
||
################################################################################ | ||
echo "" | ||
echo "Downloading Bazel from '${BAZEL_URL}' ..." | ||
|
||
echo "** WGET **" >> ${BAZEL_INSTALL_LOG} | ||
cd ${BAZEL_TMP_DIR} | ||
wget ${BAZEL_URL} -O ${BAZEL_ZIP} --no-check-certificate \ | ||
>> ${BAZEL_INSTALL_LOG} 2>&1 | ||
|
||
if [ "${?}" != "0" ] ; then | ||
echo "Error: Downloading Bazel from '${BAZEL_URL}' failed!" | ||
exit 1 | ||
fi | ||
|
||
################################################################################ | ||
echo "" | ||
echo "Unpacking Bazel to '${BAZEL_SRC_DIR}' ..." | ||
|
||
echo "** UNZIP **" >> ${BAZEL_INSTALL_LOG} | ||
rm -rf ${BAZEL_SRC_DIR} | ||
mkdir ${BAZEL_SRC_DIR} | ||
unzip ${BAZEL_ZIP} -d ${BAZEL_SRC_DIR} \ | ||
>> ${BAZEL_INSTALL_LOG} 2>&1 | ||
|
||
if [ "${?}" != "0" ] ; then | ||
echo "Error: Unpacking Bazel to '${BAZEL_SRC_DIR}' failed!" | ||
exit 1 | ||
fi | ||
|
||
rm ${BAZEL_ZIP} | ||
|
||
################################################################################# | ||
export MACH=$(uname -m) | ||
|
||
echo | ||
echo "Patching Bazel ..." | ||
|
||
echo "** PATCH **" >> ${BAZEL_INSTALL_LOG} | ||
# Apply patch for arm machine to prevent javac running out of heap memory. | ||
if [ "${HOSTTYPE}" == "arm" ] ; then | ||
echo "Applying patch '${BAZEL_PATCH1}' ..." | ||
cd ${BAZEL_SRC_DIR} && patch -p1 < ${PACKAGE_DIR}/${BAZEL_PATCH1} >> ${BAZEL_INSTALL_LOG} 2>&1 | ||
fi | ||
|
||
# Apply patch for 32-bit OS to convert error to warning in mapped_file.h. | ||
if [ ${CK_TARGET_CPU_BITS} == 32 ]; then | ||
echo "Applying patch '${BAZEL_PATCH2}' ..." | ||
cd ${BAZEL_SRC_DIR} && patch -p1 < ${PACKAGE_DIR}/${BAZEL_PATCH2} >> ${BAZEL_INSTALL_LOG} 2>&1 | ||
fi | ||
|
||
if [ "${?}" != "0" ] ; then | ||
echo "Error: Patching Bazel failed!" | ||
exit 1 | ||
fi | ||
|
||
################################################################################ | ||
echo "" | ||
echo "Compiling Bazel ..." | ||
|
||
echo "** COMPILE **" >> ${BAZEL_INSTALL_LOG} | ||
cd ${BAZEL_SRC_DIR} | ||
|
||
if [ "$CK_SHOW_BAZEL_OUTPUT" == "yes" ] || [ "$CK_SHOW_BAZEL_OUTPUT" == "YES" ] ; then | ||
./compile.sh | ||
else | ||
./compile.sh >> ${BAZEL_INSTALL_LOG} 2>&1 | ||
fi | ||
|
||
if [ "${?}" != "0" ] ; then | ||
echo "Error: Compiling Bazel failed!" | ||
exit 1 | ||
fi | ||
|
||
################################################################################ | ||
echo "" | ||
echo "Installing Bazel ..." | ||
|
||
echo "** INSTALL **" >> ${BAZEL_INSTALL_LOG} | ||
mkdir -p ${INSTALL_DIR}/install | ||
mkdir -p ${INSTALL_DIR}/install/bin | ||
cp ${BAZEL_SRC_DIR}/output/bazel ${INSTALL_DIR}/install/bin/ >> ${BAZEL_INSTALL_LOG} 2>&1 | ||
|
||
if [ "${?}" != "0" ] ; then | ||
echo "Error: Installing Bazel failed!" | ||
exit 1 | ||
fi | ||
|
||
############################################################################### | ||
echo "" | ||
echo "Successfully installed Bazel into '${INSTALL_DIR}'." | ||
echo |
13 changes: 13 additions & 0 deletions
13
package/tool-bazel-0.26.1-linux/javac-max-heap-500mb.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh | ||
index 494c1a1..068f62a 100755 | ||
--- a/scripts/bootstrap/compile.sh | ||
+++ b/scripts/bootstrap/compile.sh | ||
@@ -121,7 +121,7 @@ function java_compilation() { | ||
|
||
run "${JAVAC}" -classpath "${classpath}" -sourcepath "${sourcepath}" \ | ||
-d "${output}/classes" -source "$JAVA_VERSION" -target "$JAVA_VERSION" \ | ||
- -encoding UTF-8 "@${paramfile}" | ||
+ -encoding UTF-8 "@${paramfile}" -J-Xmx500M | ||
|
||
log "Extracting helper classes for $name..." | ||
for f in ${library_jars} ; do |
13 changes: 13 additions & 0 deletions
13
package/tool-bazel-0.26.1-linux/non-64bit-unix-warning.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/tools/singlejar/mapped_file.h b/src/tools/singlejar/mapped_file.h | ||
index b6c5e34..7c85b4d 100644 | ||
--- a/src/tools/singlejar/mapped_file.h | ||
+++ b/src/tools/singlejar/mapped_file.h | ||
@@ -37,7 +37,7 @@ | ||
*/ | ||
#if !((defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)) && \ | ||
__SIZEOF_POINTER__ == 8) | ||
-#error This code for 64 bit Unix. | ||
+#warning This code for 64 bit Unix. | ||
#endif | ||
|
||
class MappedFile { |