diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index 337e2208a9..b87c38a6ab 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -70,8 +70,6 @@ AC_DEFUN([BITCOIN_QT_INIT],[ [qt_lib_suffix= ]); bitcoin_qt_want_version=qt5], [qt_lib_suffix= ]) - AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH]) - AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) @@ -80,19 +78,10 @@ AC_DEFUN([BITCOIN_QT_INIT],[ AC_ARG_WITH([qtdbus], [AS_HELP_STRING([--with-qtdbus], - [enable DBus support (default is yes if qt is enabled and QtDBus is found, except on Android)])], + [enable DBus support (default is yes if qt is enabled and QtDBus is found)])], [use_dbus=$withval], [use_dbus=auto]) - dnl Android doesn't support D-Bus and certainly doesn't use it for notifications - case $host in - *android*) - if test "$use_dbus" != "yes"; then - use_dbus=no - fi - ;; - esac - AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path) ]) @@ -132,16 +121,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ if test -d "$qt_plugin_path/accessible"; then QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" fi - if test -d "$qt_plugin_path/platforms/android"; then - QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL" - fi fi AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static]) - if test "$TARGET_OS" != "android"; then - _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) - AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists]) - fi + _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) + AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists]) if test "$TARGET_OS" = "windows"; then dnl Linking against wtsapi32 is required. See #17749 and dnl https://bugreports.qt.io/browse/QTBUG-27097. @@ -160,9 +144,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ _BITCOIN_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa]) _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa]) - elif test "$TARGET_OS" = "android"; then - QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS" - AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android]) fi fi CPPFLAGS=$TEMP_CPPFLAGS @@ -357,9 +338,6 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [ PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) elif test "$TARGET_OS" = "windows"; then PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"]) - elif test "$TARGET_OS" = "android"; then - PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"]) - PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) fi ]) diff --git a/ci/lint/04_install.sh b/ci/lint/04_install.sh index 6b12c53f2a..87e3a8fa9b 100755 --- a/ci/lint/04_install.sh +++ b/ci/lint/04_install.sh @@ -57,3 +57,8 @@ SHELLCHECK_VERSION=v0.8.0 curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | \ tar --xz -xf - --directory /tmp/ mv "/tmp/shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/bin/ + +MLC_VERSION=v0.16.3 +MLC_BIN=mlc-x86_64-linux +curl -sL "https://github.com/becheran/mlc/releases/download/${MLC_VERSION}/${MLC_BIN}" -o "/usr/bin/mlc" +chmod +x /usr/bin/mlc diff --git a/ci/test/00_setup_env_android.sh b/ci/test/00_setup_env_android.sh deleted file mode 100755 index 97a6bd7318..0000000000 --- a/ci/test/00_setup_env_android.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-present The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -export HOST=aarch64-linux-android -export PACKAGES="unzip openjdk-8-jdk gradle" -export CONTAINER_NAME=ci_android -export CI_IMAGE_NAME_TAG="docker.io/amd64/ubuntu:22.04" - -export RUN_UNIT_TESTS=false -export RUN_FUNCTIONAL_TESTS=false - -export ANDROID_API_LEVEL=28 -export ANDROID_BUILD_TOOLS_VERSION=28.0.3 -export ANDROID_NDK_VERSION=23.2.8568313 -export ANDROID_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip -export ANDROID_HOME="${DEPENDS_DIR}/SDKs/android" -export ANDROID_NDK_HOME="${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}" -export DEP_OPTS="ANDROID_SDK=${ANDROID_HOME} ANDROID_NDK=${ANDROID_NDK_HOME} ANDROID_API_LEVEL=${ANDROID_API_LEVEL} ANDROID_TOOLCHAIN_BIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/" - -export BITCOIN_CONFIG="--disable-tests --enable-gui-tests --disable-bench --disable-fuzz-binary --without-utils --without-libs --without-daemon" diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh index 25962a53e5..f16321ba55 100755 --- a/ci/test/01_base_install.sh +++ b/ci/test/01_base_install.sh @@ -86,14 +86,4 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ] tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH" fi -if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then - ANDROID_TOOLS_PATH=${DEPENDS_DIR}/sdk-sources/android-tools.zip - if [ ! -f "$ANDROID_TOOLS_PATH" ]; then - ${CI_RETRY_EXE} curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH" - fi - mkdir -p "$ANDROID_HOME" - unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME" - yes | "${ANDROID_HOME}"/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "platform-tools" "platforms;android-31" "platforms;android-${ANDROID_API_LEVEL}" "ndk;${ANDROID_NDK_VERSION}" -fi - git config --global ${CFG_DONE} "true" diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh index e6c4a61341..86bb856d17 100755 --- a/ci/test/02_run_container.sh +++ b/ci/test/02_run_container.sh @@ -26,7 +26,6 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then docker volume create "${CONTAINER_NAME}_ccache" || true docker volume create "${CONTAINER_NAME}_depends" || true docker volume create "${CONTAINER_NAME}_depends_sources" || true - docker volume create "${CONTAINER_NAME}_depends_SDKs_android" || true docker volume create "${CONTAINER_NAME}_previous_releases" || true if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then @@ -52,7 +51,6 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then --mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \ --mount "type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built" \ --mount "type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources" \ - --mount "type=volume,src=${CONTAINER_NAME}_depends_SDKs_android,dst=$DEPENDS_DIR/SDKs/android" \ --mount "type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR" \ --env-file /tmp/env-$USER-$CONTAINER_NAME \ --name "$CONTAINER_NAME" \ diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index f5da7bc55d..71d9ad7f72 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -110,15 +110,6 @@ fi ccache --zero-stats PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats" -if [ -n "$ANDROID_TOOLS_URL" ]; then - make distclean || true - ./autogen.sh - bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false) - make "${MAKEJOBS}" && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk - bash -c "${PRINT_CCACHE_STATISTICS}" - exit 0 -fi - BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR" if [ -n "$CONFIG_SHELL" ]; then diff --git a/configure.ac b/configure.ac index 6177324001..6af2c5aba8 100644 --- a/configure.ac +++ b/configure.ac @@ -772,22 +772,6 @@ case $host in dnl "'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0". OBJCXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" ;; - *android*) - dnl make sure android stays above linux for hosts like *linux-android* - TARGET_OS=android - case $host in - *x86_64*) - ANDROID_ARCH=x86_64 - ;; - *aarch64*) - ANDROID_ARCH=arm64-v8a - ;; - *armv7a*) - ANDROID_ARCH=armeabi-v7a - ;; - *) AC_MSG_ERROR([Could not determine Android arch, or it is unsupported]) ;; - esac - ;; *linux*) TARGET_OS=linux ;; @@ -1744,7 +1728,6 @@ AC_SUBST(HAVE_O_CLOEXEC) AC_SUBST(HAVE_BUILTIN_PREFETCH) AC_SUBST(HAVE_MM_PREFETCH) AC_SUBST(HAVE_STRONG_GETAUXVAL) -AC_SUBST(ANDROID_ARCH) AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR) AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index b3e73bb2b9..e4a62c2072 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -240,7 +240,7 @@ def check_MACHO_sdk(binary) -> bool: return False def check_MACHO_ld64(binary) -> bool: - if binary.build_version.tools[0].version == [711, 0, 0]: + if binary.build_version.tools[0].version == [17, 0, 6]: return True return False diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py index 51bca4627e..dd0cf7030a 100755 --- a/contrib/devtools/test-security-check.py +++ b/contrib/devtools/test-security-check.py @@ -120,21 +120,15 @@ def test_MACHO(self): arch = get_arch(cc, source, executable) if arch == lief.ARCHITECTURES.X86: - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-no_fixup_chains']), - (1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS PIE NX CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS Canary PIE NX CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS PIE NX CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed NOUNDEFS PIE CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed PIE CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']), - (1, executable+': failed PIE CONTROL_FLOW')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']), - (1, executable+': failed PIE')) - self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']), + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-no_fixup_chains']), + (1, executable+': failed NOUNDEFS Canary FIXUP_CHAINS PIE CONTROL_FLOW')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fno-stack-protector', '-Wl,-fixup_chains']), + (1, executable+': failed NOUNDEFS Canary CONTROL_FLOW')) + self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']), + (1, executable+': failed NOUNDEFS CONTROL_FLOW')) + self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-Wl,-fixup_chains']), + (1, executable+': failed CONTROL_FLOW')) + self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']), (0, '')) else: # arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 1e9b682f3f..f589ac7a55 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -133,18 +133,7 @@ for p in "${PATHS[@]}"; do done # Disable Guix ld auto-rpath behavior -case "$HOST" in - *darwin*) - # The auto-rpath behavior is necessary for darwin builds as some native - # tools built by depends refer to and depend on Guix-built native - # libraries - # - # After the native packages in depends are built, the ld wrapper should - # no longer affect our build, as clang would instead reach for - # x86_64-apple-darwin-ld from cctools - ;; - *) export GUIX_LD_WRAPPER_DISABLE_RPATH=yes ;; -esac +export GUIX_LD_WRAPPER_DISABLE_RPATH=yes # Make /usr/bin if it doesn't exist [ -e /usr/bin ] || mkdir -p /usr/bin @@ -173,16 +162,6 @@ esac # Environment variables for determinism export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name" export TZ="UTC" -case "$HOST" in - *darwin*) - # cctools AR, unlike GNU binutils AR, does not have a deterministic mode - # or a configure flag to enable determinism by default, it only - # understands if this env-var is set or not. See: - # - # https://github.com/tpoechtrager/cctools-port/blob/55562e4073dea0fbfd0b20e0bf69ffe6390c7f97/cctools/ar/archive.c#L334 - export ZERO_AR_DATE=yes - ;; -esac #################### # Depends Building # diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 96818c7748..40500ccb88 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -532,8 +532,9 @@ inspecting signatures in Mach-O binaries.") ((string-contains target "darwin") (list ;; Native GCC 11 toolchain gcc-toolchain-11 - binutils clang-toolchain-17 + lld-17 + (make-lld-wrapper lld-17 #:lld-as-ld? #t) python-signapple zip)) (else '()))))) diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md index d1df3062f8..78f61685e1 100644 --- a/contrib/macdeploy/README.md +++ b/contrib/macdeploy/README.md @@ -56,28 +56,13 @@ The `sha256sum` should be `c0c2e7bb92c1fee0c4e9f3a485e4530786732d6c6dd9e9f418c28 ## Deterministic macOS App Notes -macOS Applications are created in Linux by combining a recent `clang` and the Apple -`binutils` (`ld`, `ar`, etc). +macOS Applications are created in Linux using a recent LLVM. Apple uses `clang` extensively for development and has upstreamed the necessary functionality so that a vanilla clang can take advantage. It supports the use of `-F`, `-target`, `-mmacosx-version-min`, and `-isysroot`, which are all necessary when building for macOS. -Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the -FSF's `binutils`. In addition to extra linker options for frameworks and sysroots, several -other tools are needed as well. These do not build under Linux, so they have been patched to -do so. The work here was used as a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4). - -In order to build a working toolchain, the following source packages are needed from -Apple: `cctools`, `dyld`, and `ld64`. - -These tools inject timestamps by default, which produce non-deterministic binaries. The -`ZERO_AR_DATE` environment variable is used to disable that. - -This version of `cctools` has been patched to use the current version of `clang`'s headers -and its `libLTO.so` rather than those from `llvmgcc`, as it was originally done in `toolchain4`. - To complicate things further, all builds must target an Apple SDK. These SDKs are free to download, but not redistributable. See the SDK Extraction notes above for how to obtain it. diff --git a/depends/Makefile b/depends/Makefile index 016c8f64ad..fee426d8db 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -101,10 +101,6 @@ host_os+=$(findstring netbsd,$(full_host_os)) host_os+=$(findstring openbsd,$(full_host_os)) host_os+=$(findstring mingw32,$(full_host_os)) -ifeq (android,$(findstring android,$(full_host_os))) -host_os:=android -endif - host_os:=$(strip $(host_os)) ifeq ($(host_os),) host_os=$(full_host_os) @@ -185,7 +181,6 @@ all_packages = $(packages) $(native_packages) meta_depends = Makefile config.guess config.sub funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk -$(host_arch)_$(host_os)_native_binutils?=$($(host_os)_native_binutils) $(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain) include funcs.mk @@ -217,9 +212,8 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages) # tool needs to be available in $PATH at all times. # # 2. If the tool is _**not**_ expected to be available in $PATH at all times -# (such as is the case for our native_cctools binutils tools), it needs to -# be referred to by its absolute path, such as would be output by the -# AC_PATH_{PROG,TOOL} macros. +# it needs to be referred to by its absolute path, such as would be output +# by the AC_PATH_{PROG,TOOL} macros. # # Minor note: it is also okay to refer to tools by their absolute path even if # we expect them to be available in $PATH at all times, more specificity does diff --git a/depends/README.md b/depends/README.md index 10e0985cf4..7ac075f4ba 100644 --- a/depends/README.md +++ b/depends/README.md @@ -38,17 +38,18 @@ Common `host-platform-triplet`s for cross compilation are: - `riscv32-linux-gnu` for Linux RISC-V 32 bit - `riscv64-linux-gnu` for Linux RISC-V 64 bit - `s390x-linux-gnu` for Linux S390X -- `armv7a-linux-android` for Android ARM 32 bit -- `aarch64-linux-android` for Android ARM 64 bit -- `x86_64-linux-android` for Android x86 64 bit -The paths are automatically configured and no other options are needed unless targeting [Android](../doc/build-android.md). +The paths are automatically configured and no other options are needed. ### Install the required dependencies: Ubuntu & Debian +#### Common + + apt install automake bison cmake curl libtool make patch pkg-config python3 xz-utils + #### For macOS cross compilation - sudo apt-get install curl bsdmainutils cmake zip + sudo apt-get install g++ zip Note: You must obtain the macOS SDK before proceeding with a cross-compile. Under the depends directory, create a subdirectory named `SDKs`. @@ -63,7 +64,7 @@ For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-ex Common linux dependencies: - sudo apt-get install make automake cmake curl g++-multilib libtool binutils bsdmainutils pkg-config python3 patch bison + sudo apt-get install g++-multilib binutils For linux ARM cross compilation: diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index be04e1d8f3..d84c23ed44 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -18,7 +18,6 @@ darwin_STRIP:=$(shell xcrun -f strip) darwin_OBJDUMP:=$(shell xcrun -f objdump) darwin_NM:=$(shell xcrun -f nm) darwin_DSYMUTIL:=$(shell xcrun -f dsymutil) -darwin_native_binutils= darwin_native_toolchain= x86_64_darwin_CFLAGS += -arch x86_64 diff --git a/depends/funcs.mk b/depends/funcs.mk index 7f79478cbd..537051c030 100644 --- a/depends/funcs.mk +++ b/depends/funcs.mk @@ -46,7 +46,7 @@ endef define int_get_build_id $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies)) -$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($($(1)_type)_native_binutils) $($(1)_dependencies))) +$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies))) $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash))) $(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id)) $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))) @@ -299,4 +299,4 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$ $(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package)))) #special exception: if a toolchain package exists, all non-native packages depend on it -$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) $($($(host_arch)_$(host_os)_native_binutils)_cached) )) +$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) )) diff --git a/depends/gen_id b/depends/gen_id index 8518b4e674..e2e2273b2d 100755 --- a/depends/gen_id +++ b/depends/gen_id @@ -53,7 +53,6 @@ echo "BEGIN AR" bash -c "${AR} --version" env | grep '^AR_' - echo "ZERO_AR_DATE=${ZERO_AR_DATE}" echo "END AR" echo "BEGIN NM" diff --git a/depends/hosts/android.mk b/depends/hosts/android.mk deleted file mode 100644 index a1c8c56dba..0000000000 --- a/depends/hosts/android.mk +++ /dev/null @@ -1,15 +0,0 @@ -ifeq ($(HOST),armv7a-linux-android) -android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)eabi$(ANDROID_API_LEVEL)-clang++ -android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)eabi$(ANDROID_API_LEVEL)-clang -else -android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++ -android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang -endif - -android_CFLAGS=-std=$(C_STANDARD) -android_CXXFLAGS=-std=$(CXX_STANDARD) - -android_AR=$(ANDROID_TOOLCHAIN_BIN)/llvm-ar -android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/llvm-ranlib - -android_cmake_system=Android diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 2c4ef0644d..a64008d6aa 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -6,20 +6,28 @@ LD64_VERSION=711 OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers -darwin_native_binutils=native_cctools - ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned clang +# FORCE_USE_SYSTEM_CLANG is empty, so we use our depends-managed, pinned LLVM # from llvm.org -# Clang is a dependency of native_cctools when FORCE_USE_SYSTEM_CLANG is empty -darwin_native_toolchain=native_cctools +darwin_native_toolchain=native_llvm clang_prog=$(build_prefix)/bin/clang clangxx_prog=$(clang_prog)++ llvm_config_prog=$(build_prefix)/bin/llvm-config -darwin_OBJDUMP=$(build_prefix)/bin/$(host)-objdump +llvm_TOOLS=AR NM OBJDUMP RANLIB STRIP + +# Make-only lowercase function +lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) + +# For well-known tools provided by LLVM, make sure that their well-known +# variable is set to the full path of the tool, just like how AC_PATH_{TOO,PROG} +# would. +$(foreach TOOL,$(llvm_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/llvm-$(call lc,$(TOOL)))) + +# Clang expects dsymutil to be called dsymutil +darwin_DSYMUTIL=$(build_prefix)/bin/dsymutil else # FORCE_USE_SYSTEM_CLANG is non-empty, so we use the clang from the user's @@ -40,19 +48,14 @@ llvm_config_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-config") llvm_lib_dir=$(shell $(llvm_config_prog) --libdir) +darwin_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar") +darwin_DSYMUTIL=$(shell $(SHELL) $(.SHELLFLAGS) "command -v dsymutil") +darwin_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm") darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") +darwin_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib") +darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip") endif -cctools_TOOLS=AR RANLIB STRIP NM DSYMUTIL - -# Make-only lowercase function -lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) - -# For well-known tools provided by cctools, make sure that their well-known -# variable is set to the full path of the tool, just like how AC_PATH_{TOO,PROG} -# would. -$(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(host)-$(call lc,$(TOOL)))) - # Flag explanations: # # -mlinker-version @@ -62,7 +65,7 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # # -B$(build_prefix)/bin # -# Explicitly point to our binaries (e.g. cctools) so that they are +# Explicitly point to our binaries so that they are # ensured to be found and preferred over other possibilities. # # -isysroot$(OSX_SDK) -nostdlibinc @@ -79,6 +82,11 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$( # # Indicate to the linker the platform, the oldest supported version, # and the SDK used. +# +# -no_adhoc_codesign +# +# Disable adhoc codesigning (for now) when using LLVM tooling, to avoid +# non-determinism issues with the Identifier field. darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \ @@ -104,6 +112,7 @@ darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) ifneq ($(build_os),darwin) darwin_CFLAGS += -mlinker-version=$(LD64_VERSION) darwin_CXXFLAGS += -mlinker-version=$(LD64_VERSION) +darwin_LDFLAGS += -Wl,-no_adhoc_codesign -fuse-ld=lld endif darwin_release_CFLAGS=-O2 diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk deleted file mode 100644 index 3148e51048..0000000000 --- a/depends/packages/native_cctools.mk +++ /dev/null @@ -1,39 +0,0 @@ -package=native_cctools -$(package)_version=c74fafe86076713cb8e6f937af43b6df6da1f42d -$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=e2c1588d505a69c32e079f4e616e0f117d5478429040e394f624f43f2796e6bc -$(package)_build_subdir=cctools -$(package)_dependencies=native_libtapi - -define $(package)_set_vars - $(package)_config_opts=--target=$(host) --enable-lto-support - $(package)_config_opts+=--with-llvm-config=$(llvm_config_prog) - $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib - $(package)_cc=$(clang_prog) - $(package)_cxx=$(clangxx_prog) -endef - -ifneq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -define $(package)_preprocess_cmds - mkdir -p $($(package)_staging_prefix_dir)/lib && \ - cp $(llvm_lib_dir)/libLTO.so $($(package)_staging_prefix_dir)/lib/ -endef -else -endif - -define $(package)_config_cmds - $($(package)_autoconf) -endef - -define $(package)_build_cmds - $(MAKE) -endef - -define $(package)_stage_cmds - $(MAKE) DESTDIR=$($(package)_staging_dir) install -endef - -define $(package)_postprocess_cmds - rm -rf share -endef diff --git a/depends/packages/native_libtapi.mk b/depends/packages/native_libtapi.mk deleted file mode 100644 index fb5ab0b4dc..0000000000 --- a/depends/packages/native_libtapi.mk +++ /dev/null @@ -1,22 +0,0 @@ -package=native_libtapi -$(package)_version=eb33a59f2e30ff9724dc1ea8bee8b5229b0557c9 -$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive -$(package)_file_name=$($(package)_version).tar.gz -$(package)_sha256_hash=d4d46c64622f13d6938cecf989046d9561011bb59e8ee835f8f39825d67f578f -$(package)_patches=disable_zlib.patch - -ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) -$(package)_dependencies=native_llvm -endif - -define $(package)_preprocess_cmds - patch -p1 < $($(package)_patch_dir)/disable_zlib.patch -endef - -define $(package)_build_cmds - CC=$(clang_prog) CXX=$(clangxx_prog) INSTALLPREFIX=$($(package)_staging_prefix_dir) ./build.sh -endef - -define $(package)_stage_cmds - ./install.sh -endef diff --git a/depends/packages/native_llvm.mk b/depends/packages/native_llvm.mk index 1953c91bf4..c701147edc 100644 --- a/depends/packages/native_llvm.mk +++ b/depends/packages/native_llvm.mk @@ -16,9 +16,14 @@ define $(package)_stage_cmds mkdir -p $($(package)_staging_prefix_dir)/include/llvm-c && \ cp bin/clang $($(package)_staging_prefix_dir)/bin/ && \ cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ && \ - cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \ + cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/dsymutil && \ + cp bin/ld64.lld $($(package)_staging_prefix_dir)/bin/ld64.lld && \ + cp bin/llvm-ar $($(package)_staging_prefix_dir)/bin/llvm-ar && \ cp bin/llvm-config $($(package)_staging_prefix_dir)/bin/ && \ - cp bin/llvm-objdump $($(package)_staging_prefix_dir)/bin/$(host)-objdump && \ + cp bin/llvm-nm $($(package)_staging_prefix_dir)/bin/llvm-nm && \ + cp bin/llvm-objdump $($(package)_staging_prefix_dir)/bin/llvm-objdump && \ + cp bin/llvm-ranlib $($(package)_staging_prefix_dir)/bin/llvm-ranlib && \ + cp bin/llvm-strip $($(package)_staging_prefix_dir)/bin/llvm-strip && \ cp include/llvm-c/ExternC.h $($(package)_staging_prefix_dir)/include/llvm-c && \ cp include/llvm-c/lto.h $($(package)_staging_prefix_dir)/include/llvm-c && \ cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \ diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index fb52fd4499..ca54093339 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -5,12 +5,10 @@ boost_packages = boost libevent_packages = libevent qrencode_linux_packages = qrencode -qrencode_android_packages = qrencode qrencode_darwin_packages = qrencode qrencode_mingw32_packages = qrencode qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm -qt_android_packages=qt qt_darwin_packages=qt qt_mingw32_packages=qt @@ -30,7 +28,6 @@ usdt_linux_packages=systemtap darwin_native_packages = ifneq ($(build_os),darwin) -darwin_native_packages += native_cctools native_libtapi ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) darwin_native_packages+= native_llvm diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index d057b2d410..d35139dd2d 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -1,9 +1,9 @@ package=qt -$(package)_version=5.15.13 +$(package)_version=5.15.14 $(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules $(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz $(package)_file_name=qtbase-$($(package)_suffix) -$(package)_sha256_hash=4cca51dcc1f22ceeee6b3e33cd1c3a60b14e85e24644dca3af89a2c2989ab809 +$(package)_sha256_hash=500d3b390048e9538c28b5f523dfea6936f9c2e10d24ab46580ff57d430b98be $(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_linguist_tools = lrelease lupdate lconvert @@ -12,23 +12,24 @@ $(package)_patches += qttools_src.pro $(package)_patches += mac-qmake.conf $(package)_patches += fix_qt_pkgconfig.patch $(package)_patches += no-xlib.patch -$(package)_patches += fix_android_jni_static.patch $(package)_patches += dont_hardcode_pwd.patch $(package)_patches += qtbase-moc-ignore-gcc-macro.patch +$(package)_patches += no_warnings_for_symbols.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += duplicate_lcqpafonts.patch $(package)_patches += guix_cross_lib_path.patch $(package)_patches += fix-macos-linker.patch $(package)_patches += memory_resource.patch +$(package)_patches += clang_18_libpng.patch $(package)_patches += utc_from_string_no_optimize.patch $(package)_patches += windows_lto.patch $(package)_patches += zlib-timebits64.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) -$(package)_qttranslations_sha256_hash=24d4c58bc2a40c0f44f59ee64af4192c7d0038c1e45af61646cfc5b65058f271 +$(package)_qttranslations_sha256_hash=5b94d1a11b566908622fcca2f8b799744d2f8a68da20be4caa5953ed63b10489 $(package)_qttools_file_name=qttools-$($(package)_suffix) -$(package)_qttools_sha256_hash=57c9794c572c4e02871f2e7581525752b0cf85ea16cfab23a4ac9ba7b39a5d34 +$(package)_qttools_sha256_hash=12061a85baf5f4de8fbc795e1d3872b706f340211b9e70962caeffc6f5e89563 $(package)_extra_sources = $($(package)_qttranslations_file_name) $(package)_extra_sources += $($(package)_qttools_file_name) @@ -138,7 +139,7 @@ ifneq ($(build_os),darwin) $(package)_config_opts_darwin += -xplatform macx-clang-linux $(package)_config_opts_darwin += -device-option MAC_SDK_PATH=$(OSX_SDK) $(package)_config_opts_darwin += -device-option MAC_SDK_VERSION=$(OSX_SDK_VERSION) -$(package)_config_opts_darwin += -device-option CROSS_COMPILE="$(host)-" +$(package)_config_opts_darwin += -device-option CROSS_COMPILE="llvm-" $(package)_config_opts_darwin += -device-option MAC_TARGET=$(host) $(package)_config_opts_darwin += -device-option XCODE_VERSION=$(XCODE_VERSION) endif @@ -185,24 +186,6 @@ $(package)_config_opts_mingw32 += -pch ifneq ($(LTO),) $(package)_config_opts_mingw32 += -ltcg endif - -$(package)_config_opts_android = -xplatform android-clang -$(package)_config_opts_android += -android-sdk $(ANDROID_SDK) -$(package)_config_opts_android += -android-ndk $(ANDROID_NDK) -$(package)_config_opts_android += -android-ndk-platform android-$(ANDROID_API_LEVEL) -$(package)_config_opts_android += -egl -$(package)_config_opts_android += -no-dbus -$(package)_config_opts_android += -opengl es2 -$(package)_config_opts_android += -qt-freetype -$(package)_config_opts_android += -no-fontconfig -$(package)_config_opts_android += -L $(host_prefix)/lib -$(package)_config_opts_android += -I $(host_prefix)/include -$(package)_config_opts_android += -pch -$(package)_config_opts_android += -no-feature-vulkan - -$(package)_config_opts_aarch64_android += -android-arch arm64-v8a -$(package)_config_opts_armv7a_android += -android-arch armeabi-v7a -$(package)_config_opts_x86_64_android += -android-arch x86_64 endef define $(package)_fetch_cmds @@ -243,10 +226,11 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/fix-macos-linker.patch && \ patch -p1 -i $($(package)_patch_dir)/dont_hardcode_pwd.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \ - patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \ patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ patch -p1 -i $($(package)_patch_dir)/memory_resource.patch && \ + patch -p1 -i $($(package)_patch_dir)/no_warnings_for_symbols.patch && \ + patch -p1 -i $($(package)_patch_dir)/clang_18_libpng.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \ patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \ diff --git a/depends/patches/native_libtapi/disable_zlib.patch b/depends/patches/native_libtapi/disable_zlib.patch deleted file mode 100644 index 6c7691214a..0000000000 --- a/depends/patches/native_libtapi/disable_zlib.patch +++ /dev/null @@ -1,17 +0,0 @@ -build: disable zlib - -This isn't needed, and causes issues when clang-tblgen -is built, but trys to reach for a system libz.so. - -diff --git a/build.sh b/build.sh -index e25d2f732..ec8422621 100755 ---- a/build.sh -+++ b/build.sh -@@ -66,6 +66,7 @@ cmake ../src/llvm \ - -DCMAKE_INSTALL_PREFIX=$INSTALLPREFIX \ - -DTAPI_REPOSITORY_STRING=$TAPI_VERSION \ - -DTAPI_FULL_VERSION=$TAPI_VERSION \ -+ -DLLVM_ENABLE_ZLIB=OFF \ - $CMAKE_EXTRA_ARGS - - echo "" diff --git a/depends/patches/qt/clang_18_libpng.patch b/depends/patches/qt/clang_18_libpng.patch new file mode 100644 index 0000000000..e807905b32 --- /dev/null +++ b/depends/patches/qt/clang_18_libpng.patch @@ -0,0 +1,40 @@ +fix Qt macOS build with Clang 18 + + See: + https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24. + + In a similar manner as zlib (madler/zlib#895), + libpng contains a header configuration that's no longer valid and + hasn't been exercised for the macOS target. + + - The target OS conditional macros are misused. Specifically + `TARGET_OS_MAC` covers all Apple targets, including iOS, and it + should not be checked with `#if defined` as they would always be + defined (to either 1 or 0) on Apple platforms. + - `#include ` no longer works for the macOS target and results + in a compilation failure. macOS ships all required functions in + `math.h`, and clients should use `math.h` instead. + +--- a/qtbase/src/3rdparty/libpng/pngpriv.h ++++ b/qtbase/src/3rdparty/libpng/pngpriv.h +@@ -514,18 +514,8 @@ + */ + # include + +-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ +- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) +- /* We need to check that hasn't already been included earlier +- * as it seems it doesn't agree with , yet we should really use +- * if possible. +- */ +-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +-# include +-# endif +-# else +-# include +-# endif ++# include ++ + # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 diff --git a/depends/patches/qt/fix_android_jni_static.patch b/depends/patches/qt/fix_android_jni_static.patch deleted file mode 100644 index 79824f244a..0000000000 --- a/depends/patches/qt/fix_android_jni_static.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp -+++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp -@@ -979,6 +979,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/) - __android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed"); - return -1; - } -+ -+ const jint ret = QT_PREPEND_NAMESPACE(QtAndroidPrivate::initJNI(vm, env)); -+ if (ret != 0) -+ { -+ __android_log_print(ANDROID_LOG_FATAL, "Qt", "initJNI failed"); -+ return ret; -+ } -+ - QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(false); - - m_javaVM = vm; diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf index cb94bf07b4..a29db20004 100644 --- a/depends/patches/qt/mac-qmake.conf +++ b/depends/patches/qt/mac-qmake.conf @@ -13,6 +13,7 @@ QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} QMAKE_MAC_SDK.macosx.platform_name = macosx QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} QMAKE_MAC_SDK.macosx.PlatformPath = /phony +QMAKE_CXXFLAGS += -fuse-ld=lld !host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} !host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS !host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET} diff --git a/depends/patches/qt/no_warnings_for_symbols.patch b/depends/patches/qt/no_warnings_for_symbols.patch new file mode 100644 index 0000000000..11cdc599ed --- /dev/null +++ b/depends/patches/qt/no_warnings_for_symbols.patch @@ -0,0 +1,11 @@ +--- a/qtbase/mkspecs/features/mac/no_warn_empty_obj_files.prf ++++ b/qtbase/mkspecs/features/mac/no_warn_empty_obj_files.prf +@@ -1,7 +1,7 @@ + # Prevent warnings about object files without any symbols. This is a common + # thing in Qt as we tend to build files unconditionally, and then use ifdefs + # to compile out parts that are not relevant. +-QMAKE_RANLIB += -no_warning_for_no_symbols ++# QMAKE_RANLIB += -no_warning_for_no_symbols + + # We have to tell 'ar' to not run ranlib by itself + QMAKE_AR += -S diff --git a/doc/README.md b/doc/README.md index 7b6dacaf4f..74a85b04e6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -45,7 +45,6 @@ The following are developer notes on how to build Bitcoin Core on your native pl - [FreeBSD Build Notes](build-freebsd.md) - [OpenBSD Build Notes](build-openbsd.md) - [NetBSD Build Notes](build-netbsd.md) -- [Android Build Notes](build-android.md) Development --------------------- diff --git a/doc/build-android.md b/doc/build-android.md deleted file mode 100644 index 2f2e01c441..0000000000 --- a/doc/build-android.md +++ /dev/null @@ -1,25 +0,0 @@ -ANDROID BUILD NOTES -====================== - -This guide describes how to build and package the `bitcoin-qt` GUI for Android on Linux and macOS. - - -## Dependencies - -Before proceeding with an Android build one needs to get the [Android SDK](https://developer.android.com/studio) and use the "SDK Manager" tool to download the NDK and one or more "Platform packages" (these are Android versions and have a corresponding API level). - -The minimum supported Android NDK version is [r23](https://github.com/android/ndk/wiki/Changelog-r23). - -In order to build `ANDROID_API_LEVEL` (API level corresponding to the Android version targeted, e.g. Android 9.0 Pie is 28 and its "Platform package" needs to be available) and `ANDROID_TOOLCHAIN_BIN` (path to toolchain binaries depending on the platform the build is being performed on) need to be set. - -API levels from 24 to 29 have been tested to work. - -If the build includes Qt, environment variables `ANDROID_SDK` and `ANDROID_NDK` need to be set as well but can otherwise be omitted. -This is an example command for a default build with no disabled dependencies: - - ANDROID_SDK=/home/user/Android/Sdk ANDROID_NDK=/home/user/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin - - -## Building and packaging - -After the depends are built configure with one of the resulting prefixes and run `make && make apk` in `src/qt`. \ No newline at end of file diff --git a/src/.clang-tidy b/src/.clang-tidy index a00400f083..61adce1d50 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -2,6 +2,7 @@ Checks: ' -*, bitcoin-*, bugprone-argument-comment, +bugprone-move-forwarding-reference, bugprone-string-constructor, bugprone-use-after-move, bugprone-lambda-function-name, diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index c235c3c4da..1ac6b74688 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -392,20 +392,6 @@ bitcoin_qt_clean: FORCE bitcoin_qt : qt/bitcoin-qt$(EXEEXT) -APK_LIB_DIR = qt/android/libs/$(ANDROID_ARCH) -QT_BASE_VERSION = $(lastword $(shell $(MOC) --version)) -QT_BASE_PATH = $(shell find ../depends/sources/ -maxdepth 1 -type f -regex ".*qtbase.*$(QT_BASE_VERSION)\.tar.xz") -QT_BASE_TLD = $(shell tar tf $(QT_BASE_PATH) --exclude='*/*') - -bitcoin_qt_apk: FORCE - mkdir -p $(APK_LIB_DIR) - cp $(dir $(lastword $(CC)))../sysroot/usr/lib/$(host_alias)/libc++_shared.so $(APK_LIB_DIR) - tar xf $(QT_BASE_PATH) -C qt/android/src/ $(QT_BASE_TLD)src/android/jar/src --strip-components=5 - tar xf $(QT_BASE_PATH) -C qt/android/src/ $(QT_BASE_TLD)src/android/java/src --strip-components=5 - cp qt/bitcoin-qt $(APK_LIB_DIR)/libbitcoin-qt_$(ANDROID_ARCH).so - cd qt/android && gradle wrapper --gradle-version=6.6.1 - cd qt/android && ./gradlew build - ui_%.h: %.ui @test -f $(UIC) || (echo "uic $(UIC) not found, but is required for generating ui headers"; exit 1) @$(MKDIR_P) $(@D) diff --git a/src/bench/wallet_create.cpp b/src/bench/wallet_create.cpp index 618d5bc80c..5c0557bf6f 100644 --- a/src/bench/wallet_create.cpp +++ b/src/bench/wallet_create.cpp @@ -34,14 +34,15 @@ static void WalletCreate(benchmark::Bench& bench, bool encrypted) bilingual_str error_string; std::vector warnings; - fs::path wallet_path = test_setup->m_path_root / strprintf("test_wallet_%d", random.rand32()).c_str(); + auto wallet_path = fs::PathToString(test_setup->m_path_root / "test_wallet"); bench.run([&] { - auto wallet = CreateWallet(context, wallet_path.utf8string(), /*load_on_start=*/std::nullopt, options, status, error_string, warnings); + auto wallet = CreateWallet(context, wallet_path, /*load_on_start=*/std::nullopt, options, status, error_string, warnings); assert(status == DatabaseStatus::SUCCESS); assert(wallet != nullptr); - // Cleanup - wallet.reset(); + // Release wallet + RemoveWallet(context, wallet, /*load_on_start=*/ std::nullopt); + UnloadWallet(std::move(wallet)); fs::remove_all(wallet_path); }); } @@ -49,14 +50,9 @@ static void WalletCreate(benchmark::Bench& bench, bool encrypted) static void WalletCreatePlain(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/false); } static void WalletCreateEncrypted(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/true); } -#ifndef _MSC_VER -// TODO: Being built with MSVC, the fs::remove_all() call in -// the WalletCreate() fails with the error "The process cannot -// access the file because it is being used by another process." #ifdef USE_SQLITE BENCHMARK(WalletCreatePlain, benchmark::PriorityLevel::LOW); BENCHMARK(WalletCreateEncrypted, benchmark::PriorityLevel::LOW); #endif -#endif } // namespace wallet diff --git a/src/qt/android/.gitignore b/src/qt/android/.gitignore deleted file mode 100644 index c090a2e98e..0000000000 --- a/src/qt/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/.gradle -/build -/gradle -/gradlew* -/libs -/src/org/kde -/src/org/qtproject diff --git a/src/qt/android/AndroidManifest.xml b/src/qt/android/AndroidManifest.xml deleted file mode 100644 index 41615294e0..0000000000 --- a/src/qt/android/AndroidManifest.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/qt/android/build.gradle b/src/qt/android/build.gradle deleted file mode 100644 index 4c36e79db8..0000000000 --- a/src/qt/android/build.gradle +++ /dev/null @@ -1,52 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' - } -} - -repositories { - google() - jcenter() -} - -apply plugin: 'com.android.application' - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) -} - -android { - compileSdkVersion androidCompileSdkVersion.toInteger() - - buildToolsVersion androidBuildToolsVersion - - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java'] - aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl'] - res.srcDirs = [qt5AndroidDir + '/res', 'res'] - resources.srcDirs = ['src'] - renderscript.srcDirs = ['src'] - assets.srcDirs = ['assets'] - jniLibs.srcDirs = ['libs'] - } - } - - lintOptions { - abortOnError false - } - - dexOptions { - javaMaxHeapSize '4g' - } - - defaultConfig { - minSdkVersion 24 - } -} diff --git a/src/qt/android/gradle.properties b/src/qt/android/gradle.properties deleted file mode 100644 index 468f4757c0..0000000000 --- a/src/qt/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -androidBuildToolsVersion=30.0.3 -androidCompileSdkVersion=30 -qt5AndroidDir=new File(".").absolutePath -org.gradle.jvmargs=-Xmx4608M diff --git a/src/qt/android/res/drawable-hdpi/bitcoin.png b/src/qt/android/res/drawable-hdpi/bitcoin.png deleted file mode 100644 index 31a556a35f..0000000000 Binary files a/src/qt/android/res/drawable-hdpi/bitcoin.png and /dev/null differ diff --git a/src/qt/android/res/drawable-ldpi/bitcoin.png b/src/qt/android/res/drawable-ldpi/bitcoin.png deleted file mode 100644 index 76d80d4196..0000000000 Binary files a/src/qt/android/res/drawable-ldpi/bitcoin.png and /dev/null differ diff --git a/src/qt/android/res/drawable-mdpi/bitcoin.png b/src/qt/android/res/drawable-mdpi/bitcoin.png deleted file mode 100644 index c2aeab851a..0000000000 Binary files a/src/qt/android/res/drawable-mdpi/bitcoin.png and /dev/null differ diff --git a/src/qt/android/res/drawable-xhdpi/bitcoin.png b/src/qt/android/res/drawable-xhdpi/bitcoin.png deleted file mode 100644 index 2bd5e3defc..0000000000 Binary files a/src/qt/android/res/drawable-xhdpi/bitcoin.png and /dev/null differ diff --git a/src/qt/android/res/drawable-xxhdpi/bitcoin.png b/src/qt/android/res/drawable-xxhdpi/bitcoin.png deleted file mode 100644 index d236cf2132..0000000000 Binary files a/src/qt/android/res/drawable-xxhdpi/bitcoin.png and /dev/null differ diff --git a/src/qt/android/res/drawable-xxxhdpi/bitcoin.png b/src/qt/android/res/drawable-xxxhdpi/bitcoin.png deleted file mode 100644 index bb1dbc3554..0000000000 Binary files a/src/qt/android/res/drawable-xxxhdpi/bitcoin.png and /dev/null differ diff --git a/src/qt/android/res/values/libs.xml b/src/qt/android/res/values/libs.xml deleted file mode 100644 index b4b77b1c7b..0000000000 --- a/src/qt/android/res/values/libs.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - arm64-v8a;libbitcoin-qt_arm64-v8a.so - - - armeabi-v7a;libbitcoin-qt_armeabi-v7a.so - - - x86_64;libbitcoin-qt_x86_64.so - - - diff --git a/src/qt/android/src/org/bitcoincore/qt/BitcoinQtActivity.java b/src/qt/android/src/org/bitcoincore/qt/BitcoinQtActivity.java deleted file mode 100644 index 2cba489242..0000000000 --- a/src/qt/android/src/org/bitcoincore/qt/BitcoinQtActivity.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.bitcoincore.qt; - -import android.os.Bundle; -import android.system.ErrnoException; -import android.system.Os; - -import org.qtproject.qt5.android.bindings.QtActivity; - -import java.io.File; - -public class BitcoinQtActivity extends QtActivity -{ - @Override - public void onCreate(Bundle savedInstanceState) - { - final File bitcoinDir = new File(getFilesDir().getAbsolutePath() + "/.bitcoin"); - if (!bitcoinDir.exists()) { - bitcoinDir.mkdir(); - } - - super.onCreate(savedInstanceState); - } -} diff --git a/src/test/fuzz/fuzz.cpp b/src/test/fuzz/fuzz.cpp index f9915187bd..9a54a44bd3 100644 --- a/src/test/fuzz/fuzz.cpp +++ b/src/test/fuzz/fuzz.cpp @@ -79,6 +79,26 @@ void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, static std::string_view g_fuzz_target; static const TypeTestOneInput* g_test_one_input{nullptr}; + +#if defined(__clang__) && defined(__linux__) +extern "C" void __llvm_profile_reset_counters(void) __attribute__((weak)); +extern "C" void __gcov_reset(void) __attribute__((weak)); + +void ResetCoverageCounters() +{ + if (__llvm_profile_reset_counters) { + __llvm_profile_reset_counters(); + } + + if (__gcov_reset) { + __gcov_reset(); + } +} +#else +void ResetCoverageCounters() {} +#endif + + void initialize() { // Terminate immediately if a fuzzing harness ever tries to create a TCP socket. @@ -129,6 +149,8 @@ void initialize() Assert(!g_test_one_input); g_test_one_input = &it->second.test_one_input; it->second.opts.init(); + + ResetCoverageCounters(); } #if defined(PROVIDE_FUZZ_MAIN_FUNCTION) diff --git a/src/txorphanage.cpp b/src/txorphanage.cpp index 13ef96f3be..8e76c07b07 100644 --- a/src/txorphanage.cpp +++ b/src/txorphanage.cpp @@ -8,13 +8,14 @@ #include #include #include +#include #include -/** Expiration time for orphan transactions in seconds */ -static constexpr int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60; -/** Minimum time between orphan transactions expire time checks in seconds */ -static constexpr int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60; +/** Expiration time for orphan transactions */ +static constexpr auto ORPHAN_TX_EXPIRE_TIME{20min}; +/** Minimum time between orphan transactions expire time checks */ +static constexpr auto ORPHAN_TX_EXPIRE_INTERVAL{5min}; bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer) @@ -40,7 +41,7 @@ bool TxOrphanage::AddTx(const CTransactionRef& tx, NodeId peer) return false; } - auto ret = m_orphans.emplace(wtxid, OrphanTx{tx, peer, GetTime() + ORPHAN_TX_EXPIRE_TIME, m_orphan_list.size()}); + auto ret = m_orphans.emplace(wtxid, OrphanTx{tx, peer, Now() + ORPHAN_TX_EXPIRE_TIME, m_orphan_list.size()}); assert(ret.second); m_orphan_list.push_back(ret.first); for (const CTxIn& txin : tx->vin) { @@ -87,7 +88,7 @@ int TxOrphanage::EraseTxNoLock(const Wtxid& wtxid) // Time spent in orphanage = difference between current and entry time. // Entry time is equal to ORPHAN_TX_EXPIRE_TIME earlier than entry's expiry. LogPrint(BCLog::TXPACKAGES, " removed orphan tx %s (wtxid=%s) after %ds\n", txid.ToString(), wtxid.ToString(), - GetTime() + ORPHAN_TX_EXPIRE_TIME - it->second.nTimeExpire); + Ticks(NodeClock::now() + ORPHAN_TX_EXPIRE_TIME - it->second.nTimeExpire)); m_orphan_list.pop_back(); m_orphans.erase(it); @@ -118,12 +119,12 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng) LOCK(m_mutex); unsigned int nEvicted = 0; - static int64_t nNextSweep; - int64_t nNow = GetTime(); + static NodeSeconds nNextSweep; + auto nNow{Now()}; if (nNextSweep <= nNow) { // Sweep out expired orphan pool entries: int nErased = 0; - int64_t nMinExpTime = nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL; + auto nMinExpTime{nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL}; std::map::iterator iter = m_orphans.begin(); while (iter != m_orphans.end()) { diff --git a/src/txorphanage.h b/src/txorphanage.h index 5f9888c969..47becb447d 100644 --- a/src/txorphanage.h +++ b/src/txorphanage.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -73,7 +74,7 @@ class TxOrphanage { struct OrphanTx { CTransactionRef tx; NodeId fromPeer; - int64_t nTimeExpire; + NodeSeconds nTimeExpire; size_t list_pos; }; diff --git a/src/wallet/test/fuzz/wallet_bdb_parser.cpp b/src/wallet/test/fuzz/wallet_bdb_parser.cpp index 23e6c53af4..5216e09769 100644 --- a/src/wallet/test/fuzz/wallet_bdb_parser.cpp +++ b/src/wallet/test/fuzz/wallet_bdb_parser.cpp @@ -52,7 +52,7 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser) #ifdef USE_BDB bool bdb_ro_err = false; - bool bdb_ro_pgno_err = false; + bool bdb_ro_strict_err = false; #endif auto db{MakeBerkeleyRODatabase(wallet_path, options, status, error)}; if (db) { @@ -64,14 +64,11 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser) if (error.original.starts_with("AutoFile::ignore: end of file") || error.original.starts_with("AutoFile::read: end of file") || error.original == "Not a BDB file" || - error.original == "Unsupported BDB data file version number" || error.original == "Unexpected page type, should be 9 (BTree Metadata)" || error.original == "Unexpected database flags, should only be 0x20 (subdatabases)" || error.original == "Unexpected outer database root page type" || error.original == "Unexpected number of entries in outer database root page" || - error.original == "Subdatabase has an unexpected name" || error.original == "Subdatabase page number has unexpected length" || - error.original == "Unexpected inner database page type" || error.original == "Unknown record type in records page" || error.original == "Unknown record type in internal page" || error.original == "Unexpected page size" || @@ -79,15 +76,21 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser) error.original == "Page number mismatch" || error.original == "Bad btree level" || error.original == "Bad page size" || - error.original == "File size is not a multiple of page size" || - error.original == "Meta page number mismatch") { + error.original == "Meta page number mismatch" || + error.original == "Data record position not in page" || + error.original == "Internal record position not in page" || + error.original == "LSNs are not reset, this database is not completely flushed. Please reopen then close the database with a version that has BDB support" || + error.original == "Records page has odd number of records" || + error.original == "Bad overflow record page type") { // Do nothing } else if (error.original == "Subdatabase last page is greater than database last page" || error.original == "Page number is greater than database last page" || - error.original == "Page number is greater than subdatabase last page" || - error.original == "Last page number could not fit in file") { + error.original == "Last page number could not fit in file" || + error.original == "Subdatabase has an unexpected name" || + error.original == "Unsupported BDB data file version number" || + error.original == "BDB builtin encryption is not supported") { #ifdef USE_BDB - bdb_ro_pgno_err = true; + bdb_ro_strict_err = true; #endif } else { throw std::runtime_error(error.original); @@ -108,9 +111,8 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser) return; } assert(db); - if (bdb_ro_pgno_err) { - // BerkeleyRO will throw on opening for errors involving bad page numbers, but BDB does not. - // Ignore those. + if (bdb_ro_strict_err) { + // BerkeleyRO will be stricter than BDB. Ignore when those specific errors are hit. return; } assert(!bdb_ro_err); diff --git a/test/lint/README.md b/test/lint/README.md index 13c2099808..49ed8356c3 100644 --- a/test/lint/README.md +++ b/test/lint/README.md @@ -37,6 +37,7 @@ Then you can use: | [`lint-python-dead-code.py`](/test/lint/lint-python-dead-code.py) | [vulture](https://github.com/jendrikseipp/vulture) | [`lint-shell.py`](/test/lint/lint-shell.py) | [ShellCheck](https://github.com/koalaman/shellcheck) | [`lint-spelling.py`](/test/lint/lint-spelling.py) | [codespell](https://github.com/codespell-project/codespell) +| markdown link check | [mlc](https://github.com/becheran/mlc) In use versions and install instructions are available in the [CI setup](../../ci/lint/04_install.sh). diff --git a/test/lint/test_runner/src/main.rs b/test/lint/test_runner/src/main.rs index d5dd98effe..5f980eb398 100644 --- a/test/lint/test_runner/src/main.rs +++ b/test/lint/test_runner/src/main.rs @@ -4,9 +4,9 @@ use std::env; use std::fs; +use std::io::ErrorKind; use std::path::{Path, PathBuf}; -use std::process::Command; -use std::process::ExitCode; +use std::process::{Command, ExitCode, Stdio}; type LintError = String; type LintResult = Result<(), LintError>; @@ -292,6 +292,51 @@ fn lint_doc() -> LintResult { } } +fn lint_markdown() -> LintResult { + let bin_name = "mlc"; + let mut md_ignore_paths = get_subtrees(); + md_ignore_paths.push("./doc/README_doxygen.md"); + let md_ignore_path_str = md_ignore_paths.join(","); + + let mut cmd = Command::new(bin_name); + cmd.args([ + "--offline", + "--ignore-path", + md_ignore_path_str.as_str(), + "--root-dir", + ".", + ]) + .stdout(Stdio::null()); // Suppress overly-verbose output + + match cmd.output() { + Ok(output) if output.status.success() => Ok(()), + Ok(output) => { + let stderr = String::from_utf8_lossy(&output.stderr); + let filtered_stderr: String = stderr // Filter out this annoying trailing line + .lines() + .filter(|&line| line != "The following links could not be resolved:") + .collect::>() + .join("\n"); + Err(format!( + r#" +One or more markdown links are broken. + +Relative links are preferred (but not required) as jumping to file works natively within Emacs. + +Markdown link errors found: +{} + "#, + filtered_stderr + )) + } + Err(e) if e.kind() == ErrorKind::NotFound => { + println!("`mlc` was not found in $PATH, skipping markdown lint check."); + Ok(()) + } + Err(e) => Err(format!("Error running mlc: {}", e)), // Misc errors + } +} + fn lint_all() -> LintResult { let mut good = true; let lint_dir = get_git_root().join("test/lint"); @@ -325,6 +370,7 @@ fn main() -> ExitCode { ("no-tabs check", lint_tabs_whitespace), ("build config includes check", lint_includes_build_config), ("-help=1 documentation check", lint_doc), + ("markdown hyperlink check", lint_markdown), ("lint-*.py scripts", lint_all), ];