Makefile.in | 16 +++++++++------- autogen.sh | 7 +++++++ compilerplugins/clang/literaltoboolconversion.cxx | 4 ++-- compilerplugins/clang/store/referencecasting.cxx | 2 +- configure.ac | 13 +++++++------ solenv/gbuild/partial_build.mk | 2 +- 6 files changed, 27 insertions(+), 17 deletions(-)
New commits: commit 11e881a63821ea209bda509d1e502d9ba270782d Author: LuboÅ¡ LuÅák <l.lu...@collabora.com> Date: Sun Mar 23 16:21:51 2014 +0100 make it possible to do 'make -C sw/' even with builddir!=srcdir The change in partial_build.mk assumes all the Makefile's using it are in builddir/<module>/ , but that seems to be the case. Change-Id: Iddc8fa2ec0842f181780f7491cf5a2244efd014a diff --git a/autogen.sh b/autogen.sh index f15dd91a..da967a4 100755 --- a/autogen.sh +++ b/autogen.sh @@ -135,6 +135,13 @@ if ($src_path ne $build_path) { system ("ln -sf $src_path/configure.ac configure.ac"); system ("ln -sf $src_path/g g"); + my @modules = <$src_path/*/Makefile>; + foreach my $module (@modules) + { + my $dir = basename (dirname ($module)); + mkdir ($dir); + system ("ln -sf $src_path/$dir/Makefile $dir/Makefile"); + } } system ("$aclocal $aclocal_flags") && die "Failed to run aclocal"; unlink ("configure"); diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk index 68e807b..eb2b5cc 100644 --- a/solenv/gbuild/partial_build.mk +++ b/solenv/gbuild/partial_build.mk @@ -22,7 +22,7 @@ gb_Side:=host endif ifeq (,$(BUILDDIR)) -BUILDDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))../.. +BUILDDIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))).. endif ifeq ($(BUILD_TYPE),) commit f605cfc73d918c5ba38c988619e0a52472a589d8 Author: LuboÅ¡ LuÅák <l.lu...@collabora.com> Date: Sun Mar 23 15:58:00 2014 +0100 make it possible to build without the obnoxious forced -j to make Rework --with-parallelism to not add any extra -j to make if 0 or --without is used. This requires explicit -j usage, which - builds even compilerplugins in parallel - builds 'make -C sw/' in parallel (since you don't forget the -j) - avoids jobserver disabling if -j is explicitly passed to the toplevel make IMO this is just a relic of the old build system and the option should be dumped altogether, but I don't feel like arguing right now. Change-Id: I71479391bcfc84aa5e9fd9696880702da496d45c diff --git a/Makefile.in b/Makefile.in index 64aea5a..27c3e69 100644 --- a/Makefile.in +++ b/Makefile.in @@ -55,6 +55,8 @@ include $(BUILDDIR)/config_$(gb_Side).mk export GMAKE_OPTIONS?=-r$(if $(verbose)$(VERBOSE),,s)$(value $(MAKEFLAGS)) +PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),) + # # Partial Build # @@ -62,13 +64,13 @@ define gb_Top_GbuildModuleRules .PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(1).subsequentcheck $(1): bootstrap fetch - cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) + cd $(SRCDIR)/$(2) && $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $(1).build $(1).check $(1).clean $(1).showdeliverables $(1).subsequentcheck: - cd $(SRCDIR)/$(2) && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) + cd $(SRCDIR)/$(2) && $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@) $(1).all: bootstrap fetch - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)) + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)) endef @@ -121,7 +123,7 @@ gbuild_TARGETS := AllLangHelp \ # build a generic gbuild target $(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)): - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@ + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@ # # Clean @@ -221,15 +223,15 @@ build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset) ifneq ($(filter-out WNT MACOSX IOS ANDROID,$(OS)),) mkdir -p $(INSTDIR) && install-gdb-printers -a $(INSTDIR) -c endif - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal) ifeq ($(OS),IOS) - $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) ios + $(GNUMAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios endif build-non-l10n-only build-l10n-only build-nocheck check debugrun help slowcheck translations unitcheck subsequentcheck packageinfo: build cross-toolset: bootstrap fetch - $(GNUMAKE) gb_Side=build -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools + $(GNUMAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools # diff --git a/configure.ac b/configure.ac index 89a8166..016bb16 100644 --- a/configure.ac +++ b/configure.ac @@ -12373,7 +12373,7 @@ AC_MSG_CHECKING([for number of processors to use]) # plain --with-parallelism is just the default if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then if test "$with_parallelism" = "no"; then - PARALLELISM=1 + PARALLELISM=0 else PARALLELISM=$with_parallelism fi @@ -12397,10 +12397,7 @@ else esac # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an - # unexpected format, 'wc -l' will have returned 0. - if test "$PARALLELISM" -eq 0; then - PARALLELISM=1 - fi + # unexpected format, 'wc -l' will have returned 0 (and we won't use -j at all). fi fi @@ -12414,7 +12411,11 @@ if test "$no_parallelism_make" = "YES" && test $PARALLELISM -gt 1; then fi fi -AC_MSG_RESULT([$PARALLELISM]) +if test $PARALLELISM -eq 0; then + AC_MSG_RESULT([explicit make -j option needed]) +else + AC_MSG_RESULT([$PARALLELISM]) +fi AC_SUBST(PARALLELISM) # commit f7859e52829a44e04692653079aea3a5df4579da Author: LuboÅ¡ LuÅák <l.lu...@collabora.com> Date: Sun Mar 23 15:31:04 2014 +0100 fix filename detection in clang plugins SourceManager::getFilename() returns "<stdin>" whenever icecream is used. Change-Id: I4e3e1b90880c5fd2b53f20e4ce3e38e3a0486973 diff --git a/compilerplugins/clang/literaltoboolconversion.cxx b/compilerplugins/clang/literaltoboolconversion.cxx index 5c87f47..c94e0d1 100644 --- a/compilerplugins/clang/literaltoboolconversion.cxx +++ b/compilerplugins/clang/literaltoboolconversion.cxx @@ -160,8 +160,8 @@ bool LiteralToBoolConversion::isFromCIncludeFile( return false; } #endif - return compiler.getSourceManager().getFilename(spellingLocation).endswith( - ".h"); + return StringRef(compiler.getSourceManager().getPresumedLoc(spellingLocation) + .getFilename()).endswith(".h"); } bool LiteralToBoolConversion::isMacroBodyExpansion(SourceLocation location) diff --git a/compilerplugins/clang/store/referencecasting.cxx b/compilerplugins/clang/store/referencecasting.cxx index 113002c..e6a1391 100644 --- a/compilerplugins/clang/store/referencecasting.cxx +++ b/compilerplugins/clang/store/referencecasting.cxx @@ -97,7 +97,7 @@ static const Type* extractTemplateType(Expr* cce); bool ReferenceCasting::VisitCXXConstructExpr( CXXConstructExpr* cce ) { // don't bother processing anything in the Reference.h file. Makes my life easier when debugging this. - if( compiler.getSourceManager().getFilename( cce->getSourceRange().getBegin() ).find( "Reference.h" ) != StringRef::npos ) + if( StringRef(compiler.getSourceManager().getPresumedLoc( cce->getSourceRange().getBegin() )).find( "Reference.h" ) != StringRef::npos ) return true; // look for calls to the Reference<T>(x,UNO_something) constructor
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits