Closed Bug 1062219 Opened 10 years ago Closed 10 years ago

Don't build build/clang-plugin as an external directory

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla35

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file, 1 obsolete file)

It's the last piece left that needs add_tier_dir.
Blocks: 1062221
Attachment #8483400 - Flags: review?(Pidgeot18)
Comment on attachment 8483400 [details] [diff] [review] Don't build build/clang-plugin as an external directory Review of attachment 8483400 [details] [diff] [review]: ----------------------------------------------------------------- https://tbpl.mozilla.org/?tree=Try&rev=c3494afd36cf ::: config/recurse.mk @@ +161,5 @@ > +# Interdependencies for parallel export. > +js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export > +accessible/xpcom/export: xpcom/xpidl/export > +ifdef ENABLE_CLANG_PLUGIN > +$(filter-out build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target Note this is being moved here because compile_targets is not defined until recurse.mk is included, which only happens at the very end of Makefile.in (as added by the recursivemake backend ; and recurse.mk can't be included twice). And it's better to keep all the interdeps together than have one here and the rest in Makefile.in.
Comment on attachment 8483400 [details] [diff] [review] Don't build build/clang-plugin as an external directory Review of attachment 8483400 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/config/mozconfigs/macosx64/debug @@ +10,5 @@ > export MOZILLA_OFFICIAL=1 > > ac_add_options --with-macbundlename-prefix=Firefox > > +ac_add_options --enable-clang-plugin Note this is a remains from the try build. I'll remove it.
Refreshed against current inbound.
Attachment #8483886 - Flags: review?(Pidgeot18)
Attachment #8483400 - Attachment is obsolete: true
Attachment #8483400 - Flags: review?(Pidgeot18)
Comment on attachment 8483886 [details] [diff] [review] Don't build build/clang-plugin as an external directory Review of attachment 8483886 [details] [diff] [review]: ----------------------------------------------------------------- ::: build/autoconf/clang-plugin.m4 @@ +24,5 @@ > + > + if test ! -x "$LLVMCONFIG"; then > + AC_MSG_RESULT([not found]) > + AC_MSG_ERROR([Cannot find an llvm-config binary for building a clang plugin]) > + fi I suspect this could be simplified with a MOZ_PATH_PROG or something, but I don't recall the magic incantations. ::: build/clang-plugin/Makefile.in @@ +13,5 @@ > +# variable to limit ourselves to what we need to build the clang plugin. > +OS_CXXFLAGS := $(LLVM_CXXFLAGS) -fno-rtti -fno-exceptions > +OS_COMPILE_CXXFLAGS := > +OS_LDFLAGS := $(LLVM_LDFLAGS) $(CLANG_LDFLAGS) > +DSO_LDOPTS := -shared I think this may break the Darwin build? (-dynamiclib was in the configure, but I'm not sure if this overrides it out of existence). I don't own a mac, so I can't test it myself to be sure. ::: build/clang-plugin/tests/moz.build @@ +8,5 @@ > + 'TestCustomHeap.cpp', > + 'TestMustOverride.cpp', > + 'TestNonHeapClass.cpp', > + 'TestStackClass.cpp', > +] You should probably add in the DISABLE_STL_WRAPPING and NO_VISIBILITY_FLAGS here as well. ::: build/unix/stdc++compat/Makefile.in @@ +2,5 @@ > # 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/. > > NO_EXPAND_LIBS = 1 > +ENABLE_CLANG_PLUGIN := Heh, sneaky. :-)
Attachment #8483886 - Flags: review?(Pidgeot18) → review+
(In reply to Joshua Cranmer [:jcranmer] from comment #5) > > +# variable to limit ourselves to what we need to build the clang plugin. > > +OS_CXXFLAGS := $(LLVM_CXXFLAGS) -fno-rtti -fno-exceptions > > +OS_COMPILE_CXXFLAGS := > > +OS_LDFLAGS := $(LLVM_LDFLAGS) $(CLANG_LDFLAGS) > > +DSO_LDOPTS := -shared > > I think this may break the Darwin build? (-dynamiclib was in the configure, > but I'm not sure if this overrides it out of existence). I don't own a mac, > so I can't test it myself to be sure. -dynamiclib is added on rules.mk. (And the try build I linked did a mac build with clang-plugin ;) )
> I suspect this could be simplified with a MOZ_PATH_PROG or something, but > I don't recall the magic incantations. I tried... and MOZ_PATH_PROG(S) doesn't like the absolute path that we get from deriving from $CXX. BTW, I switched that to $CXX -print-prog-name=llvm-config, which has the advantage of working even when CXX is wrapped.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: