Provide a build time option to disable UNIFIED_SOURCES across the tree

RESOLVED FIXED in mozilla28

Status

RESOLVED FIXED
5 years ago
8 months ago

People

(Reporter: Ehsan, Assigned: gps)

Tracking

Trunk
mozilla28
x86
Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
glandium, any preferences on how we do this?
Flags: needinfo?(mh+mozilla)
(Reporter)

Comment 1

5 years ago
Chris suggested on dev-platform the following:

It might be useful to add a files_per_unified_file parameter to mozconfig or mach build. People could benchmark different values of files_per_unified_file (trading off clobber vs incremental build times). The same parameter could also be used to disable unified builds with files_per_unified_file = 1. 

I think it's a great idea!
Also I'd like to suggest a global --disable-unified, but also --disable-unified=gfx,content,dom/canvas  to state "disable unified only in these directory prefixes", to let devs tweak based on their workflow.
(Assignee)

Comment 3

5 years ago
Created attachment 8335511 [details] [diff] [review]
Add --disable-unified-compilation configure flag

Start simple. Iterate as needed.
Attachment #8335511 - Flags: review?(mh+mozilla)
Attachment #8335511 - Flags: feedback?(ehsan)
(Assignee)

Updated

5 years ago
Assignee: nobody → gps
Status: NEW → ASSIGNED
(Reporter)

Comment 4

5 years ago
Comment on attachment 8335511 [details] [diff] [review]
Add --disable-unified-compilation configure flag

Review of attachment 8335511 [details] [diff] [review]:
-----------------------------------------------------------------

Hmm, thinking more about comment 1, we actually do need a separate way of disabling unified builds altogether for lldb at least, and using the unification threshold of 1 as a special case won't work.  Given that, f=me.

(Note that I think what Vlad is proposing also makes sense.  I don't know autoconf enough, but can we do something like have --disable-unified-compilation disable this globally, and --disable-unified-compilation=gfx for the gfx/ top level dir?)
Attachment #8335511 - Flags: feedback?(ehsan) → feedback+
Comment on attachment 8335511 [details] [diff] [review]
Add --disable-unified-compilation configure flag

Review of attachment 8335511 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +376,5 @@
> +[  --disable-unified-compilation
> +                          Disable unified compilation of some C/C++ sources],
> +    DISABLE_UNIFIED_COMPILATION=1,
> +    DISABLE_UNIFIED_COMPILATION=)
> +AC_SUBST(DISABLE_UNIFIED_COMPILATION)

MOZ_?

::: python/mozbuild/mozbuild/backend/recursivemake.py
@@ +369,5 @@
> +                            include_curdir_build_rules=False)
> +                        backend_file.write('%s += $(%s)\n' % (k[len('UNIFIED_'):], k))
> +                    else:
> +                        backend_file.write('%s += %s\n' % (
> +                            k[len('UNIFIED_'):], ' '.join(sorted(v))))

Note that everywhere else we output one file per line. Not that it matters much.
Attachment #8335511 - Flags: review?(mh+mozilla) → review+
Blocks: 941365
Note bug 941365 will cover per-directory disabling.
Flags: needinfo?(mh+mozilla)
(Assignee)

Updated

5 years ago
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/ffff8b694ef0
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28

Updated

8 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.