Skip to content

Commit d1fde57

Browse files
committed
VMP example, support const-string and invoke-static
1 parent 1a43cbe commit d1fde57

File tree

10 files changed

+530
-3
lines changed

10 files changed

+530
-3
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010

1111
defaultConfig {
1212
applicationId = "com.cyrus.example"
13-
minSdk = 24
13+
minSdk = 26
1414
targetSdk = 34
1515
versionCode = 1
1616
versionName = "1.0"
@@ -57,11 +57,10 @@ android {
5757
compose = true
5858
}
5959
ndkVersion = "27.1.12297006"
60-
6160
}
6261

6362
dependencies {
64-
63+
implementation(project(":vmp"))
6564
implementation(libs.androidx.core.ktx)
6665
implementation(libs.androidx.lifecycle.runtime.ktx)
6766
implementation(libs.androidx.activity.compose)

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
android:theme="@style/Theme.AndroidExample"
1717
tools:ignore="HardcodedDebugMode"
1818
tools:targetApi="31">
19+
<activity
20+
android:name=".vmp.VMPActivity"
21+
android:exported="false" />
1922
<activity
2023
android:name=".ollvm.OLLVMActivity"
2124
android:exported="false" />

app/src/main/cpp/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,19 @@ target_compile_options(
126126
target_link_libraries( # 将 log 库链接到目标库
127127
ollvm-lib
128128
${log-lib})
129+
130+
131+
## VMP ##########################################################################################
132+
133+
add_library( # 设置库的名称
134+
vmp-lib
135+
136+
# 设置库的类型
137+
SHARED
138+
139+
# 设置源文件路径
140+
vmp-lib.cpp)
141+
142+
target_link_libraries( # 将 log 库链接到目标库
143+
vmp-lib
144+
${log-lib})

0 commit comments

Comments
 (0)