aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-11-27 14:04:40 +0100
committerSven Gothel <[email protected]>2022-11-27 14:04:40 +0100
commit5998a10ae6d20704569a4c4f4de35dd78d4ca163 (patch)
tree33626c0bc0f2468d5fbb960486d53f0467352463 /scripts
parentcc49c8bf94b5b9b557cb2caf7b379df0660604af (diff)
clang-tidy fixes part-1
Details - Use 'size_type' instead of 'int', propagate same 'size_type' into 'darray' etc. - Use 'std::make_shared', 'std::make_unique' - Use range-based for loops - Remove redundant 'virtual', use 'override' in derived classes - Use 'nullptr' - Use default impl for dtor, ctor (incomplete) - Use copy and std::move (incomplete) - Explcitly catch std::bad_alloc in 'new' in 'noexcept' -> 'abort' - 'abort' was issued implicitly in noexcept methods - L2CAPServer, L2CAPClient, NopGattServerHandler, DBGattServerHandler, FwdGattServerHandler - Use local close_impl(), usable in virtual destructor - L2CAPClient::read, HCIComm::read - preset 'poll' result 'n', avoid garbage comparison - BTAdapter::enableListening - loop through addMgmtEventCallback() result - JNI code - explicit size_type is cast to jsize or jint w/o check - unchanged semantics
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-cross.sh2
-rw-r--r--scripts/build.sh8
-rw-r--r--scripts/rebuild.sh8
3 files changed, 15 insertions, 3 deletions
diff --git a/scripts/build-cross.sh b/scripts/build-cross.sh
index 4632f4fd..efae547e 100755
--- a/scripts/build-cross.sh
+++ b/scripts/build-cross.sh
@@ -2,7 +2,7 @@
#
# sudo mkdir -p /mnt/arm64
-# sudo mount /data/diskimages/RaspiArm64LightDev-1.2-rw-deb11-arm64-litexdev.root-ext4.img /mnt/arm64
+# sudo mount /data/diskimages/RaspiArm64LightDev-1.3-rw-deb11-arm64-litexdev.root-ext4.img /mnt/arm64
# scripts/build-cross.sh /mnt/arm64
#
# sudo mkdir -p /mnt/arm32
diff --git a/scripts/build.sh b/scripts/build.sh
index 856273d8..6ed0f8bf 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -17,6 +17,12 @@ export LC_MEASUREMENT=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
+if ! type time &> /dev/null ; then
+ time_cmd=""
+else
+ time_cmd="time"
+fi
+
buildit() {
if [ -z "$JAVA_HOME" -o ! -e "$JAVA_HOME" ] ; then
echo "WARNING: JAVA_HOME $JAVA_HOME does not exist"
@@ -55,7 +61,7 @@ buildit() {
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TRIAL=ON -DDEBUG=ON -DINSTRUMENTATION=ON ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TRIAL=ON -DDEBUG=ON -DINSTRUMENTATION_UNDEFINED=ON ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TRIAL=ON -DDEBUG=ON -DINSTRUMENTATION_THREAD=ON ..
- time make -j $CPU_COUNT install
+ ${time_cmd} make -j $CPU_COUNT install
if [ $? -eq 0 ] ; then
echo "BUILD SUCCESS $bname $os_name $archabi"
cd $rootdir
diff --git a/scripts/rebuild.sh b/scripts/rebuild.sh
index 91ed854b..fd5d6c00 100644
--- a/scripts/rebuild.sh
+++ b/scripts/rebuild.sh
@@ -15,6 +15,12 @@ CPU_COUNT=`getconf _NPROCESSORS_ONLN`
export LANG=en_US.UTF-8
export LC_MEASUREMENT=en_US.UTF-8
+if ! type time &> /dev/null ; then
+ time_cmd=""
+else
+ time_cmd="time"
+fi
+
buildit() {
if [ -z "$JAVA_HOME" -o ! -e "$JAVA_HOME" ] ; then
echo "WARNING: JAVA_HOME $JAVA_HOME does not exist"
@@ -31,7 +37,7 @@ buildit() {
echo build_dir $build_dir
cd $rootdir/$build_dir
- make -j $CPU_COUNT install
+ ${time_cmd} make -j $CPU_COUNT install
if [ $? -eq 0 ] ; then
echo "REBUILD SUCCESS $bname $os_name $archabi"
cd $rootdir