-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4c34ad
commit 4ba72ef
Showing
1,599 changed files
with
317,296 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Maven | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
fetch-depth: 0 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
- name: Build with Gradle | ||
run: ./gradlew :cxx:publish | ||
env: | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.maven_pgp_signingKey }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.maven_pgp_signingPassword }} | ||
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.maven_ossrhUsername }} | ||
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.maven_ossrhPassword }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +0,0 @@ | ||
[submodule "cxx-source"] | ||
path = cxx-source | ||
url = [email protected]:topjohnwu/libcxx.git | ||
branch = master | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
plugins { | ||
alias(libs.plugins.lsplugin.publish) | ||
} | ||
|
||
val androidTargetSdkVersion by extra(35) | ||
val androidMinSdkVersion by extra(21) | ||
val androidBuildToolsVersion by extra("35.0.0") | ||
val androidCompileSdkVersion by extra(35) | ||
val androidNdkVersion by extra("27.0.12077973") | ||
val androidCmakeVersion by extra("3.28.0+") |
Submodule cxx-source
deleted from
b74fd5
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
plugins { | ||
alias(libs.plugins.agp.lib) | ||
alias(libs.plugins.lsplugin.jgit) | ||
alias(libs.plugins.lsplugin.publish) | ||
alias(libs.plugins.lsplugin.cmaker) | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
val androidTargetSdkVersion: Int by rootProject.extra | ||
val androidMinSdkVersion: Int by rootProject.extra | ||
val androidBuildToolsVersion: String by rootProject.extra | ||
val androidCompileSdkVersion: Int by rootProject.extra | ||
val androidNdkVersion: String by rootProject.extra | ||
val androidCmakeVersion: String by rootProject.extra | ||
|
||
|
||
android { | ||
compileSdk = androidCompileSdkVersion | ||
ndkVersion = androidNdkVersion | ||
buildToolsVersion = androidBuildToolsVersion | ||
|
||
buildFeatures { | ||
buildConfig = false | ||
prefabPublishing = true | ||
androidResources = false | ||
prefab = true | ||
} | ||
|
||
packaging { | ||
jniLibs { | ||
excludes += "**.so" | ||
} | ||
} | ||
|
||
prefab { | ||
register("cxx") { | ||
headers = "jni/libcxx/include" | ||
} | ||
} | ||
|
||
defaultConfig { | ||
minSdk = androidMinSdkVersion | ||
} | ||
|
||
lint { | ||
abortOnError = true | ||
checkReleaseBuilds = false | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path = file("jni/CMakeLists.txt") | ||
version = androidCmakeVersion | ||
} | ||
} | ||
namespace = "org.lsposed.libcxx" | ||
|
||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
} | ||
} | ||
|
||
cmaker { | ||
default { | ||
abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64", "riscv64") | ||
arguments += "-DANDROID_STL=none" | ||
arguments += "-DCMAKE_VERBOSE_MAKEFILE=ON" | ||
} | ||
buildTypes { | ||
|
||
} | ||
} | ||
|
||
publish { | ||
githubRepo = "LSPosed/prefab-libcxx" | ||
publications { | ||
register<MavenPublication>("libcxx") { | ||
artifactId = "libcxx" | ||
afterEvaluate { | ||
from(components.getByName("release")) | ||
} | ||
group = "org.lsposed.libcxx" | ||
version = androidNdkVersion | ||
pom { | ||
name.set("libcxx") | ||
description.set("libcxx") | ||
url.set("https://github.com/LSPosed/prefab-libcxx") | ||
licenses { | ||
license { | ||
name.set("Apache v2.0") | ||
url.set("https://github.com/llvm/llvm-project/blob/main/LICENSE.TXT") | ||
} | ||
} | ||
developers { | ||
developer { | ||
name.set("LLVM") | ||
url.set("https://llvm.org/") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:https://github.com/LSPosed/prefab-libcxx.git") | ||
url.set("https://github.com/LSPosed/prefab-libcxx") | ||
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
cmake_minimum_required(VERSION 3.22.1) | ||
|
||
project(cxx) | ||
|
||
set(CMAKE_CXX_STANDARD 23) | ||
|
||
file(GLOB LIBCXX_SOURCES "libcxx/src/*.cpp" "libcxx/src/filesystem/*.cpp") | ||
|
||
list(FILTER LIBCXX_SOURCES EXCLUDE REGEX ".*/(tzdb_list|tz|locale|ios|iostream|ostream|fstream|regex|ios.instantiations|strstream)\.cpp$") | ||
|
||
message(STATUS "LIBCXX_SOURCES: ${LIBCXX_SOURCES}") | ||
|
||
set(LIBCXX_EXPORT_FLAGS | ||
-DLIBCXX_BUILDING_LIBCXXABI | ||
-D_LIBCPP_HAS_NO_EXCEPTIONS | ||
-D_LIBCPP_NO_RTTI | ||
-D_LIBCPP_BUILDING_LIBRARY | ||
-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS | ||
-D_LIBCXXABI_NO_EXCEPTIONS | ||
-D_LIBCPP_HAS_NO_LOCALIZATION | ||
) | ||
set(LIBCXX_FLAGS | ||
-fvisibility-global-new-delete-hidden | ||
-fvisibility=hidden | ||
-fvisibility-inlines-hidden | ||
) | ||
set(LIBCXX_EXPORT_INCLUDES libcxx/include) | ||
set(LIBCXX_INCLUDES libcxx/src) | ||
|
||
set(LIBCXXABI_SOURCES | ||
abort_message.cpp | ||
cxa_aux_runtime.cpp | ||
cxa_default_handlers.cpp | ||
cxa_exception_storage.cpp | ||
cxa_guard.cpp | ||
cxa_handlers.cpp | ||
cxa_noexception.cpp | ||
cxa_thread_atexit.cpp | ||
cxa_vector.cpp | ||
cxa_virtual.cpp | ||
stdlib_exception.cpp | ||
stdlib_new_delete.cpp | ||
stdlib_stdexcept.cpp | ||
stdlib_typeinfo.cpp | ||
) | ||
list(TRANSFORM LIBCXXABI_SOURCES PREPEND libcxxabi/src/) | ||
set(LIBCXXABI_FLAGS | ||
-Wno-macro-redefined | ||
-Wno-unknown-attributes | ||
-DHAS_THREAD_LOCAL) | ||
set(LIBCXXABI_INCLUDES libcxxabi/include) | ||
|
||
add_library(cxx STATIC ${LIBCXX_SOURCES} ${LIBCXXABI_SOURCES}) | ||
target_compile_options(cxx PUBLIC ${LIBCXX_EXPORT_FLAGS}) | ||
target_compile_options(cxx PRIVATE ${LIBCXX_FLAGS} ${LIBCXXABI_FLAGS} -ffunction-sections -fdata-sections) | ||
target_include_directories(cxx PUBLIC ${LIBCXX_EXPORT_INCLUDES}) | ||
target_include_directories(cxx PRIVATE ${LIBCXX_INCLUDES} ${LIBCXXABI_INCLUDES}) | ||
|
||
target_compile_options(cxx PRIVATE -flto) | ||
target_link_options(cxx PRIVATE -flto) |
Oops, something went wrong.