Skip to content

Commit 8d6aff9

Browse files
committed
Merge pull request monero-project#9538
c461b3c make: remove static targets (tobtoht)
2 parents 97c0ce7 + c461b3c commit 8d6aff9

File tree

3 files changed

+6
-86
lines changed

3 files changed

+6
-86
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- name: build
7878
run: |
7979
${{env.CCACHE_SETTINGS}}
80-
make release-static-win64 -j${{env.MAKE_JOB_COUNT}}
80+
make release-static -j${{env.MAKE_JOB_COUNT}}
8181
8282
build-arch:
8383
name: 'Arch Linux'

Makefile

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cmake-debug:
5555
cd $(builddir)/debug && cmake -D CMAKE_BUILD_TYPE=Debug $(topdir)
5656
5757
debug: cmake-debug
58-
cd $(builddir)/debug && $(MAKE)
58+
cd $(builddir)/debug && cmake --build .
5959
6060
# Temporarily disable some tests:
6161
# * libwallet_api_tests fail (Issue #895)
@@ -75,24 +75,12 @@ debug-all:
7575
mkdir -p $(builddir)/debug
7676
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
7777
78-
debug-static-all:
79-
mkdir -p $(builddir)/debug
80-
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D STATIC=ON -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
81-
82-
debug-static-win64:
83-
mkdir -p $(builddir)/debug
84-
cd $(builddir)/debug && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" $(topdir) && $(MAKE)
85-
86-
debug-static-win32:
87-
mkdir -p $(builddir)/debug
88-
cd $(builddir)/debug && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x32" $(topdir) && $(MAKE)
89-
9078
cmake-release:
9179
mkdir -p $(builddir)/release
9280
cd $(builddir)/release && cmake -D CMAKE_BUILD_TYPE=Release $(topdir)
9381
9482
release: cmake-release
95-
cd $(builddir)/release && $(MAKE)
83+
cd $(builddir)/release && cmake --build .
9684
9785
release-test:
9886
mkdir -p $(builddir)/release
@@ -104,60 +92,12 @@ release-all:
10492
10593
release-static:
10694
mkdir -p $(builddir)/release
107-
cd $(builddir)/release && cmake -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
95+
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="default" -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
10896
10997
coverage:
11098
mkdir -p $(builddir)/debug
11199
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug -D COVERAGE=ON $(topdir) && $(MAKE) && $(MAKE) test
112100
113-
# Targets for specific prebuilt builds which will be advertised for updates by their build tag
114-
115-
release-static-linux-armv6:
116-
mkdir -p $(builddir)/release
117-
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv6" $(topdir) && $(MAKE)
118-
119-
release-static-linux-armv7:
120-
mkdir -p $(builddir)/release
121-
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv7" $(topdir) && $(MAKE)
122-
123-
release-static-android-armv7:
124-
mkdir -p $(builddir)/release/translations
125-
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
126-
cd $(builddir)/release && CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D ANDROID=true -D BUILD_TAG="android-armv7" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARM_MODE=ON -D CMAKE_ANDROID_ARCH_ABI="armeabi-v7a" ../.. && $(MAKE)
127-
128-
release-static-android-armv8:
129-
mkdir -p $(builddir)/release/translations
130-
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
131-
cd $(builddir)/release && CC=aarch64-linux-android-clang CXX=aarch64-linux-android-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D ANDROID=true -D BUILD_TAG="android-armv8" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" ../.. && $(MAKE)
132-
133-
release-static-linux-armv8:
134-
mkdir -p $(builddir)/release
135-
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
136-
137-
release-static-linux-x86_64:
138-
mkdir -p $(builddir)/release
139-
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)
140-
141-
release-static-freebsd-x86_64:
142-
mkdir -p $(builddir)/release
143-
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="freebsd-x64" $(topdir) && $(MAKE)
144-
145-
release-static-mac-x86_64:
146-
mkdir -p $(builddir)/release
147-
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
148-
149-
release-static-linux-i686:
150-
mkdir -p $(builddir)/release
151-
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x86" $(topdir) && $(MAKE)
152-
153-
release-static-win64:
154-
mkdir -p $(builddir)/release
155-
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" $(topdir) && $(MAKE)
156-
157-
release-static-win32:
158-
mkdir -p $(builddir)/release
159-
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x32" $(topdir) && $(MAKE)
160-
161101
fuzz:
162102
mkdir -p $(builddir)/fuzz
163103
cd $(builddir)/fuzz && cmake -D STATIC=ON -D SANITIZE=ON -D BUILD_TESTS=ON -D USE_LTO=OFF -D CMAKE_C_COMPILER=afl-gcc -D CMAKE_CXX_COMPILER=afl-g++ -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=fuzz -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)

README.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,6 @@ invokes cmake commands as needed.
286286
make debug
287287
```
288288

289-
* **Optional**: to build statically-linked binaries:
290-
291-
```bash
292-
make release-static
293-
```
294-
295-
Dependencies need to be built with -fPIC. Static libraries usually aren't, so you may have to build them yourself with -fPIC. Refer to their documentation for how to build them.
296-
297289
* **Optional**: build documentation in `doc/html` (omit `HAVE_DOT=YES` if `graphviz` is not installed):
298290

299291
```bash
@@ -402,7 +394,7 @@ application.
402394
* To build Monero, run:
403395
404396
```bash
405-
make release-static-win64
397+
make release-static -j $(nproc)
406398
```
407399
408400
The resulting executables can be found in `build/release/bin`
@@ -411,7 +403,7 @@ application.
411403
* **Optional**: to build Windows binaries suitable for debugging, run:
412404
413405
```bash
414-
make debug-static-win64
406+
make debug -j $(nproc)
415407
```
416408
417409
The resulting executables can be found in `build/debug/bin`
@@ -462,18 +454,6 @@ cd ../..
462454

463455
Then you can run make as usual.
464456

465-
### Building portable statically linked binaries
466-
467-
By default, in either dynamically or statically linked builds, binaries target the specific host processor on which the build happens and are not portable to other processors. Portable binaries can be built using the following targets:
468-
469-
* ```make release-static-linux-x86_64``` builds binaries on Linux on x86_64 portable across POSIX systems on x86_64 processors
470-
* ```make release-static-linux-i686``` builds binaries on Linux on x86_64 or i686 portable across POSIX systems on i686 processors
471-
* ```make release-static-linux-armv8``` builds binaries on Linux portable across POSIX systems on armv8 processors
472-
* ```make release-static-linux-armv7``` builds binaries on Linux portable across POSIX systems on armv7 processors
473-
* ```make release-static-linux-armv6``` builds binaries on Linux portable across POSIX systems on armv6 processors
474-
* ```make release-static-win64``` builds binaries on 64-bit Windows portable across 64-bit Windows systems
475-
* ```make release-static-win32``` builds binaries on 64-bit or 32-bit Windows portable across 32-bit Windows systems
476-
477457
### Cross Compiling
478458

479459
You can also cross-compile static binaries on Linux for Windows and macOS with the `depends` system.

0 commit comments

Comments
 (0)