Commit Graph

667 Commits

Author SHA1 Message Date
Mike Hommey
0c3d01c934 Bug 1235738 - Move MOZ_DEBUG_DEFINES to build frontend. r=gps
MOZ_DEBUG_DEFINES are essentially defines used everywhere. So treat them as
feeding the initial value for DEFINES in each moz.build sandbox. This allows
the kind overrides that was done in the past by resetting MOZ_DEBUG_DEFINES
in Makefiles.
2015-12-31 07:27:23 +09:00
Mike Hommey
84bdf4908c Bug 1235132 - Add support for a more-or-less cross-platform symbols file. r=gps
Currently, one needs to define DEFFILE or LD_VERSION_SCRIPT appropriately,
and somehow deal with the fact that their input format is different, which
currently relies on manual invocations of the convert_def_file script, with
awkward aggregations.

This simplifies the problem by using a simple list of symbols, with
preprocessing, allowing #includes.
2015-12-31 07:22:04 +09:00
Mike Hommey
7813cce5bd Bug 1235021 - Always use the % marker for preprocessed css files. r=gps
Currently, only css files added through jar manifests are treated this way.
There is really no reason for the discrepancy, but there are actually no css
files added directly through moz.build, so this was never a problem.

On the other hand, it makes things simpler in a world where jar manifests are
treated as if they were entirely described in moz.build (which is where the
FasterMake backend is heading).
2015-12-31 07:06:11 +09:00
Mike Hommey
cf2072bfc0 Bug 1234955 - Make TEST_DIRS a SPECIAL_VARIABLE. r=gps
Using TEST_DIRS is nothing more than a shortcut for

if CONFIG['ENABLE_TESTS']:
    DIRS += [...]

As such, we might as well remove it being a separate variable, and use some
Context magic to just fill DIRS when ENABLE_TESTS is set.

The security/manager/ssl/tests/unit/moz.build change ensures that the order
of DIRS before the change is kept, not because it matters, but because it
allows to confirm that nothing else is modified by this change.
2015-12-24 13:12:49 +09:00
Nathan Froyd
acd57f11f3 Bug 1208566 - emit proper dependencies when compiling Rust sources; r=mshal 2015-12-17 12:14:33 -08:00
Wes Kocher
a99845bbc4 Backed out 2 changesets (bug 1208566) for breaking mulet builds
Backed out changeset a5618a5cbc7f (bug 1208566)
Backed out changeset f3fd530324ee (bug 1208566)
2015-12-17 09:34:33 -08:00
Nathan Froyd
aeed534cc0 Bug 1208566 - emit proper dependencies when compiling Rust sources; r=mshal 2015-12-17 08:25:03 -08:00
Mike Hommey
b36ad7dc0b Bug 1230355 - Remove include_deps. r=mshal
We used to use include_deps to trigger a fast-path in pymake, but we don't
use pymake anymore, so we can use normal includes now.
2015-12-09 19:23:53 +09:00
Mike Hommey
75d3ac49f6 Bug 1229241 - Use FINAL_TARGET{,_PP}_FILES for JS_PREFERENCE{,_PP}_FILES. r=gps 2015-12-01 13:57:52 +09:00
Mike Hommey
4674cd8a4e Bug 1229241 - Redirect EXTRA{_PP}_COMPONENTS to FINAL_TARGET{,_PP}_FILES.components. r=gps 2015-12-01 13:57:52 +09:00
Mike Hommey
bfb9659d48 Bug 1228444 - Make DIST_FILES a HierarchicalStringList, like FINAL_TARGET_FILES. r=gps 2015-12-01 08:25:22 +09:00
Mike Hommey
5f18a2a5fe Bug 1228444 - Don't silence "no preprocessor directives found" warnings for DIST_FILES. r=gps
and move files without preprocessor directives to FINAL_TARGET_FILES.
2015-12-01 08:25:22 +09:00
Jon Coppeard
441b24da04 Bug 1220731 - Refactor embedjs script for use from moz.build rather than makefiles r=shu r=glandium 2015-11-06 13:09:01 +00:00
Chris Manchester
5bf4c34abc Bug 1220000 - Unconditionally include EXTRA_MDDEPEND_FILES so callers get what they expect. r=glandium
GENERATED_FILES and accessible/xpcom/Makefile.in add to EXTRA_MDDEPEND_FILES, but for
targets that run during export. Export doesn't include EXTRA_MDDEPEND_FILES, so none
of them is ending up with correct dependencies. The EXTRA_EXPORT_MDDEPEND_FILES variable
could be used for this purpose, but given the circumstances this variable is removed,
and EXTRA_MDDEPEND_FILES is instead included unconditionally.
2015-11-03 10:23:04 -08:00
Mike Hommey
96b01137ad Bug 1212773 - Pass a base directory to jar maker, instead of a chrome directory. r=gps 2015-10-20 07:36:47 +09:00
Mike Hommey
302d6ecb6c Bug 1211765 - Remove remnants from --with-libxul-sdk. r=bsmedberg
The configure option has explicitly thrown an error for more than a year now,
and it happens that the remaining way to still forcefully use it has been
broken for more than 8 months.
2015-10-14 08:02:34 +09:00
Mike Hommey
af0645ef97 Bug 1210329 - Remove support for line endings munging in the preprocessor. r=gps
It was added back in
5147d5c69f
for unclear reasons (and the lack of bug number doesn't help), and hasn't been
used, as far as I can see in the gecko-dev history, other than in bug 206029,
which is the only use currently in the tree.

Bug 206029 was working around the Flash player installer modifying Firefox's
prefs file and not dealing with it properly or something depending on the line
endings. 11 years later, all prefs files except channel-prefs.js are in
omni.ja, so obviously, bug 206029 doesn't actually apply anymore.

So, let's simplify it all and get rid of this.
2015-10-06 11:15:04 +09:00
Mike Hommey
b910106253 Bug 1209875 - Get rid of XULPPFLAGS. r=gps
The flags added in toolkit/locales/Makefile.in turn out not to be actually
used, so just remove that.

The remaining uses of XULPPFLAGS are to set debug flags depending on whether
MOZ_DEBUG is set or not. Just set a dedicated variable with the right value
from configure.
2015-10-01 07:30:48 +09:00
Andreas Tolfsen
7f12d0e4ac Bug 1177608: Support for compiling optimised Rust code
Optimised Rust compilation is enabled on passing --enable-optimize to
the configure script.  This sets the RUSTFLAGS output variable that gets
picked up by the compile targets RSOBJS and RSSRCS and passed to rustc.

r=glandium
2015-07-21 14:21:40 +01:00
Ted Mielczarek
da4276d0ce bug 1163828 - build system changes to support building for iOS. r=glandium 2015-06-10 11:10:40 -04:00
Mike Hommey
5565137dc9 Bug 1166538 - Use zip py_action in a few places. r=gps 2015-05-21 15:17:02 +09:00
Brian O'Keefe
f21be4ff50 Bug 924187 - Deal with interfaces.manifest from the backend. r=mshal 2015-02-13 08:11:57 -05:00
Ralph Giles
36cf88893c Bug 1161339 - Add rust support to moz.build. r=ted
Add .rs as a recognized file extension in SOURCES.

Propagate that through to the Makefile backend and add a dependency
generated and an explicit rule to call $(RUSTC) to compile them.

rustc builds static libraries, not obj files. At least, if one
asks it to output an obj file, I'm not clear how to get all the
compiler-specific runtime libraries the code will expect to link
to. Therefore we generate a static library for each rust source
file (which must be a complete crate for the time being) and link
that. Because of the extension it ends up on the LIBS line in the
the corresponding .desc file.

Note that the static library does still depend on some system
libraries, e.g. -ldl -lpthread -lm on linux. Gecko already
links to all of those, so we don't keep track of it here.

Should we need to add explicit linkage for other targets,
rustc does print a list to stderr which can be parsed.
2015-05-08 15:18:00 -07:00
Nathan Froyd
1f5f313382 Bug 1155283 - remove XULAPP_DEFINES from DIST_FILES_FLAGS; r=mshal
Nothing uses XULAPP_DEFINES anymore, let's just get rid of it.  There
are plenty more places to add in defines for DIST_FILES if one is so
inclined.
2015-05-07 10:03:16 -04:00
Nathan Froyd
c585b5953e Bug 1155816 - part 2 - move EXTRA_*COMPONENTS manifest check to build-backend time; r=mshal
Now that moz.build can see EXTRA_*COMPONENTS and NO_JS_MANIFEST, we can
move some logic from rules.mk (executed every build) to moz.build's
emitter.py (executed only at build-backend time).
2015-04-17 15:02:19 -04:00
Mike Hommey
cf828c4557 Fixup for bug 1153154 for bustage on a CLOSED TREE. r=me
There was no need for a stdc++compat check on host static libraries anyways.
2015-04-16 15:30:29 +09:00
Mike Hommey
381dec0f8d Bug 1153154 - Add stdc++compat check for host programs when not cross compiling. r=mshal 2015-04-16 14:35:11 +09:00
Brian O'Keefe
6f8d3debc1 Bug 852814 - Move mozbuild variable blacklist logic into the backend. r=gps 2015-03-27 15:39:34 -04:00
Mike Hommey
023efed4e5 Bug 1063874 - Move the parts of XPIDL_SOURCES handling in misc to export. r=gps 2015-02-11 17:36:45 +09:00
Brian O'Keefe
95c6931766 Bug 923080 - Generate xpt files into final location. r=glandium
Now that the mozbuild backend knows about FINAL_TARGET, we are able to
install generated xpt files into their final location. This saves us
from copying xpt files into their final location on every build.

Original patch by gps, rebased and comments addressed by Ms2ger

--HG--
extra : transplant_source : %E2%DC%0F%E0%AD%C2%25%A1%B8%A9%FE%B0%8C%60%FF%CB%02G%25%E5
2014-05-21 08:25:57 -04:00
Nathan Froyd
14806a4dab Bug 1109826 - part 2 - don't complain about missing directives for PREF_JS_EXPORTS and DIST_FILES; r=mshal 2014-12-10 14:56:14 -05:00
Joshua Cranmer
ea98d7eb48 Bug 1099430, mozilla-central parts: Eliminate the duplication of the build system in comm-central, r=glandium.
See the revisions a few steps prior for more fine-grained information. This just
needs to be relanded because our automation doesn't like non-ASCII commit
messages.

--HG--
extra : amend_source : 0ee4e0da1ea9ada815abfe989c51030db24aac56
2014-11-29 19:45:31 -06:00
Phil Ringnalda
372f1d5141 Backed out 3 changesets (bug 1099430) because 256 characters should be enough for anybody's commit message
CLOSED TREE

Backed out changeset 28abb8af2d62 (bug 1099430)
Backed out changeset 358aa39360d5 (bug 1099430)
Backed out changeset 3313e545f4f6 (bug 1099430)
2014-11-29 17:17:58 -08:00
Joshua Cranmer
f56be8e505 Bug 1099430, part 三: Use MOZILLA_DIR instead of topsrcdir in shared makefiles, r=glandium.
With these substitutions, it is possible to have comm-central's versions of
these files merely include the mozilla-central versions and avoid having to port
small changes to these files.
2014-11-29 18:44:19 -06:00
Joshua Cranmer
e167ca3ee0 Bug 1099430, part 一: Define MOZILLA_DIR early in the base makefiles, r=glandium.
This change allows us to use use MOZILLA_DIR even for changes in config.mk. The
corollary is that comm-central needs to define MOZILLA_DIR before calling into
baseconfig.mk, which it already does.

The change to the test Makefile is needed since it decides to skip including
config.mk, and hence baseconfig.mk, where it would need to grab the MOZILLA_DIR
declaration.
2014-11-29 18:44:10 -06:00
Gregory Szorc
ed99fc6d08 Bug 1094303 - Move XPT buildlist into misc tier; r=glandium
buildlist invocations are slow and can occur in parallel since the
underlying program obtains a lock on the modified file.

Moving the XPT-related buildlist invocation from the serial libs tier to
the parallel misc tier decreased my no-op build time on OS X from 43.5s
to 37.0s.

--HG--
extra : rebase_source : 7d274024c401b1ecfbc771424a69eb487808fcbf
2014-11-05 09:20:35 -08:00
Gregory Szorc
300dead6a6 Bug 1094302 - Remove unused EXTRA_JS_MODULES rule from rules.mk; r=glandium
The installation rule for EXTRA_JS_MODULES and EXTRA_PP_JS_MODULES
became unused after b961ba8f0892 (bug 1044162). We remove the dead code.

--HG--
extra : rebase_source : 40adf7514d15ae4ba5bbfe3ac101061657aac841
2014-11-05 09:39:13 -08:00
Mike Hommey
98bf69eaca Bug 1094584 - Stop using the fake.lib trick. r=mshal
This used to be necessary to avoid the conflicting names between import
libraries and static libraries, but that's now prevented by the whole
moz.build machinery.
2014-11-07 10:16:42 +09:00
Mike Hommey
716ca947ee Bug 1094037 - Move EXTRA_COMPONENTS and EXTRA_PP_COMPONENTS to the misc tier. r=gps 2014-11-06 09:29:11 +09:00
Wes Kocher
1fdc9b5743 Backed out changeset db93b3cbdc17 (bug 1094037) on a CLOSED TREE 2014-11-05 17:22:50 -08:00
Mike Hommey
63068dc27e Bug 1094037 - Move EXTRA_COMPONENTS and EXTRA_PP_COMPONENTS to the misc tier. r=gps 2014-11-06 09:29:11 +09:00
Mike Hommey
5891d89d94 Bug 1094033 part 1 - Consolidate how to add new tiers. r=gps 2014-11-06 09:29:11 +09:00
Jan Beich
0df6da7ff6 Bug 1041795 - Disable system libs when generating DTrace probes. f=sfink f=ginn.chen 2014-11-04 02:01:00 +01:00
Mike Hommey
1a8251444c Bug 1091383 - Move delayload logic entirely in moz.build frontend code. r=gps 2014-11-04 13:48:25 +09:00
Mike Hommey
21ec48314e Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.

Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.

Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
2014-10-30 13:06:12 +09:00
Mike Hommey
9b1a605c36 Bug 1090107 - Define stlport dependencies in moz.build. r=mshal 2014-10-29 13:29:42 +09:00
Mike Hommey
2a378e99b5 Bug 857628 - Add a --enable-pie configure option to build target programs as position independent executables when supported by gcc/clang. r=mshal 2014-09-26 07:33:56 +09:00
Mike Hommey
57bb3d7a5e Bug 1077228 - Include the right autoconf.mk in GLOBAL_DEPS. r=mshal
Ever since bug 969164, the js build system, when building gecko (not when
building standalone) uses a autoconf-js.mk file for its config.

One of the suboptimal ways we have to retrigger builds when the build
configuration changes (changes to e.g. configure.in can do that) is to
make most things depend on autoconf.mk. Which unfortunately doesn't
account for the fact the js/src subdirectory uses a different file.

In practice, this means that some classes of changes to the js build
system, not accompanied with toplevel build system changes may no
trigger the corresponding rebuilds in the js subtree on incremental
builds.
2014-10-04 10:34:35 +09:00
Mike Hommey
38cd110ce5 Bug 1077151 - Always use expandlibs descriptors when they exist. r=mshal
Currently, when there is both an expandlibs descriptor and an actual static
library, expandlibs picks the static library. This has the side effect that
if there are object files in the static library that aren't directly used,
they're dropped when linking, even when they export symbols that would be
exported in the final linked binary.

In most cases in the code base, files are not dropped that way. The most
notable counter-example is xpcomglue, where actually not dropping files
leads to link failure because of missing symbols those files reference
(yes, that would tend to say the glue is broken in some way).

On the opposite side, there is mozglue, which does have both a descriptor
and a static library (the latter being necessary for the SDK), and that
linking as a static library drops files that shouldn't be dropped (like
jemalloc). We're currently relying on -Wl,--whole-archive for those files
not to be dropped, but that won't really be possible without much hassle
in a world where mozglue dependencies live in moz.build land.

Switching expandlibs to use descriptors when they exist, even when there
is a static library (so, the opposite of the current behavior) allows to
drop -Wl,--whole-archive and prepare for a better future. However, as
mentioned, xpcomglue does still require to be linked through the static
library, so we need to make it a static library only.

To achieve that, we make NO_EXPAND_LIBS now actually mean no expandlibs
and use that to build the various different xpcomglues.
2014-10-04 10:33:00 +09:00
Ed Morley
0a6ff6b98e Backed out changeset e2fee324047d (bug 857628) for causing bug 1076892 2014-10-03 14:19:45 +01:00