Skip to content

Commit

Permalink
linux: Improve helpers Makefile to use internal Meson
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed Oct 21, 2024
1 parent 36619e5 commit 03d609c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/linux/helpers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ top_srcdir := ../../..
releng := $(top_srcdir)/releng

BUILDDIR ?= $(top_srcdir)/build
MESON ?= $(releng)/meson/meson.py

ifdef FRIDA_HOST
host_machine := $(FRIDA_HOST)
Expand All @@ -14,8 +15,8 @@ crossfile := $(BUILDDIR)/frida-$(host_machine).txt

build: ext/linux/tools/include/nolibc/nolibc.h
rm -rf build
meson setup --cross-file $(crossfile) -Db_lto=true build
meson compile -C build
$(MESON) setup --cross-file $(crossfile) -Db_lto=true build
$(MESON) compile -C build
cp build/bootstrapper.bin bootstrapper-$(host_arch).bin
cp build/loader.bin loader-$(host_arch).bin

Expand Down
8 changes: 0 additions & 8 deletions src/linux/helpers/rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ usage () {
exit 1
}

setup_meson () {
ln -s "$RELENG_DIR/meson/meson.py" "$TMP_MESON_DIR/meson"
chmod +x "$TMP_MESON_DIR/meson"
export PATH="$TMP_MESON_DIR:$PATH"
}

ARCHS=(
x86
x86_64
Expand Down Expand Up @@ -84,8 +78,6 @@ build_arch () {
export CC="gcc -m32" CXX="g++ -m32" STRIP="strip"
fi

setup_meson

cd "$FRIDA_CORE_DIR"

rm -rf "$BUILD_DIR"
Expand Down

0 comments on commit 03d609c

Please sign in to comment.