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

Bring in ForeverMac changes into 2025.03. #3582

Draft
wants to merge 25 commits into
base: release/2025.03
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a80f2ba
Update KDU to 8.4.1 and fix kdu tests, also fix llimage_libtest utility
Oct 28, 2024
94a4442
Enable OpenAL by default
Jan 21, 2025
635c34a
Fix build with C++20 including nat's changes to fsyspath
Jan 21, 2025
51ed6b5
Update to use universal build flags and fix cmake deprecations
Jan 21, 2025
6fcd349
Fix Tracy memory profiling overloads for aligned allocations
Feb 2, 2025
39a13e4
Restore math types to trivially copyable and add static asserts
Feb 2, 2025
7bba6b8
Update dependencies with support for apple silicon
Feb 2, 2025
d5460da
Update macOS xib file and compile as part of build process
Feb 2, 2025
8acac2c
Fix openal leak causing crash during shutdown
Feb 2, 2025
2f39d38
Restore support for anistropic filtering on macos
Nov 16, 2024
e83aea5
Introduce SSE2NEON package for handling sse to neon intrinsic compati…
Feb 3, 2025
0fbc30d
Merge pull request #2758 from Nicky-D/feature/fontcache
marchcat Oct 2, 2024
465fbf6
Fix crash from socket creation failure in media plugin system
Nov 4, 2024
a455d3e
Introduce build system and preprocessor support for ARM64
Feb 3, 2025
36d4dc4
Fix uninitialized variable warnings being emitted by current clang
Feb 3, 2025
594a7af
Fix pessimizing move warning being emitted by the compiler
Feb 3, 2025
9fef2a1
Fix timer support on macOS under ARM64
Feb 3, 2025
4ab2a80
Use SSE2NEON to emulate SSE intrinsics when building against an ARM t…
Feb 10, 2025
0ea0edb
Fix llcorehttp tests building under macos
Feb 10, 2025
fd94dc0
Disable old GPU hacks on macos when running against Apple GPU
Feb 10, 2025
4a56738
Disable LLImageJPEG setjmp hack when building on ARM to avoid crash
Feb 10, 2025
0f4aa87
Vectorize LLRender UI scale and offset stack to resolve perf hotspot …
Feb 10, 2025
ded9471
Disable MSAA buffers on macos during GL context init
Feb 10, 2025
9b060f7
Fix deprecation warnings under C++20 on MSVC
Feb 11, 2025
179b292
Rework windows to use zc:wchar_t for better c++ conformance and compa…
Feb 11, 2025
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ debian/files
debian/secondlife-appearance-utility*
debian/secondlife-viewer*
indra/.distcc
indra/cmake/*
indra/out/*

indra/packages/*
Expand Down
388 changes: 205 additions & 183 deletions autobuild.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions indra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
## We're not there yet, but once done, there is a kludge in Linking.cmake
# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
cmake_policy(SET CMP0156 NEW)
cmake_policy(SET CMP0179 NEW)

set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
"The root project/makefile/solution name. Defaults to SecondLife.")
Expand Down
54 changes: 25 additions & 29 deletions indra/cmake/00-Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS)

# Force enable SSE2 instructions in GLM per the manual
# https://github.com/g-truc/glm/blob/master/manual.md#section2_10
add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_FORCE_SSE2=1)
add_compile_definitions(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES=1 GLM_ENABLE_EXPERIMENTAL=1)

# Configure crash reporting
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
Expand Down Expand Up @@ -73,6 +73,8 @@ if (WINDOWS)
NOMINMAX
# DOM_DYNAMIC # For shared library colladadom
_CRT_SECURE_NO_WARNINGS # Allow use of sprintf etc
_CRT_NONSTDC_NO_DEPRECATE # Allow use of sprintf etc
_CRT_OBSOLETE_NO_WARNINGS
_WINSOCK_DEPRECATED_NO_WARNINGS # Disable deprecated WinSock API warnings
)
add_compile_options(
Expand Down Expand Up @@ -155,46 +157,40 @@ if (LINUX)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
endif (LINUX)


if (DARWIN)
# Use rpath loading on macos
set(CMAKE_MACOSX_RPATH TRUE)

# Warnings should be fatal -- thanks, Nicky Perian, for spotting reversed default
set(CLANG_DISABLE_FATAL_WARNINGS OFF)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations")
# Ensure that CMAKE_CXX_FLAGS has the correct -g debug information format --
# see Variables.cmake.
string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}"
CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front.
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
## Really?? On developer machines too?
##set(ENABLE_SIGNING TRUE)
##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")

# required for clang-15/xcode-15 since our boost package still uses deprecated std::unary_function/binary_function
# see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#C++-Standard-Library
add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
endif (DARWIN)

if (LINUX OR DARWIN)
set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
# Ensure debug symbols are always generated
add_compile_options(-g --debug) # --debug is a clang synonym for -g that bypasses cmake behaviors

if (NOT GCC_DISABLE_FATAL_WARNINGS)
list(APPEND GCC_WARNINGS -Werror)
endif (NOT GCC_DISABLE_FATAL_WARNINGS)
# Silence GL deprecation warnings
add_compile_definitions(GL_SILENCE_DEPRECATION=1)
endif(DARWIN)

list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor )
if (LINUX OR DARWIN)
add_compile_options(-Wall -Wno-sign-compare -Wno-trigraphs -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable)

if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
list(APPEND GCC_WARNINGS -Wno-unused-but-set-variable -Wno-unused-variable )
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
# libstdc++ headers contain deprecated declarations that fail on clang
# macOS currently has many deprecated calls
add_compile_options(-Wno-unused-local-typedef -Wno-deprecated-declarations)
endif()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-stringop-truncation -Wno-parentheses -Wno-maybe-uninitialized)
endif()

if (NOT GCC_DISABLE_FATAL_WARNINGS AND NOT CLANG_DISABLE_FATAL_WARNINGS)
add_compile_options(-Werror)
endif ()

add_compile_options(${GCC_WARNINGS})
add_compile_options(-m${ADDRESS_SIZE})
endif (LINUX OR DARWIN)



52 changes: 21 additions & 31 deletions indra/cmake/APR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,25 @@ use_system_binary( apr apr-util )
use_prebuilt_binary(apr_suite)

if (WINDOWS)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "lib")
else (LLCOMMON_LINK_SHARED)
set(APR_selector "")
endif (LLCOMMON_LINK_SHARED)
target_link_libraries( ll::apr INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
)
target_compile_definitions( ll::apr INTERFACE APR_DECLARE_STATIC=1 APU_DECLARE_STATIC=1 API_DECLARE_STATIC=1)
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
set(APRUTIL_selector "0.dylib")
else (LLCOMMON_LINK_SHARED)
set(APR_selector "a")
set(APRUTIL_selector "a")
endif (LLCOMMON_LINK_SHARED)

target_link_libraries( ll::apr INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector}
${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APR_selector}
iconv
)
else()
target_link_libraries( ll::apr INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a
${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
rt
)
target_compile_definitions(ll::apr INTERFACE APR_DECLARE_STATIC=1 APU_DECLARE_STATIC=1 API_DECLARE_STATIC=1)
endif ()
target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 )

find_library(APR_LIBRARY
NAMES
apr-1.lib
libapr-1.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(APRUTIL_LIBRARY
NAMES
aprutil-1.lib
libaprutil-1.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

target_link_libraries(ll::apr INTERFACE ${APR_LIBRARY} ${APRUTIL_LIBRARY})

if(DARWIN)
target_link_libraries(ll::apr INTERFACE iconv)
endif()

target_include_directories(ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1)
44 changes: 25 additions & 19 deletions indra/cmake/Audio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,29 @@ use_system_binary(vorbis)
use_prebuilt_binary(ogg_vorbis)
target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )

if (WINDOWS)
target_link_libraries(ll::vorbis INTERFACE
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libogg.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisenc.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisfile.lib
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbis.lib
)
else (WINDOWS)
target_link_libraries(ll::vorbis INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libogg.a
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.a
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.a
${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.a
)
endif (WINDOWS)
find_library(OGG_LIBRARY
NAMES
libogg.lib
libogg.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(VORBIS_LIBRARY
NAMES
libvorbis.lib
libvorbis.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(VORBISENC_LIBRARY
NAMES
libvorbisenc.lib
libvorbisenc.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(VORBISFILE_LIBRARY
NAMES
libvorbisfile.lib
libvorbisfile.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

target_link_libraries(ll::vorbis INTERFACE ${OGG_LIBRARY} ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY})

92 changes: 58 additions & 34 deletions indra/cmake/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,65 @@ use_prebuilt_binary(boost)
# with the address size.
set(addrsfx "-x${ADDRESS_SIZE}")

if (WINDOWS)
target_link_libraries( ll::boost INTERFACE
libboost_context-mt${addrsfx}
libboost_fiber-mt${addrsfx}
libboost_filesystem-mt${addrsfx}
libboost_program_options-mt${addrsfx}
libboost_regex-mt${addrsfx}
libboost_system-mt${addrsfx}
libboost_thread-mt${addrsfx}
libboost_url-mt${addrsfx})
elseif (LINUX)
target_link_libraries( ll::boost INTERFACE
boost_context-mt${addrsfx}
boost_fiber-mt${addrsfx}
boost_filesystem-mt${addrsfx}
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_signals-mt${addrsfx}
boost_system-mt${addrsfx}
boost_thread-mt${addrsfx}
boost_url-mt${addrsfx})
elseif (DARWIN)
target_link_libraries( ll::boost INTERFACE
boost_context-mt${addrsfx}
boost_fiber-mt${addrsfx}
boost_filesystem-mt${addrsfx}
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_system-mt${addrsfx}
boost_thread-mt${addrsfx}
boost_url-mt${addrsfx})
endif (WINDOWS)
find_library(BOOST_CONTEXT_LIBRARY
NAMES
boost_context-mt
boost_context-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_FIBER_LIBRARY
NAMES
boost_fiber-mt
boost_fiber-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_FILESYSTEM_LIBRARY
NAMES
boost_filesystem-mt
boost_filesystem-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_PROGRAMOPTIONS_LIBRARY
NAMES
boost_program_options-mt
boost_program_options-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_REGEX_LIBRARY
NAMES
boost_regex-mt
boost_regex-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_SYSTEM_LIBRARY
NAMES
boost_system-mt
boost_system-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_THREAD_LIBRARY
NAMES
boost_thread-mt
boost_thread-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

find_library(BOOST_URL_LIBRARY
NAMES
boost_url-mt
boost_url-mt${addrsfx}
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

target_link_libraries(ll::boost INTERFACE
${BOOST_CONTEXT_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_FILESYSTEM_LIBRARY}
${BOOST_PROGRAMOPTIONS_LIBRARY}
${BOOST_REGEX_LIBRARY}
${BOOST_SYSTEM_LIBRARY}
${BOOST_THREAD_LIBRARY}
${BOOST_URL_LIBRARY})

if (LINUX)
set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt)
set(BOOST_THREAD_LIBRARY ${BOOST_THREAD_LIBRARY} rt)
target_link_libraries(ll::boost INTERFACE rt)
endif (LINUX)

2 changes: 2 additions & 0 deletions indra/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ set(cmake_SOURCE_FILES
Prebuilt.cmake
PulseAudio.cmake
Python.cmake
SSE2NEON.cmake
TemplateCheck.cmake
TinyEXR.cmake
TinyGLTF.cmake
Tracy.cmake
Tut.cmake
UI.cmake
UnixInstall.cmake
Expand Down
24 changes: 9 additions & 15 deletions indra/cmake/CURL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ add_library( ll::libcurl INTERFACE IMPORTED )

use_system_binary(libcurl)
use_prebuilt_binary(curl)
if (WINDOWS)
target_link_libraries(ll::libcurl INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.lib
ll::openssl
ll::nghttp2
ll::zlib-ng
)
else ()
target_link_libraries(ll::libcurl INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.a
ll::openssl
ll::nghttp2
ll::zlib-ng
)
endif ()

find_library(CURL_LIBRARY
NAMES
libcurl.lib
libcurl.a
PATHS "${ARCH_PREBUILT_DIRS_RELEASE}" REQUIRED NO_DEFAULT_PATH)

target_link_libraries(ll::libcurl INTERFACE ${CURL_LIBRARY} ll::openssl ll::nghttp2 ll::zlib-ng)

target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
21 changes: 0 additions & 21 deletions indra/cmake/Copy3rdPartyLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ if(WINDOWS)
openjp2.dll
)

if(LLCOMMON_LINK_SHARED)
set(release_files ${release_files} libapr-1.dll)
set(release_files ${release_files} libaprutil-1.dll)
endif()

# Filenames are different for 32/64 bit BugSplat file and we don't
# have any control over them so need to branch.
if (USE_BUGSPLAT)
Expand Down Expand Up @@ -171,15 +166,6 @@ elseif(DARWIN)
libndofdev.dylib
)

if(LLCOMMON_LINK_SHARED)
set(release_files ${release_files}
libapr-1.0.dylib
libapr-1.dylib
libaprutil-1.0.dylib
libaprutil-1.dylib
)
endif()

if (TARGET ll::openal)
list(APPEND release_files libalut.dylib libopenal.dylib)
endif ()
Expand Down Expand Up @@ -225,13 +211,6 @@ elseif(LINUX)
libgmodule-2.0.so
libgobject-2.0.so
)

if(LLCOMMON_LINK_SHARED)
set(release_files ${release_files}
libapr-1.so.0
libaprutil-1.so.0
)
endif()
endif()

else(WINDOWS)
Expand Down
Loading
Loading