Skip to content

Commit 47f9f1f

Browse files
anupsdfgraydon
andcommitted
Formatted using clang-format-20
Temporarily comment out restoring cached llvm-12 builds Update Github CI to run on Ubuntu 24.04 with clang-20 i# temporarily switch to standard GHA runner since 16-core jammy runner does not have some packages parent 691b19a983be2f3b561517714a9e01a854b4e19c author anupsdf <[email protected]> 1763712854 -0800 committer anupsdf <[email protected]> 1763713191 -0800 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsVPy9QBRCNnRvXpUEUPOcP21IwMFAmkgIKcACgkQEUPOcP21 IwPyaxAAu6VD+bcJrh3ecbfseNDO9JPaH62uoVKTJn7yOX/D/nIV1XnWflvJE/c8 ulgn9nvGWVCg8qCLQ5whxuPubVJQwvhKHzBvj7tBMw2iPAV0BOkgsSB+m3wzYxXl 0fiDhWtDw21ju+d3RMu+vrag8AXJLyfOpXLF3oRRO2uzB/XKpPL7UDdE63/d7sW1 qgsY3HIhPQ9DLkEOxYw0lVZPAl+WHNFm2BU+Af7XFI29y/e/L1HYTQ6700FUJVUp AFzqWmk6zZwHOeWk3ZpRmm20beLvHfx2nJGYFe0HnfJTay1VWKW8tH3mHxpzY/lu wblB0B+SIrpOLxHJcQrxRCdQ9xyujcCcq4Pv6Y8/X8Xzn86IH9BHOd/V6CEdwrWq JxWNuyB4XWIbDvCwKExFdxmB4Fe0XBQX5Nwnbu3/II78h5jt1f9M1dQ9Y9N58xIV 2Ha9dRPYA4dKvblyrIVM7mstlASWx+XzvC80aGx22EjlgxY0uP7/rStm1uqqrIT6 23jY53jx9dySMxAKaQ1Y+Nr+zB1Ig2G5IprNGh4VW/S/mj5K/4aNi68VMLVq7p5Z hie3RGA+lT8kaCIkbcwvG9zwr5tzXjyf/g1YgG41FOR0R0wqXuLgzNlAtT6r01zq DA9kC93QgekmntExsK4AAviJHWW2xrodzkj1zEXufoz+j/0y/7c= =DES8 -----END PGP SIGNATURE----- Co-authored-by: Graydon Hoare <[email protected]> Update INSTALL.md Co-authored-by: Graydon Hoare <[email protected]>
1 parent 478a8ba commit 47f9f1f

27 files changed

+144
-141
lines changed

INSTALL.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,9 @@ We also include a script in the repository `install-rust.sh` that downloads and
8282
### Ubuntu
8383

8484
#### Ubuntu 22.04
85-
You can install the [test toolchain](#adding-the-test-toolchain) to build and run stellar-core with the latest version of the llvm toolchain.
85+
If you build Ubuntu with clang you have to use `libc++` instead of `libstdc++` when compiling.
8686

87-
Alternatively, if you want to just depend on stock Ubuntu, you will have to build with clang *and* have to use `libc++` instead of `libstdc++` when compiling.
88-
89-
Ubuntu 22.04 has clang-20 available but you have add LLVM apt repository dependency,
87+
Stock Ubuntu doesn't come packaged with clang-20, so you have add LLVM apt repository dependency for it,
9088
```zsh
9189
sudo wget -O /etc/apt/trusted.gpg.d/apt.llvm.org.asc https://apt.llvm.org/llvm-snapshot.gpg.key
9290

@@ -96,7 +94,7 @@ deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main
9694
EOF
9795
```
9896

99-
After that you can install clang-20,
97+
# install clang-20 toolchain
10098
```zsh
10199
sudo apt-get update
102100
sudo apt-get -y install clang-20 llvm-20
@@ -105,14 +103,15 @@ sudo apt-get -y install clang-20 llvm-20
105103
After installing packages, head to [building with clang and libc++](#building-with-clang-and-libc).
106104

107105

108-
#### Adding the test toolchain (optional)
106+
#### Adding gcc-14 / g++-14 from PPA (optional)
109107
```zsh
110108
# NOTE: newer version of the compilers are not
111109
# provided by stock distributions
112110
# and are provided by the /test toolchain
113111
sudo apt-get install software-properties-common
114112
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
115113
sudo apt-get update
114+
sudo apt install gcc-14 g++-14
116115
```
117116

118117
#### Installing packages
@@ -152,7 +151,7 @@ sudo apt-get install libc++-20-dev libc++abi-20-dev libclang-rt-20-dev
152151

153152
Note that installing libc++-20 via apt will uninstall all other libc++ versions.
154153

155-
Additionally, some newer Linux distros no longer package clang-format-12, and newer clang-format versions are
154+
Additionally, some newer Linux distros no longer package clang-format-20, and newer clang-format versions are
156155
not backwards compatible. To build from source, you'll need to do the following:
157156

158157
```zsh

src/bucket/BucketApplicator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ BucketApplicator::BucketApplicator(Application& app,
5757
}
5858
}
5959

60-
BucketApplicator::operator bool() const
60+
BucketApplicator::
61+
operator bool() const
6162
{
6263
// There is more work to do (i.e. (bool) *this == true) iff:
6364
// 1. The underlying bucket iterator is not EOF and

src/bucket/BucketListBase.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ BucketListDepth::operator=(uint32_t numLevels)
335335
return *this;
336336
}
337337

338-
BucketListDepth::operator uint32_t() const
338+
BucketListDepth::
339+
operator uint32_t() const
339340
{
340341
return mNumLevels;
341342
}

src/catchup/LedgerApplyManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class LedgerApplyManager
116116

117117
virtual CatchupMetrics const& getCatchupMetrics() = 0;
118118

119-
virtual ~LedgerApplyManager(){};
119+
virtual ~LedgerApplyManager() {};
120120

121121
virtual void historyArchiveStatesDownloaded(uint32_t num = 1) = 0;
122122
virtual void ledgersVerified(uint32_t num = 1) = 0;

src/herder/QuorumIntersectionChecker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class QuorumIntersectionChecker
8585
std::optional<stellar::Config> const&)> const&
8686
networkEnjoysQuorumIntersectionCB);
8787

88-
virtual ~QuorumIntersectionChecker(){};
88+
virtual ~QuorumIntersectionChecker() {};
8989
virtual bool networkEnjoysQuorumIntersection() const = 0;
9090
virtual size_t getMaxQuorumsFound() const = 0;
9191
virtual std::pair<std::vector<NodeID>, std::vector<NodeID>>

src/herder/test/TxSetTests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,7 @@ testGeneralizedTxSetXDRConversion(ProtocolVersion protocolVersion)
890890
}
891891
{
892892
INFO("built from transactions");
893-
auto getLclHeader = [&]() -> auto const&
894-
{
893+
auto getLclHeader = [&]() -> auto const& {
895894
return app->getLedgerManager().getLastClosedLedgerHeader();
896895
};
897896
std::vector<TransactionFrameBasePtr> const txs =

src/history/HistoryManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ class HistoryManager
418418
virtual void setPublicationEnabled(bool enabled) = 0;
419419
#endif
420420

421-
virtual ~HistoryManager(){};
421+
virtual ~HistoryManager() {};
422422

423423
virtual Config const& getConfig() const = 0;
424424
};

src/ledger/LedgerStateSnapshot.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ LedgerEntryWrapper::current() const
5050
}
5151
}
5252

53-
LedgerEntryWrapper::operator bool() const
53+
LedgerEntryWrapper::
54+
operator bool() const
5455
{
5556
switch (mEntry.index())
5657
{

src/ledger/LedgerTxn.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ EntryIterator::operator++()
375375
return *this;
376376
}
377377

378-
EntryIterator::operator bool() const
378+
EntryIterator::
379+
operator bool() const
379380
{
380381
return !getImpl()->atEnd();
381382
}
@@ -3102,7 +3103,8 @@ LedgerTxnRoot::prepareNewObjects(size_t s)
31023103
mImpl->prepareNewObjects(s);
31033104
}
31043105

3105-
void LedgerTxnRoot::Impl::prepareNewObjects(size_t)
3106+
void
3107+
LedgerTxnRoot::Impl::prepareNewObjects(size_t)
31063108
{
31073109
}
31083110

src/ledger/LedgerTxnEntry.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ LedgerTxnEntry::operator=(LedgerTxnEntry&& other)
106106
return *this;
107107
}
108108

109-
LedgerTxnEntry::operator bool() const
109+
LedgerTxnEntry::
110+
operator bool() const
110111
{
111112
if (!mImpl.expired())
112113
{
@@ -317,7 +318,8 @@ ConstLedgerTxnEntry::operator=(ConstLedgerTxnEntry&& other)
317318
return *this;
318319
}
319320

320-
ConstLedgerTxnEntry::operator bool() const
321+
ConstLedgerTxnEntry::
322+
operator bool() const
321323
{
322324
if (!mImpl.expired())
323325
{

0 commit comments

Comments
 (0)