Skip to content

Commit

Permalink
Update NDK to 26.1.10909125
Browse files Browse the repository at this point in the history
Starting from version 26+, the NDK is based on LLVM 17 and comes with Clang 17 featuring full language and library C++20 support.
This means we can get rid of the massive LLVM submodule in the repo, which will be done in a following commit.
  • Loading branch information
nickbeth committed Jan 4, 2024
1 parent c3f14ba commit 45aa394
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
22 changes: 0 additions & 22 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,6 @@ set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=full -fno-stack-protector -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Ofast")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Ofast")

# libcxxabi
set(ANDROID_STL "none")
set(LIBCXXABI_INCLUDE_TESTS OFF)
set(LIBCXXABI_ENABLE_SHARED OFF)
set(LIBCXXABI_ENABLE_ASSERTIONS OFF)
set(LIBCXXABI_LIBCXX_INCLUDES "${LIBCXX_TARGET_INCLUDE_DIRECTORY}" CACHE STRING "" FORCE)
add_subdirectory("libraries/llvm/libcxxabi")

# libcxx
set(LIBCXX_INCLUDE_TESTS OFF)
set(LIBCXX_INCLUDE_BENCHMARKS OFF)
set(LIBCXX_INCLUDE_DOCS OFF)
set(LIBCXX_ENABLE_SHARED OFF)
set(LIBCXX_ENABLE_ASSERTIONS OFF)
set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON)
add_subdirectory("libraries/llvm/libcxx")
link_libraries(cxx_static)
get_target_property(LIBCXX_INCLUDE_COMPILE_OPTION cxx-headers INTERFACE_INCLUDE_DIRECTORIES)
string(REGEX REPLACE "-I" "" LIBCXX_INCLUDE_DIRECTORY_LIST "${LIBCXX_INCLUDE_COMPILE_OPTION}")
list(GET LIBCXX_INCLUDE_DIRECTORY_LIST 1 LIBCXX_TARGET_INCLUDE_DIRECTORY) # We just want the target include directory
set_target_properties(cxx-headers PROPERTIES INTERFACE_COMPILE_OPTIONS -isystem${LIBCXX_TARGET_INCLUDE_DIRECTORY})

# Skyline's Boost fork
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ android {
}

/* NDK and CMake */
ndkVersion '25.0.8775105'
ndkVersion '26.1.10909125'
externalNativeBuild {
cmake {
version '3.22.1+'
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/skyline/kernel/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ namespace skyline::kernel {
auto dstChunk = chunks.lower_bound(destination.data());
if (destination.data() < dstChunk->first)
--dstChunk;
while (dstChunk->second.state.value == memory::states::Unmapped)
while (dstChunk->second.state == memory::states::Unmapped)
++dstChunk;

if ((destination.data() + destination.size()) > dstChunk->first) [[likely]] {
Expand Down

0 comments on commit 45aa394

Please sign in to comment.