File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,14 @@ jobs:
70
70
run : rustup target install aarch64-apple-darwin
71
71
- name : Fetch upstream LLVM/clang snapshot
72
72
run : |
73
- wget -O clang+llvm-12 .0.0 -x86_64-apple-darwin.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-12 .0.0 /clang+llvm-12 .0.0 -x86_64-apple-darwin.tar.xz
74
- if [ "$(shasum -a 256 clang+llvm-12 .0.0 -x86_64-apple-darwin.tar.xz | awk '{ print $1 }')" != "7bc2259bf75c003f644882460fc8e844ddb23b27236fe43a2787870a4cd8ab50 " ]; then
73
+ wget -O clang+llvm-15 .0.3 -x86_64-apple-darwin.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-15 .0.3 /clang+llvm-15 .0.3 -x86_64-apple-darwin.tar.xz
74
+ if [ "$(shasum -a 256 clang+llvm-15 .0.3 -x86_64-apple-darwin.tar.xz | awk '{ print $1 }')" != "ac668586b2b3d068f1e43520a3ef0b1592e5dc3eff1a4a4b772e29803b428a69 " ]; then
75
75
echo "Bad hash"
76
76
exit 1
77
77
fi
78
78
- name : Unpack upstream LLVM+clang and use it by default
79
79
run : |
80
- tar xvvf clang+llvm-12 .0.0 -x86_64-apple-darwin.tar.xz
80
+ tar xvvf clang+llvm-15 .0.3 -x86_64-apple-darwin.tar.xz
81
81
- name : Checkout source code
82
82
uses : actions/checkout@v2
83
83
with :
93
93
run : ./genbindings.sh ./rust-lightning true
94
94
- name : Rebuild bindings using upstream clang, and check the sample app builds + links
95
95
run : |
96
- export PATH=`pwd`/clang+llvm-12 .0.0 -x86_64-apple-darwin/bin:$PATH
96
+ export PATH=`pwd`/clang+llvm-15 .0.3 -x86_64-apple-darwin/bin:$PATH
97
97
CC=clang ./genbindings.sh ./rust-lightning true
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ if [ "$2" = "true" ]; then
338
338
strip ./a.out
339
339
echo " C++ Bin size and runtime w/o optimization:"
340
340
ls -lha a.out
341
- time ./a.out > /dev/null
341
+ ./a.out > /dev/null
342
342
fi
343
343
344
344
# Then, check with memory sanitizer, if we're on Linux and have rustc nightly
492
492
strip ./a.out
493
493
echo " C++ Bin size and runtime with only RL (LTO) optimized:"
494
494
ls -lha a.out
495
- time ./a.out > /dev/null
495
+ ./a.out > /dev/null
496
496
497
497
if [ " $CLANGPP " != " " ]; then
498
498
# If we can use cross-language LTO, use it for building C dependencies (i.e. libsecp256k1) as well
@@ -559,11 +559,12 @@ if [ "$CLANGPP" != "" -a "$LLD" != "" ]; then
559
559
CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS=" $RUSTFLAGS -C embed-bitcode=yes -C linker-plugin-lto -C lto -C linker=$CLANG $LINK_ARG_FLAGS -C link-arg=-march=sandybridge -C link-arg=-mcpu=sandybridge -C link-arg=-mtune=sandybridge" cargo build $CARGO_BUILD_ARGS -v --release
560
560
561
561
if [ " $2 " = " true" ]; then
562
- $CLANGPP $LOCAL_CFLAGS -flto -fuse-ld=$LLD -O2 demo.cpp target/release/libldk.a -ldl
562
+ $CLANGPP $LOCAL_CFLAGS -flto -fuse-ld=$LLD -O2 -c demo.cpp -o demo.o
563
+ $CLANGPP $LOCAL_CFLAGS -flto -fuse-ld=$LLD -Wl,--lto-O2 -Wl,-O2 -O2 demo.o target/release/libldk.a -ldl
563
564
strip ./a.out
564
565
echo " C++ Bin size and runtime with cross-language LTO:"
565
566
ls -lha a.out
566
- time ./a.out > /dev/null
567
+ ./a.out > /dev/null
567
568
fi
568
569
fi
569
570
else
You can’t perform that action at this time.
0 commit comments