Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode16 build fix #2585

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
576c558
Xcode16 build fix
marchcat Sep 17, 2024
705fd68
Make `LLPointer` equality comparisons accept not-identical types.
nat-goodspeed Sep 24, 2024
1a682de
LLConstPointer<T> is the same as LLPointer<const T>.
nat-goodspeed Sep 24, 2024
98c829a
Use copy-and-swap idiom for LLPointer's assignment operators.
nat-goodspeed Sep 25, 2024
5d7b3ab
Explain why apparently redundant LLPointer methods are necessary.
nat-goodspeed Sep 25, 2024
4b2b94f
Merge pull request #2681 from secondlife/nat/xcode-16
marchcat Sep 25, 2024
55df732
Merge branch 'develop' into marchcat/xcode-16
nat-goodspeed Sep 25, 2024
dc0c6d3
Adapt `fsyspath` for C++20 conventions.
nat-goodspeed Sep 26, 2024
988a0fd
Fix a few more fsyspath conversions, removing explicit u8string().
nat-goodspeed Sep 26, 2024
015ff3d
#include <cmath> rather than "math.h" to avoid lerp() conflict.
nat-goodspeed Sep 26, 2024
6400284
Ditch our own (conflicting) definition of the lerp() function.
nat-goodspeed Sep 26, 2024
6ac59d1
Fix GCC ambiguous-reversed-operator errors for `LLKeyData` compares.
nat-goodspeed Sep 26, 2024
d7f6b96
Reinstate our lerp() function, avoid "math.h" header.
nat-goodspeed Sep 26, 2024
15dad13
Set continue-on-error for linux builds
marchcat Sep 26, 2024
452e074
Remove whitespace for pre-commit
marchcat Sep 26, 2024
8a6da4d
Rename our lerp() to flerp(); call where MSVC balks at std::lerp().
nat-goodspeed Sep 26, 2024
b043ed4
Merge remote branch 'develop' into marchcat/xcode-16
nat-goodspeed Sep 26, 2024
fcfcca9
Ditch last instances of LL_LIBRARY_INCLUDE.
nat-goodspeed Sep 26, 2024
d3833b6
Fix lerp issues and eliminate flerp in favor of std::lerp (#2712)
Ansariel Sep 27, 2024
a2b76b6
Migrate ~LLPointer()'s peculiar warning case to llpointer.cpp.
nat-goodspeed Sep 27, 2024
d39c862
Automate memory management in JPEG2KEncode and JPEG2KDecode.
nat-goodspeed Sep 27, 2024
c7cef95
Allow Windows and Mac builds to succeed despite Linux failure.
nat-goodspeed Sep 27, 2024
51fb298
Try again to let Windows and Mac succeed despite Linux failure.
nat-goodspeed Sep 27, 2024
ecc2ada
lltexlayerparams.h uses std::atomic<bool>, so #include <atomic>
nat-goodspeed Sep 27, 2024
5c9d60c
Linux GCC prefers the explicit std::string::assign() call.
nat-goodspeed Sep 27, 2024
1c78829
Introduce owning_ptr<T>; use it for JPEG2KEncode and JPEG2KDecode.
nat-goodspeed Sep 27, 2024
cf2f482
Slightly streamline owning_ptr class definition.
nat-goodspeed Sep 27, 2024
71e89d6
Merge pull request #2714 from secondlife/nat/xcode-16
nat-goodspeed Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
needs: setup
strategy:
matrix:
runner: [windows-large, macos-12-xl]
runner: [windows-large, macos-14-xlarge]
configuration: ${{ fromJSON(needs.setup.outputs.configurations) }}
runs-on: ${{ matrix.runner }}
outputs:
Expand All @@ -64,7 +64,7 @@ jobs:
# autobuild-package.xml.
AUTOBUILD_VCS_INFO: "true"
AUTOBUILD_VSVER: "170"
DEVELOPER_DIR: "/Applications/Xcode_14.0.1.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_16.0.app/Contents/Developer"
# Ensure that Linden viewer builds engage Bugsplat.
BUGSPLAT_DB: ${{ needs.setup.outputs.bugsplat_db }}
build_coverity: false
Expand Down
3 changes: 3 additions & 0 deletions indra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ else()
set( USE_AUTOBUILD_3P ON )
endif()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(Variables)
include(BuildVersion)

Expand Down
4 changes: 2 additions & 2 deletions indra/llcommon/llqueuedthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ size_t LLQueuedThread::updateQueue(F32 max_time_ms)
// schedule a call to threadedUpdate for every call to updateQueue
if (!isQuitting())
{
mRequestQueue.post([=]()
mRequestQueue.post([=, this]()
{
LL_PROFILE_ZONE_NAMED_CATEGORY_THREAD("qt - update");
mIdleThread = false;
Expand Down Expand Up @@ -474,7 +474,7 @@ void LLQueuedThread::processRequest(LLQueuedThread::QueuedRequest* req)
#else
using namespace std::chrono_literals;
auto retry_time = LL::WorkQueue::TimePoint::clock::now() + 16ms;
mRequestQueue.post([=]
mRequestQueue.post([=, this]
{
LL_PROFILE_ZONE_NAMED("processRequest - retry");
if (LL::WorkQueue::TimePoint::clock::now() < retry_time)
Expand Down
2 changes: 1 addition & 1 deletion indra/llrender/llimagegl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ void LLImageGL::syncToMainThread(LLGLuint new_tex_name)
ref();
LL::WorkQueue::postMaybe(
mMainQueue,
[=]()
[=, this]()
{
LL_PROFILE_ZONE_NAMED("cglt - delete callback");
syncTexName(new_tex_name);
Expand Down
8 changes: 4 additions & 4 deletions indra/llwindow/llwindowmacosx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ F32 LLWindowMacOSX::getGamma()
&greenGamma,
&blueMin,
&blueMax,
&blueGamma) == noErr)
&blueGamma) == static_cast<CGError>(noErr))
{
// So many choices...
// Let's just return the green channel gamma for now.
Expand Down Expand Up @@ -1091,7 +1091,7 @@ bool LLWindowMacOSX::setGamma(const F32 gamma)
&greenGamma,
&blueMin,
&blueMax,
&blueGamma) != noErr)
&blueGamma) != static_cast<CGError>(noErr))
{
return false;
}
Expand All @@ -1106,7 +1106,7 @@ bool LLWindowMacOSX::setGamma(const F32 gamma)
gamma,
blueMin,
blueMax,
gamma) != noErr)
gamma) != static_cast<CGError>(noErr))
{
return false;
}
Expand Down Expand Up @@ -1158,7 +1158,7 @@ bool LLWindowMacOSX::setCursorPosition(const LLCoordWindow position)
newPosition.y = screen_pos.mY;

CGSetLocalEventsSuppressionInterval(0.0);
if(CGWarpMouseCursorPosition(newPosition) == noErr)
if(CGWarpMouseCursorPosition(newPosition) == static_cast<CGError>(noErr))
{
result = true;
}
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/gltfscenemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ void GLTFSceneManager::update()
LLNewBufferedResourceUploadInfo::uploadFinish_f finish = [this, buffer](LLUUID assetId, LLSD response)
{
LLAppViewer::instance()->postToMainCoro(
[=]()
[=, this]()
{
if (mUploadingAsset)
{
Expand Down
6 changes: 3 additions & 3 deletions indra/newview/llmeshrepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ LLViewerFetchedTexture* LLMeshUploadThread::FindViewerTexture(const LLImportMate
return ppTex ? (*ppTex).get() : NULL;
}

volatile S32 LLMeshRepoThread::sActiveHeaderRequests = 0;
volatile S32 LLMeshRepoThread::sActiveLODRequests = 0;
std::atomic<S32> LLMeshRepoThread::sActiveHeaderRequests = 0;
std::atomic<S32> LLMeshRepoThread::sActiveLODRequests = 0;
U32 LLMeshRepoThread::sMaxConcurrentRequests = 1;
S32 LLMeshRepoThread::sRequestLowWater = REQUEST2_LOW_WATER_MIN;
S32 LLMeshRepoThread::sRequestHighWater = REQUEST2_HIGH_WATER_MIN;
Expand Down Expand Up @@ -3914,7 +3914,7 @@ void LLMeshRepository::notifyLoadedMeshes()
}

// erase from background thread
mThread->mWorkQueue.post([=]()
mThread->mWorkQueue.post([=, this]()
{
mThread->mSkinMap.erase(id);
});
Expand Down
4 changes: 2 additions & 2 deletions indra/newview/llmeshrepository.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ class LLMeshRepoThread : public LLThread
{
public:

volatile static S32 sActiveHeaderRequests;
volatile static S32 sActiveLODRequests;
static std::atomic<S32> sActiveHeaderRequests;
static std::atomic<S32> sActiveLODRequests;
static U32 sMaxConcurrentRequests;
static S32 sRequestLowWater;
static S32 sRequestHighWater;
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llpanelemojicomplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ void LLPanelEmojiComplete::updateConstraints()
{
mRenderRect = getLocalRect();

mEmojiWidth = (U16)(mIconFont->getWidthF32(u8"\U0001F431") + mPadding * 2);
mEmojiWidth = (U16)(mIconFont->getWidthF32(LLWString(1, 0x1F431).c_str()) + mPadding * 2);
if (mVertical)
{
mEmojiHeight = mIconFont->getLineHeight() + mPadding * 2;
Expand Down
6 changes: 3 additions & 3 deletions indra/newview/lltexturefetch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority)
{
LL_PROFILE_ZONE_SCOPED;
mRequestQueue.tryPost([=]()
mRequestQueue.tryPost([=, this]()
{
LLTextureFetchWorker* worker = getWorker(id);
if (worker)
Expand Down Expand Up @@ -3523,8 +3523,8 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
//if (! gViewerAssetStatsThread1)
// return true;

static volatile bool reporting_started(false);
static volatile S32 report_sequence(0);
static std::atomic<bool> reporting_started(false);
static std::atomic<S32> report_sequence(0);

// In mStatsSD, we have a copy we own of the LLSD representation
// of the asset stats. Add some additional fields and ship it off.
Expand Down
4 changes: 2 additions & 2 deletions indra/newview/llviewermedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2900,14 +2900,14 @@ void LLViewerMediaImpl::update()
media_tex->ref();
main_queue->postTo(
mTexUpdateQueue, // Worker thread queue
[=]() // work done on update worker thread
[=, this]() // work done on update worker thread
{
#if LL_IMAGEGL_THREAD_CHECK
media_tex->getGLTexture()->mActiveThread = LLThread::currentID();
#endif
doMediaTexUpdate(media_tex, data, data_width, data_height, x_pos, y_pos, width, height, true);
},
[=]() // callback to main thread
[=, this]() // callback to main thread
{
#if LL_IMAGEGL_THREAD_CHECK
media_tex->getGLTexture()->mActiveThread = LLThread::currentID();
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llviewerwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
// Check the whitelist, if there's media (otherwise just show it)
if (te->getMediaData() == NULL || te->getMediaData()->checkCandidateUrl(url))
{
if ( obj != mDragHoveredObject)
if (obj != mDragHoveredObject.get())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's pull in Ansariel's free functions to compare (T* == LLPointer<T>) and !=.

Copy link
Contributor

@Ansariel Ansariel Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are already in the develop branch (d91d39f). The problem here is that obj is a LLVOVolume pointer and mDragHoveredObject is an LLPointer<LLViewerObject>, so the overloaded operator doesn't work.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're comparing pointers to different types in the same class hierarchy, shouldn't we formally be downcasting one of them to match the other? We don't use a lot of multiple inheritance, but a pointer to object A's base class doesn't necessarily have the same bit pattern as a pointer to A.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would probably be a smart thing to do.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have realized the language takes care of that.

That being the case, I'll try tweaking the (T* == LLPointer<T>) comparisons to accept a raw pointer to arbitrary type, letting the compiler produce an error if the two pointer types can't be compared.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
// Highlight the dragged object
LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject);
Expand Down
20 changes: 10 additions & 10 deletions indra/newview/llvoicewebrtc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ void LLWebRTCVoiceClient::voiceConnectionCoro()
}
}
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
if (sShuttingDown)
{
return;
Expand Down Expand Up @@ -667,7 +667,7 @@ void LLWebRTCVoiceClient::OnDevicesChanged(const llwebrtc::LLWebRTCVoiceDeviceLi
{

LL::WorkQueue::postMaybe(mMainQueue,
[=]
[=, this]
{
OnDevicesChangedImpl(render_devices, capture_devices);
});
Expand Down Expand Up @@ -2203,7 +2203,7 @@ LLVoiceWebRTCConnection::~LLVoiceWebRTCConnection()
void LLVoiceWebRTCConnection::OnIceGatheringState(llwebrtc::LLWebRTCSignalingObserver::EIceGatheringState state)
{
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
LL_DEBUGS("Voice") << "Ice Gathering voice account. " << state << LL_ENDL;

switch (state)
Expand All @@ -2226,7 +2226,7 @@ void LLVoiceWebRTCConnection::OnIceGatheringState(llwebrtc::LLWebRTCSignalingObs
// callback from llwebrtc
void LLVoiceWebRTCConnection::OnIceCandidate(const llwebrtc::LLWebRTCIceCandidate& candidate)
{
LL::WorkQueue::postMaybe(mMainQueue, [=] { mIceCandidates.push_back(candidate); });
LL::WorkQueue::postMaybe(mMainQueue, [=, this] { mIceCandidates.push_back(candidate); });
}

void LLVoiceWebRTCConnection::processIceUpdates()
Expand Down Expand Up @@ -2344,7 +2344,7 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection)
void LLVoiceWebRTCConnection::OnOfferAvailable(const std::string &sdp)
{
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
if (mShutDown)
{
return;
Expand All @@ -2371,7 +2371,7 @@ void LLVoiceWebRTCConnection::OnOfferAvailable(const std::string &sdp)
void LLVoiceWebRTCConnection::OnAudioEstablished(llwebrtc::LLWebRTCAudioInterface* audio_interface)
{
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
if (mShutDown)
{
return;
Expand All @@ -2393,7 +2393,7 @@ void LLVoiceWebRTCConnection::OnAudioEstablished(llwebrtc::LLWebRTCAudioInterfac
void LLVoiceWebRTCConnection::OnRenegotiationNeeded()
{
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
LL_DEBUGS("Voice") << "Voice channel requires renegotiation." << LL_ENDL;
if (!mShutDown)
{
Expand All @@ -2407,7 +2407,7 @@ void LLVoiceWebRTCConnection::OnRenegotiationNeeded()
void LLVoiceWebRTCConnection::OnPeerConnectionClosed()
{
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
LL_DEBUGS("Voice") << "Peer connection has closed." << LL_ENDL;
if (mVoiceConnectionState == VOICE_STATE_WAIT_FOR_CLOSE)
{
Expand Down Expand Up @@ -2879,7 +2879,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
// llwebrtc callback
void LLVoiceWebRTCConnection::OnDataReceived(const std::string& data, bool binary)
{
LL::WorkQueue::postMaybe(mMainQueue, [=] { LLVoiceWebRTCConnection::OnDataReceivedImpl(data, binary); });
LL::WorkQueue::postMaybe(mMainQueue, [=, this] { LLVoiceWebRTCConnection::OnDataReceivedImpl(data, binary); });
}

//
Expand Down Expand Up @@ -3035,7 +3035,7 @@ void LLVoiceWebRTCConnection::OnDataReceivedImpl(const std::string &data, bool b
void LLVoiceWebRTCConnection::OnDataChannelReady(llwebrtc::LLWebRTCDataInterface *data_interface)
{
LL::WorkQueue::postMaybe(mMainQueue,
[=] {
[=, this] {
if (mShutDown)
{
return;
Expand Down
3 changes: 1 addition & 2 deletions indra/viewer_components/login/lllogin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ void LLLogin::Impl::connect(const std::string& uri, const LLSD& login_params)

// Launch a coroutine with our login_() method. Run the coroutine until
// its first wait; at that point, return here.
std::string coroname =
LLCoros::instance().launch("LLLogin::Impl::login_", [=]() { loginCoro(uri, login_params); });
std::string coroname = LLCoros::instance().launch("LLLogin::Impl::login_", [=, this]() { loginCoro(uri, login_params); });

LL_DEBUGS("LLLogin") << " connected with uri '" << uri << "', login_params " << login_params << LL_ENDL;
}
Expand Down
Loading