Skip to content

Commit 037394c

Browse files
committed
Reduce sysroot size
1 parent 1516de2 commit 037394c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

build-hnp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ base.hnp: $(STAMP) utils/pbcopy utils/pbpaste
8282

8383
rebuild-%:
8484
make -C $(patsubst rebuild-%,%,$@)
85-
touch $@
85+
touch $(patsubst rebuild-%,%/.stamp,$@)
8686

8787
clean:
8888
rm -f $(STAMP)

build-hnp/python/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ all: download/Python-3.13.5.tar.xz
1212
cd temp/Python-3.13.5/build-native && CC="cc" CXX="" LD="ld" AR="ar" CXXFLAGS="" CFLAGS="" LDFLAGS="" make -j $(shell nproc)
1313
cd temp/Python-3.13.5/build-native && CC="cc" CXX="" LD="ld" AR="ar" CXXFLAGS="" CFLAGS="" LDFLAGS="" make install DESTDIR=$(shell pwd)/temp/native
1414
# HACK: set ANDROID_API_LEVEL=1 to link the shared libraries with libpython
15-
cd temp/Python-3.13.5/build && ../configure ANDROID_API_LEVEL=1 --enable-shared --host aarch64-unknown-linux-musl --build=aarch64 --enable-ipv6 --with-ensurepip=install --with-build-python=$(shell pwd)/temp/native/usr/local/bin/python3 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no
15+
cd temp/Python-3.13.5/build && ../configure ANDROID_API_LEVEL=1 --disable-test-modules --enable-shared --host aarch64-unknown-linux-musl --build=aarch64 --enable-ipv6 --with-ensurepip=install --with-build-python=$(shell pwd)/temp/native/usr/local/bin/python3 ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no
1616
# missing gettext in libintl.h
1717
cd temp/Python-3.13.5/build && sed -i.bak "s/#define HAVE_LIBINTL_H 1//" pyconfig.h
1818
cd temp/Python-3.13.5/build && make -j $(shell nproc)
1919
cd temp/Python-3.13.5/build && make install DESTDIR=$(shell pwd)/build
2020
$(OHOS_SDK_HOME)/native/llvm/bin/llvm-strip build/usr/local/bin/python3.13
2121
$(OHOS_SDK_HOME)/native/llvm/bin/llvm-strip build/usr/local/lib/*.so
22+
$(OHOS_SDK_HOME)/native/llvm/bin/llvm-strip build/usr/local/lib/python3.13/config-3.13/libpython3.13.a
2223
mkdir -p ../sysroot
2324
cp -rfv build/usr/local/. ../sysroot | tee file.lst
2425

0 commit comments

Comments
 (0)