try to make core build reproducible

This commit is contained in:
adbenitez
2024-08-28 15:31:32 +02:00
parent 8a044221b1
commit 2ce614dc55
2 changed files with 4 additions and 4 deletions
+1 -2
View File
@@ -1,5 +1,3 @@
LOCAL_LDFLAGS += -Wl,--build-id=none
JNI_DIR := $(call my-dir)
LOCAL_PATH := $(call my-dir)
@@ -33,5 +31,6 @@ LOCAL_CFLAGS += -Drestrict='' -D__EMX__ -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT
LOCAL_CFLAGS += -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS
LOCAL_SRC_FILES := dc_wrapper.c
LOCAL_LDFLAGS += -Wl,--build-id=none
include $(BUILD_SHARED_LIBRARY)
+3 -2
View File
@@ -65,10 +65,11 @@ if test -z "$NDK_HOST_TAG"; then
NDK_HOST_TAG="$KERNEL-$ARCH"
fi
unset RUSTFLAGS
# make core build reproducible
ROOT_DIR="$(realpath $(dirname $(dirname "$0")))"
export RUSTFLAGS="-C link-args=-Wl,--build-id=none --remap-path-prefix=$HOME/.cargo= --remap-path-prefix=$ROOT_DIR="
export SOURCE_DATE_EPOCH=1
export CFLAGS="$CFLAGS -ffile-prefix-map=$ROOT_DIR="
TOOLCHAIN="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$NDK_HOST_TAG"
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="$TOOLCHAIN/bin/armv7a-linux-androideabi16-clang"