summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2022-04-28 11:14:24 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-05-04 16:48:25 +0200
commit079659eb7d15f15a37f1f508beb5cffe24fe6f25 (patch)
treee03670f501dbb9e52ba78a2ff226a2d4fbdee4bd /bin
parent405ab5c3307948bfcf12670d7ac6df0b86fb8832 (diff)
Drop --with-iwyu option
Nowadays the bin/find-unneeded-includes script is a better solution for this problem This essentially reverts the commits: c716b3888e7e8150d1c1053ee6550afb56438b1f 096c7e889f3b9bd42a81fb0216e2a68fb27159fc 40e7eecb7efeeb9af59206d7a9c82ac55adf5279 Change-Id: I404a4b34176efaacf961605559af9de6d6cba10a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133540 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gen-iwyu-dummy-lib79
1 files changed, 0 insertions, 79 deletions
diff --git a/bin/gen-iwyu-dummy-lib b/bin/gen-iwyu-dummy-lib
deleted file mode 100755
index 80b791eff4f4..000000000000
--- a/bin/gen-iwyu-dummy-lib
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env bash
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-# Create a makefile that builds every non-generated header as a source file.
-# This should help to ensure the headers are self-contained and don't
-# impose unnecessary requirements (unnecessary includes) on client code.
-#
-# This script is fully compliant with the UNIX philosophy
-# (and if you can't read it you are clearly not worthy)
-
-set -e
-
-iwyu_INCLUDES=$(grep -h -r ":$" "$BUILDDIR"/workdir/Dep/*Object* \
- | grep -v 'workdir\|config_host' | grep -v "^/usr" \
- | sed -e "s,^${SRCDIR}/,," | sed -e "s/:$//" | sort -u)
-
-iwyu_INCLUDEDIRS=$(echo "$iwyu_INCLUDES" | sed -e "s,/[^/]*$,," | grep -v "^include" | sort -u)
-
-iwyu_EXTERNALS=$(ls "$SRCDIR"/*/*Library*mk "$SRCDIR"/*/*Executable*mk \
- | xargs awk -f "$SRCDIR"/bin/gen-iwyu-dummy-lib.awk \
- | grep -v '$(\|)\|\\$\|breakpad\|bzip2\|expat_x64\|mDNSResponder\|zlib_x64')
-
-iwyu_DIR="$BUILDDIR"/iwyudummy/
-mkdir -p "$iwyu_DIR"
-
-{
- echo 'module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))'
- echo "include ${SRCDIR}/solenv/gbuild/partial_build.mk"
-} > "$iwyu_DIR"Makefile
-
-{
- echo '$(eval $(call gb_Module_Module,iwyudummy))'
- echo '$(eval $(call gb_Module_add_targets,iwyudummy,StaticLibrary_iwyudummy))'
-} > "$iwyu_DIR"Module_iwyudummy.mk
-
-{
- # prevent some common configuration errors
- echo 'ifneq ($(COMPILER_PLUGINS),)'
- echo ' $(call gb_Output_error,--enable-compiler-plugins does not work well with this: bailing out)'
- echo 'endif'
-
- echo '$(eval $(call gb_StaticLibrary_StaticLibrary,iwyudummy))'
- # clang will "compile" headers to .gch by default
- echo '$(eval $(call gb_StaticLibrary_add_cxxflags,iwyudummy,-x c++ -D__cplusplus=201402L -D__STDC_VERSION__=201112L -Wno-unused-macros -Wno-unused-const-variable))'
- echo '$(eval $(call gb_StaticLibrary_use_custom_headers,iwyudummy,officecfg/registry))'
- echo '$(eval $(call gb_StaticLibrary_use_sdk_api,iwyudummy))'
- echo '$(eval $(call gb_StaticLibrary_use_externals,iwyudummy,\'
- for ext in ${iwyu_EXTERNALS}; do
- echo "${ext} \\";
- done
- echo '))'
-
- echo '$(eval $(call gb_StaticLibrary_set_include,iwyudummy,\'
- echo '$$(INCLUDE) \'
- for dir in ${iwyu_INCLUDEDIRS}; do
- if echo "$dir" | grep ".*/inc/" &>/dev/null; then
- iwyu_INCLUDEDIRS_EXTRA+=" ${dir%/inc/*}/inc"
- fi
- done
- for dir in $(echo ${iwyu_INCLUDEDIRS_EXTRA} | sed -e "s/ /\n/g" | uniq) ${iwyu_INCLUDEDIRS}; do
- echo "-I${SRCDIR}/${dir} \\";
- done
- # it fails to find stddef.h?
- echo "-I/usr/lib/clang/$(llvm-config --version)/include \\"
- echo "))"
-
- echo '$(eval $(call gb_StaticLibrary__add_iwyu_headers,iwyudummy,\'
- for hdr in ${iwyu_INCLUDES}; do
- echo "${hdr} \\";
- done
- echo '))'
-} > "$iwyu_DIR"StaticLibrary_iwyudummy.mk
-