[core] Fix ccache on master build (#435)
This commit is contained in:
parent
7f1f5ced93
commit
16982c5a3e
|
|
@ -52,7 +52,10 @@ jobs:
|
|||
key: ccache-cache-${{ github.sha }}
|
||||
restore-keys: ccache-cache-
|
||||
- name: Install ccache
|
||||
run: sudo apt-get install -y ccache
|
||||
run: |
|
||||
sudo apt-get install -y ccache
|
||||
ccache -o max_size=2G
|
||||
ccache -o hash_dir=false
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
echo 'org.gradle.caching=true' >> gradle.properties
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@
|
|||
url = https://github.com/topjohnwu/libcxx.git
|
||||
[submodule "core/src/main/cpp/external/Dobby"]
|
||||
path = core/src/main/cpp/external/Dobby
|
||||
url = https://github.com/jmpews/Dobby.git
|
||||
url = https://github.com/LSPosed/Dobby.git
|
||||
|
|
|
|||
|
|
@ -99,16 +99,20 @@ android {
|
|||
"-fomit-frame-pointer",
|
||||
"-fpie", "-fPIC",
|
||||
"-Wno-builtin-macro-redefined",
|
||||
"-D__FILE__=__FILE_NAME__",
|
||||
"-DRIRU_MODULE",
|
||||
"-DRIRU_MODULE_API_VERSION=$moduleMaxRiruApiVersion",
|
||||
"-DRIRU_MODULE_VERSION=$verCode",
|
||||
"-D__FILE__=__FILE_NAME__",
|
||||
"""-DRIRU_MODULE_VERSION_NAME=\"$verName\"""",
|
||||
"""-DMODULE_NAME=\"$riruModuleId\""""
|
||||
// "-DRIRU_MODULE_VERSION=$verCode", // this will stop ccache from hitting
|
||||
// """-DRIRU_MODULE_VERSION_NAME=\"$verName\"""",
|
||||
)
|
||||
cppFlags("-std=c++20", *flags)
|
||||
cFlags("-std=c18", *flags)
|
||||
arguments("-DANDROID_STL=none")
|
||||
arguments(
|
||||
"-DANDROID_STL=none",
|
||||
"-DVERSION_CODE=$verCode",
|
||||
"-DVERSION_NAME=$verName"
|
||||
)
|
||||
targets("lspd")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1e3acde39590f365c1fe489ecbd43f7ee8a5e20d
|
||||
Subproject commit 2da2c218b0ae824b3a0e5ef1474223636f7f32a9
|
||||
|
|
@ -20,10 +20,13 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
|
||||
configure_file(template/config.cpp src/config.cpp)
|
||||
|
||||
aux_source_directory(src SRC_LIST)
|
||||
aux_source_directory(src/jni SRC_JNI_LIST)
|
||||
include_directories(include src)
|
||||
add_executable(lspd ${SRC_LIST} ${SRC_JNI_LIST})
|
||||
|
||||
add_executable(lspd ${SRC_LIST} ${SRC_JNI_LIST} ${CMAKE_CURRENT_BINARY_DIR}/src/config.cpp)
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--dynamic-list=${CMAKE_SOURCE_DIR}/dynamic_list")
|
||||
|
||||
|
|
|
|||
|
|
@ -58,29 +58,32 @@ namespace lspd {
|
|||
# define LP_SELECT(lp32, lp64) lp32
|
||||
#endif
|
||||
|
||||
static constexpr auto kEntryClassName = "org.lsposed.lspd.core.Main"_tstr;
|
||||
static constexpr auto kClassLinkerClassName = "org.lsposed.lspd.nativebridge.ClassLinker"_tstr;
|
||||
static constexpr auto kBridgeServiceClassName = "org.lsposed.lspd.service.BridgeService"_tstr;
|
||||
static constexpr auto kDexPath = "framework/lspd.dex"_tstr;
|
||||
inline static constexpr auto kEntryClassName = "org.lsposed.lspd.core.Main"_tstr;
|
||||
inline static constexpr auto kClassLinkerClassName = "org.lsposed.lspd.nativebridge.ClassLinker"_tstr;
|
||||
inline static constexpr auto kBridgeServiceClassName = "org.lsposed.lspd.service.BridgeService"_tstr;
|
||||
inline static constexpr auto kDexPath = "framework/lspd.dex"_tstr;
|
||||
|
||||
static constexpr auto kLibArtName = "libart.so"_tstr;
|
||||
static constexpr auto kLibFwName = "libandroidfw.so"_tstr;
|
||||
static constexpr auto kLinkerName = LP_SELECT("linker"_tstr, "linker64"_tstr);
|
||||
static constexpr auto kLibcName = "libc.so"_tstr;
|
||||
static constexpr auto kLibbaseName = "libbase.so"_tstr;
|
||||
inline static constexpr auto kLibArtName = "libart.so"_tstr;
|
||||
inline static constexpr auto kLibFwName = "libandroidfw.so"_tstr;
|
||||
inline static constexpr auto kLinkerName = LP_SELECT("linker"_tstr, "linker64"_tstr);
|
||||
inline static constexpr auto kLibcName = "libc.so"_tstr;
|
||||
inline static constexpr auto kLibbaseName = "libbase.so"_tstr;
|
||||
|
||||
static constexpr auto kLibBasePath =
|
||||
inline static constexpr auto kLibBasePath =
|
||||
LP_SELECT("/system/lib/"_tstr,
|
||||
"/system/lib64/"_tstr);
|
||||
|
||||
static constexpr auto kBinBasePath = "/system/bin/"_tstr;
|
||||
inline static constexpr auto kBinBasePath = "/system/bin/"_tstr;
|
||||
|
||||
static constexpr auto kLibFwPath = kLibBasePath + kLibFwName;
|
||||
static constexpr auto kLinkerPath = kBinBasePath + kLinkerName;
|
||||
static constexpr auto kLibcPath = kLibBasePath + kLibcName;
|
||||
static constexpr auto kLibbasePath = kLibBasePath + kLibbaseName;
|
||||
inline static constexpr auto kLibFwPath = kLibBasePath + kLibFwName;
|
||||
inline static constexpr auto kLinkerPath = kBinBasePath + kLinkerName;
|
||||
inline static constexpr auto kLibcPath = kLibBasePath + kLibcName;
|
||||
inline static constexpr auto kLibbasePath = kLibBasePath + kLibbaseName;
|
||||
|
||||
inline constexpr const char *const BoolToString(bool b) {
|
||||
inline constexpr const char *BoolToString(bool b) {
|
||||
return b ? "true" : "false";
|
||||
}
|
||||
|
||||
extern const int versionCode;
|
||||
extern const char* const versionName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace lspd {
|
|||
|
||||
void onModuleLoaded() {
|
||||
LOGI("onModuleLoaded: welcome to LSPosed!");
|
||||
LOGI("onModuleLoaded: version %s (%d)", RIRU_MODULE_VERSION_NAME, RIRU_MODULE_VERSION);
|
||||
LOGI("onModuleLoaded: version %s (%d)", versionName, versionCode);
|
||||
// rirud must be used in onModuleLoaded
|
||||
Context::GetInstance()->PreLoadDex(magiskPath + '/' + kDexPath);
|
||||
InitSymbolCache();
|
||||
|
|
@ -99,8 +99,8 @@ namespace lspd {
|
|||
.moduleApiVersion = RIRU_MODULE_API_VERSION,
|
||||
.moduleInfo = RiruModuleInfo{
|
||||
.supportHide = !isDebug,
|
||||
.version = RIRU_MODULE_VERSION,
|
||||
.versionName = RIRU_MODULE_VERSION_NAME,
|
||||
.version = versionCode,
|
||||
.versionName = versionName,
|
||||
.onModuleLoaded = lspd::onModuleLoaded,
|
||||
.forkAndSpecializePre = lspd::nativeForkAndSpecializePre,
|
||||
.forkAndSpecializePost = lspd::nativeForkAndSpecializePost,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
#include "config.h"
|
||||
|
||||
namespace lspd {
|
||||
const int versionCode = ${VERSION_CODE};
|
||||
extern const char* const versionName = "${VERSION_NAME}";
|
||||
}
|
||||
|
|
@ -1,6 +1,16 @@
|
|||
rootProject.name = "LSPosed"
|
||||
include(":core", ":hiddenapi-stubs", ":app", ":service", ":interface", ":hiddenapi-bridge", ":manager-service")
|
||||
include(
|
||||
":core",
|
||||
":hiddenapi-stubs",
|
||||
":app",
|
||||
":service",
|
||||
":interface",
|
||||
":hiddenapi-bridge",
|
||||
":manager-service"
|
||||
)
|
||||
|
||||
val serviceRoot = "service"
|
||||
project(":interface").projectDir = file("$serviceRoot${File.separator}interface")
|
||||
project(":service").projectDir = file("$serviceRoot${File.separator}service")
|
||||
|
||||
buildCache { local { removeUnusedEntriesAfterDays = 1 } }
|
||||
|
|
|
|||
Loading…
Reference in New Issue