Add -Zc:inline for MSVC build

RESOLVED FIXED in Firefox 50

Status

defect
RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: m_kato, Assigned: m_kato)

Tracking

unspecified
mozilla50
Unspecified
Windows

Firefox Tracking Flags

(firefox50 fixed)

Details

()

Attachments

(1 attachment)

MSVC2013 update 2+ has new compiler option "-Zc:inline" to reduce COMDAT size.

The following result is when I add this option to compiler option to build xul.dll on my build environment (MSVS2015 RTM x86 opt build).

Normal (time mozmake -C $(OBJDIR)/toolkit/library)

real    1m31.687s
user    0m0.000s
sys     0m0.015s

With -Zc:inline

real    1m8.512s
user    0m0.000s
sys     0m0.015s
Windows x64 build using VS2015 Update 1
With    -Zc:inline ... 39m44s
Without -Zc:inlune ... 43m52s
Assignee: nobody → m_kato
-Zc:inliune introduces VS2013 update 2 to reduce build time.

https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the-incremental-developer-build-scenario/

On my workstation (i7-3770, 4 cores 8 threads), the build time by clean build (--enable-optimize and --disable-debug) is the following.

With    -Zc:inline ... 39m44s
Without -Zc:inlune ... 43m52s

So we should use this option to improve build time.

Review commit: https://reviewboard.mozilla.org/r/58926/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58926/
Attachment #8761909 - Flags: review?(ted)
Attachment #8761909 - Flags: review?(ted) → review+
Comment on attachment 8761909 [details]
Bug 1220525 - Add -Zc:inline for MSVC build.

https://reviewboard.mozilla.org/r/58926/#review55828

The documentation says this doesn't do anything with optimization is disabled or when -GL is passed. Should we bother trying not to set it in those situations, or is it harmless?

Also I didn't know about `/LTCG:incremental`, we should try that out for our PGO builds!
Filed bug 1279457 on LTCG:incremental.
https://reviewboard.mozilla.org/r/58926/#review55828

If using -Od or -GL with -Zc:inline, this Zc:inline is ignore.
https://hg.mozilla.org/mozilla-central/rev/3f6e4108360d
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.