Skip to content

Commit

Permalink
Moved to Xcode 16 (#368)
Browse files Browse the repository at this point in the history
* rebuild 3rd_party with xc15b6

* Updated to compile on XC15, fixed a bug in FavoritesImpl

* Xcode 15.4 -> 16b6

* clang-format

* Another build fix for XC16

* Replaced SPDLOC with implicit std::source_location
  • Loading branch information
mikekazakov authored Sep 4, 2024
1 parent 7613b4a commit e7560ff
Show file tree
Hide file tree
Showing 86 changed files with 410 additions and 424 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_dispatch:

env:
XC_VERSION: ${{ '15.4' }}
XC_VERSION: ${{ '16_beta_6' }}

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
XC_VERSION: ${{ '15.4' }}
XC_VERSION: ${{ '16_beta_6' }}

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '0 3 * * *' # at 03:00 AM UTC everyday

env:
XC_VERSION: ${{ '15.4' }}
XC_VERSION: ${{ '16_beta_6' }}

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

env:
XC_VERSION: ${{ '15.4' }}
XC_VERSION: ${{ '16_beta_6' }}

jobs:
build:
Expand Down
Binary file modified 3rd_Party/AppAuth/built/libAppAuth-macOS.a
Binary file not shown.
Binary file modified 3rd_Party/LetsMove/LetsMove.framework/Versions/A/LetsMove
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23F79</string>
<string>23G93</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,19 +27,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<string>24A5324a</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.5</string>
<string>15.0</string>
<key>DTSDKBuild</key>
<string>23F73</string>
<string>24A5324a</string>
<key>DTSDKName</key>
<string>macosx14.5</string>
<string>macosx15.0</string>
<key>DTXcode</key>
<string>1540</string>
<string>1600</string>
<key>DTXcodeBuild</key>
<string>15F31d</string>
<string>16A5230g</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Resources/Info.plist</key>
<data>
LchtjyN8W2fLAdQr3j41KTCVACs=
2xJ7lfxk9XAbUydRh3k0fvG3qQI=
</data>
<key>Resources/ca.lproj/MoveApplication.strings</key>
<dict>
Expand Down Expand Up @@ -270,7 +270,7 @@
<dict>
<key>hash2</key>
<data>
RIkAfiFxvLdquGjE8kMHVIbzhI9CgdqjMQqz2eEoHHU=
BG/mNxhn1q8hf3Zm7htjGru7bvR4/8KJrviV1DpFKuA=
</data>
</dict>
<key>Resources/ca.lproj/MoveApplication.strings</key>
Expand Down
Binary file modified 3rd_Party/OpenSSL/lib/libcrypto.a
Binary file not shown.
Binary file modified 3rd_Party/OpenSSL/lib/libssl.a
Binary file not shown.
Binary file modified 3rd_Party/Sparkle/Sparkle.framework/Versions/B/Autoupdate
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23F79</string>
<string>23G93</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -29,19 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<string>24A5324a</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.5</string>
<string>15.0</string>
<key>DTSDKBuild</key>
<string>23F73</string>
<string>24A5324a</string>
<key>DTSDKName</key>
<string>macosx14.5</string>
<string>macosx15.0</string>
<key>DTXcode</key>
<string>1540</string>
<string>1600</string>
<key>DTXcodeBuild</key>
<string>15F31d</string>
<string>16A5230g</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
</dict>
Expand Down
Binary file modified 3rd_Party/Sparkle/Sparkle.framework/Versions/B/Sparkle
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23F79</string>
<string>23G93</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand Down Expand Up @@ -67,19 +67,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<string>24A5324a</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.5</string>
<string>15.0</string>
<key>DTSDKBuild</key>
<string>23F73</string>
<string>24A5324a</string>
<key>DTSDKName</key>
<string>macosx14.5</string>
<string>macosx15.0</string>
<key>DTXcode</key>
<string>1540</string>
<string>1600</string>
<key>DTXcodeBuild</key>
<string>15F31d</string>
<string>16A5230g</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23F79</string>
<string>23G93</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -29,19 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<string>24A5324a</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.5</string>
<string>15.0</string>
<key>DTSDKBuild</key>
<string>23F73</string>
<string>24A5324a</string>
<key>DTSDKName</key>
<string>macosx14.5</string>
<string>macosx15.0</string>
<key>DTXcode</key>
<string>1540</string>
<string>1600</string>
<key>DTXcodeBuild</key>
<string>15F31d</string>
<string>16A5230g</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NSAppTransportSecurity</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>23F79</string>
<string>23G93</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -29,19 +29,19 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string></string>
<string>24A5324a</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>14.5</string>
<string>15.0</string>
<key>DTSDKBuild</key>
<string>23F73</string>
<string>24A5324a</string>
<key>DTSDKName</key>
<string>macosx14.5</string>
<string>macosx15.0</string>
<key>DTXcode</key>
<string>1540</string>
<string>1600</string>
<key>DTXcodeBuild</key>
<string>15F31d</string>
<string>16A5230g</string>
<key>LSMinimumSystemVersion</key>
<string>10.13</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</data>
<key>Resources/Info.plist</key>
<data>
vbThLOecOFzZs5c73SswIUHAQn8=
CU9SOhCb7nYLmmQmJ5/NUIXgKig=
</data>
<key>Resources/ReleaseNotesColorStyle.css</key>
<data>
Expand Down Expand Up @@ -939,10 +939,10 @@
<dict>
<key>cdhash</key>
<data>
Fr9dsunrnNRMocbZmEF8cP1nnpg=
0tP0lDyqGENjO38pU4Ou/nd9vWw=
</data>
<key>requirement</key>
<string>cdhash H"16bf5db2e9eb9cd44ca1c6d998417c70fd679e98" or cdhash H"5b0b9e5a1caeac7527be86fe3c27bd58aac73ecd"</string>
<string>cdhash H"d2d3f4943caa1843633b7f295383aefe777dbd6c" or cdhash H"b958b1f76c4f2ae3d6b843a7ddc2279c7bc77700"</string>
</dict>
<key>Headers/SPUDownloadData.h</key>
<dict>
Expand Down Expand Up @@ -1186,7 +1186,7 @@
<dict>
<key>hash2</key>
<data>
1FpNwahKoFCadHstLOC9OeKkNAQ5mE1Mtmgx0/JaTlU=
4eIah47zOTXNyKQH/yKsb7Mg9oQD0h1kkVKr1rGDJlY=
</data>
</dict>
<key>Resources/ReleaseNotesColorStyle.css</key>
Expand Down Expand Up @@ -2107,28 +2107,28 @@
<dict>
<key>cdhash</key>
<data>
5tsZt2a/TMYDmh2slp6d3ibEen8=
tooTko0dE29snYyRAxnWxvqP+lc=
</data>
<key>requirement</key>
<string>cdhash H"e6db19b766bf4cc6039a1dac969e9dde26c47a7f" or cdhash H"a98ea185d0bc0b8f1684dd967b5c72358b09b0cd"</string>
<string>cdhash H"b68a13928d1d136f6c9d8c910319d6c6fa8ffa57" or cdhash H"80defc6b85ef53f965055cbe43e1be46056f9bae"</string>
</dict>
<key>XPCServices/Downloader.xpc</key>
<dict>
<key>cdhash</key>
<data>
tQxSTgy8hxjRI4We12og2TBCics=
A+xHakKuGXizsz6k3xifwWuafzw=
</data>
<key>requirement</key>
<string>cdhash H"b50c524e0cbc8718d123859ed76a20d9304289cb" or cdhash H"b9ef2c32b236930c5c11b098dcc8236da2d33c3d"</string>
<string>cdhash H"03ec476a42ae1978b3b33ea4df189fc16b9a7f3c" or cdhash H"2e8bf408dc29a6159a27bc57dfac39fdea3093b4"</string>
</dict>
<key>XPCServices/Installer.xpc</key>
<dict>
<key>cdhash</key>
<data>
AuoSZAgXGf3dUo7LU0wHSXdXrA8=
0M5djLhamWuot0RTeXljgaaNKJg=
</data>
<key>requirement</key>
<string>cdhash H"02ea1264081719fddd528ecb534c07497757ac0f" or cdhash H"86569414135260b525546d703fa21b40263b071a"</string>
<string>cdhash H"d0ce5d8cb85a996ba8b7445379796381a68d2898" or cdhash H"e77e789ad007a20a6ab38608b1991aa494aa9ffe"</string>
</dict>
</dict>
<key>rules</key>
Expand Down
Binary file modified 3rd_Party/bz2/lib/libbz2.a
Binary file not shown.
Binary file modified 3rd_Party/fmt/lib/libfmt.a
Binary file not shown.
Binary file modified 3rd_Party/googletest/lib/libgmock.a
Binary file not shown.
Binary file modified 3rd_Party/googletest/lib/libgmock_main.a
Binary file not shown.
Binary file modified 3rd_Party/googletest/lib/libgtest.a
Binary file not shown.
Binary file modified 3rd_Party/googletest/lib/libgtest_main.a
Binary file not shown.
Binary file modified 3rd_Party/lexilla/lib/liblexilla.a
Binary file not shown.
2 changes: 1 addition & 1 deletion 3rd_Party/libarchive/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ libarchive_test_read_format_lha_filename|\
libarchive_test_read_format_zip_filename_CP932_eucJP|\
libarchive_test_read_format_zip_filename_CP932_CP932|\
libarchive_test_sparse_basic|libarchive_test_ustar_filename_encoding_EUCJP_CP932" \
--testing-dir .
--test-dir .

cd ./../../
rm -rf ./include/
Expand Down
Binary file modified 3rd_Party/libarchive/lib/libarchive.a
Binary file not shown.
Binary file modified 3rd_Party/libcurl/lib/libcurl.a
Binary file not shown.
Binary file modified 3rd_Party/libcxxbackport/lib/libcxxbackport.a
Binary file not shown.
Binary file modified 3rd_Party/libssh2/lib/libssh2.a
Binary file not shown.
Binary file modified 3rd_Party/lz4/lib/liblz4.a
Binary file not shown.
Binary file modified 3rd_Party/lzma/lib/liblzma.a
Binary file not shown.
Binary file modified 3rd_Party/lzo/lib/liblzo2.a
Binary file not shown.
Binary file modified 3rd_Party/pstld/lib/libpstld.a
Binary file not shown.
Binary file modified 3rd_Party/pugixml/lib/libpugixml.a
Binary file not shown.
Binary file modified 3rd_Party/re2/lib/libre2.a
Binary file not shown.
Binary file modified 3rd_Party/spdlog/lib/libspdlog.a
Binary file not shown.
Binary file modified 3rd_Party/z/lib/libz.a
Binary file not shown.
Binary file modified 3rd_Party/zstd/lib/libzstd.a
Binary file not shown.
44 changes: 24 additions & 20 deletions Source/Base/include/Base/SpdlogFacade.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@
#include <spdlog/fmt/ostr.h>
#include <string>
#include <string_view>
#include <source_location>
#include "SpdlogFormatters.h"

#ifndef SPDLOC
#define SPDLOC \
spdlog::source_loc \
{ \
__FILE__, __LINE__, __FUNCTION__ \
}
#endif

namespace nc::base {

class SpdLogger
Expand All @@ -32,6 +25,17 @@ class SpdLogger
std::vector<std::shared_ptr<spdlog::logger>> m_OldLoggers;
};

struct SpdlogLocAndFmt {
template <class String>
constexpr SpdlogLocAndFmt(const String &_fmt, const std::source_location &_loc = std::source_location::current())
: fmt{_fmt}, loc{_loc.file_name(), static_cast<int>(_loc.line()), _loc.function_name()}
{
}

std::string_view fmt;
spdlog::source_loc loc;
};

template <typename Impl>
class SpdlogFacade
{
Expand All @@ -49,39 +53,39 @@ class SpdlogFacade
static void Set(std::shared_ptr<spdlog::logger> _logger) noexcept { Impl::m_Logger.Set(_logger); }

template <typename... Args>
static void Trace(spdlog::source_loc _loc, std::string_view _fmt, const Args &...args)
static void Trace(SpdlogLocAndFmt _locfmt, const Args &...args)
{
Get().log(_loc, spdlog::level::trace, fmt::runtime(_fmt), args...);
Get().log(_locfmt.loc, spdlog::level::trace, fmt::runtime(_locfmt.fmt), args...);
}

template <typename... Args>
static void Debug(spdlog::source_loc _loc, std::string_view _fmt, const Args &...args)
static void Debug(SpdlogLocAndFmt _locfmt, const Args &...args)
{
Get().log(_loc, spdlog::level::debug, fmt::runtime(_fmt), args...);
Get().log(_locfmt.loc, spdlog::level::debug, fmt::runtime(_locfmt.fmt), args...);
}

template <typename... Args>
static void Info(spdlog::source_loc _loc, std::string_view _fmt, const Args &...args)
static void Info(SpdlogLocAndFmt _locfmt, const Args &...args)
{
Get().log(_loc, spdlog::level::info, fmt::runtime(_fmt), args...);
Get().log(_locfmt.loc, spdlog::level::info, fmt::runtime(_locfmt.fmt), args...);
}

template <typename... Args>
static void Warn(spdlog::source_loc _loc, std::string_view _fmt, const Args &...args)
static void Warn(SpdlogLocAndFmt _locfmt, const Args &...args)
{
Get().log(_loc, spdlog::level::warn, fmt::runtime(_fmt), args...);
Get().log(_locfmt.loc, spdlog::level::warn, fmt::runtime(_locfmt.fmt), args...);
}

template <typename... Args>
static void Error(spdlog::source_loc _loc, std::string_view _fmt, const Args &...args)
static void Error(SpdlogLocAndFmt _locfmt, const Args &...args)
{
Get().log(_loc, spdlog::level::err, fmt::runtime(_fmt), args...);
Get().log(_locfmt.loc, spdlog::level::err, fmt::runtime(_locfmt.fmt), args...);
}

template <typename... Args>
static void Critical(spdlog::source_loc _loc, std::string_view _fmt, const Args &...args)
static void Critical(SpdlogLocAndFmt _locfmt, const Args &...args)
{
Get().log(_loc, spdlog::level::critical, fmt::runtime(_fmt), args...);
Get().log(_locfmt.loc, spdlog::level::critical, fmt::runtime(_locfmt.fmt), args...);
}
};

Expand Down
Loading

0 comments on commit e7560ff

Please sign in to comment.