Use -Z7 by default for clang-cl builds
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox67 fixed)
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: ted, Assigned: ted)
References
Details
Attachments
(2 files)
clang doesn't actually support -Zi (for generating debug info into a separate PDB file while compiling a source file), it treats it as an alias for -Z7, which generates debug info into the object file. We still pass -Zi to clang-cl though: https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/build/moz.configure/toolchain.configure#1135 but then we override it with -Z7 in mozconfig.cache (for sccache's benefit): https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/build/mozconfig.cache#84 We should just switch to using -Z7 directly for clang-cl builds, which will make using sccache for local clang-cl builds straightforward.
Assignee | ||
Comment 1•5 years ago
|
||
While we're at it, we could probably also wrap the whole block that sets COMPILE_PDB_FLAG in `ifneq ($(CC_TYPE),clang)`: https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/config/rules.mk#145-151 That would let us just drop that whole section from mozconfig.cache.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cd879f9e92c20e7560c8863a9f127adedf55d493
Assignee | ||
Comment 3•5 years ago
|
||
We default to -Zi for Windows debug flags, which is for generating debug info
into a PDB file, but clang-cl doesn't actually implement that so -Zi is
an alias for -Z7 in clang-cl:
http://clang.llvm.org/docs/UsersManual.html#id9
sccache has special handling for -Zi because multiple compiles writing
to the same PDB file is not cacheable, so we've always overridden -Zi with -Z7
in CI when using sccache.
Given that everyone should be using clang-cl nowadays and MSVC will no longer
be supported soon, this patch changes the default and removes some PDB
file name flag setting from rules.mk, as well as the no-longer-necessary
overrides from mozconfig.cache.
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by tmielczarek@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1a1d4380a8e switch Windows debug flags from -Zi to -Z7. r=nalexander https://hg.mozilla.org/integration/autoland/rev/3a443a1bc66e remove some no-longer-necessary bits from mozconfig.cache. r=nalexander,glandium
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c1a1d4380a8e
https://hg.mozilla.org/mozilla-central/rev/3a443a1bc66e
Description
•