Skip to content

Commit 50eea2e

Browse files
committed
ensure no dlopen
1 parent 745087f commit 50eea2e

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
-DIOS_PLATFORM=SIMULATOR
4848
cmake --build build --config Release
4949
50+
- name: Check validity
51+
run: |
52+
./check-validity.sh
53+
5054
- name: Install
5155
run: |
5256
xcrun simctl boot "iPhone 15"

check-validity.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set -e
2+
3+
has_dl=0
4+
5+
executable=build/src/Release-iphonesimulator/Fcitx5.app/PlugIns/keyboard.appex/keyboard
6+
7+
if nm $executable | grep dlopen; then
8+
has_dl=1
9+
fi
10+
11+
exit $has_dl

patches/fcitx5.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@ index 49d8c6e4..f6acad08 100644
147147
}
148148

149149
AddonCategory AddonInfo::category() const {
150+
diff --git a/src/lib/fcitx/addonmanager.cpp b/src/lib/fcitx/addonmanager.cpp
151+
index 55269f33..5e7b8d27 100644
152+
--- a/src/lib/fcitx/addonmanager.cpp
153+
+++ b/src/lib/fcitx/addonmanager.cpp
154+
@@ -250,7 +250,6 @@ void AddonManager::unregisterLoader(const std::string &name) {
155+
}
156+
157+
void AddonManager::registerDefaultLoader(StaticAddonRegistry *registry) {
158+
- registerLoader(std::make_unique<SharedLibraryLoader>());
159+
if (registry) {
160+
registerLoader(std::make_unique<StaticLibraryLoader>(registry));
161+
}
150162
diff --git a/src/lib/fcitx/instance.cpp b/src/lib/fcitx/instance.cpp
151163
index d2e9aa23..72f82213 100644
152164
--- a/src/lib/fcitx/instance.cpp

0 commit comments

Comments
 (0)