Skip to content

Commit f193fb8

Browse files
committed
Keep track (log) build configurations
1 parent f7fbed1 commit f193fb8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

xcode/LDK/build-libldk.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ set -e # stop execution upon the first error
1414

1515
C_BINDINGS_SOURCE_DIRECTORY="$(cd ${LDK_DIRECTORY}; pwd)/lightning-c-bindings"
1616

17+
BASEDIR=$(dirname "$0")
18+
BUILD_LOG_PATH="${BASEDIR}/build_libldk.log"
19+
20+
# echo -n "" > $BUILD_LOG_PATH
21+
touch $BUILD_LOG_PATH
22+
23+
echo "\n\nPlatform name: ${PLATFORM_NAME}" >> $BUILD_LOG_PATH
24+
echo "Configuration: ${CONFIGURATION}" >> $BUILD_LOG_PATH
25+
echo "LLVM Target Triple Suffix: ${LLVM_TARGET_TRIPLE_SUFFIX}" >> $BUILD_LOG_PATH
26+
1727
if [[ ${ACTION:-build} = "build" || $ACTION = "install" ]]; then
1828
TARGET_NAME="libldk"
1929

@@ -36,6 +46,7 @@ if [[ ${ACTION:-build} = "build" || $ACTION = "install" ]]; then
3646
# Clean any pre-existing static libraries that doesn't align with what we're currently trying to build
3747
for ARCH in $ARCHS
3848
do
49+
echo "Current Architecture: ${ARCH}" >> $BUILD_LOG_PATH
3950
if [[ $(lipo -info "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}" 2>&1) != *"${ARCH}"* ]]; then
4051
rm -f "${BUILT_PRODUCTS_DIR}/${TARGET_NAME}"
4152
fi
@@ -58,6 +69,7 @@ if [[ ${ACTION:-build} = "build" || $ACTION = "install" ]]; then
5869
EXECUTABLES=()
5970
for ARCH in $ARCHS
6071
do
72+
echo "CURRENT ARCHITECTURE: ${ARCH}"
6173
RUST_ARCH=$ARCH
6274
if [[ $RUST_ARCH = "arm64" ]]; then
6375
RUST_ARCH="aarch64"

xcode/build-libldk-manual.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ fi
2424
set -e # stop execution upon the first error
2525

2626
C_BINDINGS_SOURCE_DIRECTORY="$(cd ${LDK_DIRECTORY}; pwd)/lightning-c-bindings"
27-
BUILT_PRODUCTS_DIR="`pwd`/binaries" # directory to copy the shared library and headers into
27+
28+
BASEDIR=$(dirname "$0")
29+
BUILT_PRODUCTS_DIR="${BASEDIR}/binaries" # directory to copy the shared library and headers into
2830

2931

3032
TARGET_NAME="libldk"

0 commit comments

Comments
 (0)