40 Commits

Author SHA1 Message Date
adbenitez 5c06156463 Merge remote-tracking branch 'upstream/main' 2025-04-11 18:40:37 +02:00
Hocuri be159407ff feat: In ndk-make.sh, support custom CARGO_TARGET_DIR (#3716)
Running ndk-make.sh triggers a complete rust rebuild, because some compiler flags are changed. Then when you run a normal cargo command again (cargo check etc.), there is another rebuild. My solution is to locally change the target directory. This PR makes ndk-make.sh support such custom target directories.
2025-04-03 12:35:00 +00:00
adbenitez ee17c6d75e Merge remote-tracking branch 'upstream/main' 2025-01-16 21:10:25 +01:00
Hocuri f136fa3e3a Update the core submodule so that we can have nightlies again (#3539)
* Remove jsonrpc feature

* Update submodule to latest main
2025-01-15 16:18:43 +00:00
adbenitez 2cb529be32 update ndk-make.sh 2024-12-03 12:05:30 +01:00
adbenitez ccdad0469d Merge remote-tracking branch 'upstream/main' 2024-11-13 01:45:40 +01:00
link2xt 350cd0539c build: update NDK to r27
If we are dropping Android 4 support anyway,
can as well upgrade to the current LTS NDK
which requires API level 21 (Android 5.0).
2024-11-11 16:22:55 +00:00
adbenitez 1787dc4c8b Merge remote-tracking branch 'upstream/main' 2024-10-10 20:40:06 +02:00
adbenitez 19fac45062 update scripts/ndk-make.sh, remove ROOT_DIR 2024-08-29 15:40:59 +02:00
adbenitez 8c7d1da9d9 update scripts/ndk-make.sh 2024-08-29 15:27:06 +02:00
adbenitez 2376777bba improve reproducible build 2024-08-29 14:04:55 +02:00
adbenitez a3976846f6 fix: create symbolic link for sdk in ndk-make.sh 2024-08-28 21:07:15 +02:00
adbenitez 2ce614dc55 try to make core build reproducible 2024-08-28 15:31:32 +02:00
adbenitez 8a044221b1 tweak ndk-make.sh and Android.mk 2024-08-27 18:43:01 +02:00
adbenitez e9317ab641 tweak RUSTFLAGS 2024-08-27 16:51:52 +02:00
adbenitez a278121498 keep trying reproducible core build 2024-08-27 16:31:47 +02:00
adbenitez c060810a82 try to make core building reproducible 2024-08-27 15:03:24 +02:00
adbenitez 9374d1adf3 release FOSS for IzzyOnDroid 2024-08-24 18:18:00 +02:00
adbenitez ccd187727d Merge remote-tracking branch 'upstream/main' 2024-07-07 20:04:47 +02:00
adbenitez d4048efb52 rename fat flavor to foss 2024-06-14 17:58:53 +02:00
adbenitez 47b2f4d259 enable arm64-v8a again 2024-02-10 00:36:33 -05:00
adbenitez c5da934fc1 don't build 64bit architectures 2023-11-05 22:06:13 +01:00
Paul van Leeuwen e7aaebf9ff Update ndk-make.sh initial comment to suggest an app for determining CPU architecture 2023-07-13 10:43:06 +02:00
link2xt 2849555088 Compile native library with -fvisibility=hidden
This avoids exposing the symbols of the used libraries like SQLite3
and reduces the library size.
2023-06-27 22:36:07 +00:00
link2xt 38a716a63b Reduce libnative-utils.so size 2023-06-27 13:55:15 +00:00
link2xt 4f468a4b8f Add DcJsonrpcInstance class 2023-04-22 17:58:03 +00:00
link2xt fa7812ab0d Remove workaround for Rust built against r22b NDK
Rust 1.68.0 targets NDK r25, so the workaround is no longer needed.
2023-04-06 12:49:00 +00:00
link2xt 03a98f5e78 scripts/ndk-make.sh: enable debug builds explicitly with --debug
Currently F-Droid builds split architecture .apks
by invoking ndk-make.sh with architecture argument.
This results in debug builds of the core.

This change makes debug builds explicit.
2023-03-07 10:46:58 +00:00
link2xt 1eb04a8bcb scripts/ndk-make.sh: set ranlib path 2023-03-04 01:12:06 +00:00
link2xt 86af180095 scripts/ndk-make.sh: remove CFLAGS setting
Setting __ANDROID_API__ manually causes
  '__ANDROID_API__' macro redefined [-Werror,-Wmacro-redefined]
when compiling the `ring` crate dependency.

TARGET_CC wrapper should set necessary variables itself.

See similar issue in the `ring` bugtracker for explanation:
https://github.com/briansmith/ring/issues/1519
2023-03-04 00:13:17 +00:00
link2xt 84a767dc17 scripts/ndk-make.sh: use absolute paths for TARGET_{CC,AR}
Do not assume that $PATH contains toolchain bin/
2023-03-01 00:27:25 +00:00
link2xt be8f9f1468 scripts/ndk-make.sh: export RUSTUP_TOOLCHAIN
This allows to build the core on systems without rustup.
In this case system rust is used,
but there is no error due to `+1.64.0`
being unknown argument to non-rustup cargo.
2023-03-01 00:27:25 +00:00
link2xt 8ed79c5b27 scripts/ndk-make.sh: unset RUSTFLAGS
Common way to configure `mold` is to set

    RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=/usr/bin/mold"

This breaks cross-compilation, as wrong linker is used.
2023-03-01 00:27:25 +00:00
link2xt 63fc13179b scripts/ndk-make.sh: escape grep argument
This makes `scripts/ndk-make.sh` print meaningful error.
2023-03-01 00:26:43 +00:00
link2xt 543a7965c2 Remove ndk-make.sh symlink to scripts/ndk-make.sh
If scripts are always called directly without symlink,
there is no need to use `realpath` which is not available
on some systems.

F-Droid builds already use scripts/ndk-make.sh:
<https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.b44t.messenger.yml>

Same for nightly builds running on Concourse CI.
2023-01-05 18:38:20 +00:00
link2xt 2f8992a77c Use realpath for the case of running the script via symlink 2023-01-02 14:47:04 +00:00
link2xt 78aada7027 Explicitly set RUSTUP_TOOLCHAIN to 1.64.0
Core is supposed to support all Rust versions above
MSRV, there is no need to use the same toolchain for
the core across all platforms.
2022-12-30 16:32:52 +00:00
link2xt 0c87742577 Make ndk-make.sh work with the standard shell 2022-12-09 17:41:26 +00:00
bjoern f2e1503b52 adapt build script for M1/M2 hosts (#2433)
* adapt build script for M1/M2 hosts

* GUI way to set up build environment, update NDK information

* more precice warning message
2022-12-04 02:01:04 +01:00
link2xt 2c49febc92 Move ndk-make.sh to scripts/
Keep symlink for backwards compatibility.
2022-08-14 17:46:03 +00:00