Skip to content

Commit 78058ff

Browse files
committed
Make Apple builds more reproducible
1 parent 061b1a3 commit 78058ff

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/compile_sqlite.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
path: sqlite-src/
2020
# TODO: Migrate back to ${{ hashFiles('tool/sqlite_build_id') }} after https://github.com/orgs/community/discussions/180160 gets fixed.
21-
key: sqlite-src-5fecfe0668c6580f390a5bf1a2485e989cab0094b3b9725a8bd2ee3f0d378701
21+
key: sqlite-src-v10
2222

2323
- uses: dart-lang/setup-dart@v1
2424
if: steps.cache_build.outputs.cache-hit != 'true'
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
path: sqlite-compiled
5353
# TODO: Migrate back to ${{ hashFiles('tool/sqlite_build_id') }} after https://github.com/orgs/community/discussions/180160 gets fixed.
54-
key: sqlite-prebuilt-${{ runner.os }}-5fecfe0668c6580f390a5bf1a2485e989cab0094b3b9725a8bd2ee3f0d378701
54+
key: sqlite-prebuilt-${{ runner.os }}-v10
5555

5656
- name: Download sqlite3 sources
5757
if: steps.cache_build.outputs.cache-hit != 'true'
@@ -93,7 +93,7 @@ jobs:
9393
with:
9494
path: sqlite3_wasm_build/out/
9595
# TODO: Migrate back to ${{ hashFiles('tool/sqlite_build_id') }} after https://github.com/orgs/community/discussions/180160 gets fixed.
96-
key: sqlite-prebuilt-wasm-5fecfe0668c6580f390a5bf1a2485e989cab0094b3b9725a8bd2ee3f0d378701
96+
key: sqlite-prebuilt-wasm-v10
9797

9898
# clang 18 that ships on ubuntu crashes when compiling the wasm sources
9999
- name: Install LLVM and Clang

sqlite3/hook/build.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ ${usedSqliteSymbols.map((symbol) => ' $symbol;').join('\n')}
8888
'-fdata-sections',
8989
'-Wl,--gc-sections',
9090
],
91+
if (input.config.code.targetOS case OS.iOS || OS.macOS) ...[
92+
'-headerpad_max_install_names',
93+
// clang would use the temporary directory passed by
94+
// native_toolchain_c otherwise. So this makes improves
95+
// reproducibility.
96+
'-install_name',
97+
'@rpath/libsqlite3.dylib',
98+
],
9199
],
92100
libraries: [
93101
if (input.config.code.targetOS == OS.android)

0 commit comments

Comments
 (0)