Commit graph

14 commits

Author SHA1 Message Date
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