Build the editor in unified mode

RESOLVED FIXED in mozilla28

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

unspecified
mozilla28
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
This helps with building the code faster, similar to the way that we currently build WebIDL bindings, IPDL protocols, etc.

Try run: https://tbpl.mozilla.org/?tree=Try&rev=94763325e4a1
(Assignee)

Comment 1

5 years ago
Created attachment 829882 [details] [diff] [review]
Part 1: Remove the unused editor noisy debug output code
(Assignee)

Comment 2

5 years ago
Created attachment 829883 [details] [diff] [review]
Part 2: Build the editor in unified mode
(Assignee)

Updated

5 years ago
Assignee: nobody → ehsan
Summary: Part 1: Remove the unused editor noisy debug output code → Build the editor in unified mode
(Assignee)

Updated

5 years ago
Attachment #829882 - Flags: review?(roc)
(Assignee)

Updated

5 years ago
Attachment #829883 - Flags: review?(roc)
What are we losing here? Does this make it harder to debug editor code? Is there a reason to not build all source files in unified mode?
(Assignee)

Comment 4

5 years ago
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> What are we losing here? Does this make it harder to debug editor code? Is
> there a reason to not build all source files in unified mode?

No, it won't make anything harder since the preprocessor places the correct #line lines so that we don't lose the file name information.  In the general case, you can't mix C or C++ translation units and then get a program with the same meaning as compiling them individually and linking them together, because of things such as naming clashes, static functions/data, etc.  (See the removal of gNoisy in the part 1 patch.)

The other trade-off is that the more you mix translation units, the higher the chance that the unified source file will require rebuilding because of a change to a dependency that would only affect one of the original translation units, so mixing lots of files can make incremental builds slower than they have to be, but the build system will unify a maximum of 16 files together, so that won't be much of an issue.

So we can't just build all source files in unified mode without modification and verification, but we should try to move towards that goal gradually.
https://hg.mozilla.org/mozilla-central/rev/e36c53dd1eb0
https://hg.mozilla.org/mozilla-central/rev/831f935fc659
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28

Updated

5 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.