Closed
Bug 1414287
Opened 7 years ago
Closed 6 years ago
Use a 64-bit clang-cl.exe for 32-bit static analysis builds
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: away, Assigned: glandium)
References
Details
Attachments
(3 files)
In bug 1412952 I was surprised to discover that we use a 32-bit clang-cl.exe for 32-bit static analysis builds (in contrast to all other Win32 builds where we use a 64-bit toolchain). I landed an ugly hack to let 32-bit clang-cl.exe find 64-bit link.exe in our releng package.
I think it would be better to use a 64-bit compiler with -m32. Nathan says this ought to be easy, see bug 1412952 comment 14.
Then we can remove my Hostx64 hack.
And ThinLTO builds will need this too. They OOM left and right with a 32-bit toolchain.
Blocks: WinLTO
Nathan, do you have any time to share advice on how to implement this?
Flags: needinfo?(nfroyd)
Comment 3•7 years ago
|
||
We add the -m32 flag (or --target for clang) here:
https://dxr.mozilla.org/mozilla-central/source/build/moz.configure/toolchain.configure#518
Adding a clang-cl case somewhere in there (I think in the `not info.cpu or info.cpu != target.cpu` case) should let configure figure out the right flags to pass to clang-cl? Does that seem sufficient?
Flags: needinfo?(nfroyd)
I assume there are some automation files that need to be touched too, to tell the 32-bit builders to pull the 64-bit package?
Comment 5•7 years ago
|
||
Indeed.
Comment 7•7 years ago
|
||
(In reply to David Major [:dmajor] from comment #6)
> I was hoping you'd tell me which files those would be. :p
taskcluster/ci/
build/windows.yml
searchfox/kind.yml
static-analysis/kind.yml
The win32-clang-cl in those files should be changed to win64-clang-cl. Once everything works, you can remove the win32-clang-cl job from taskcluster/ci/toolchain/windows.yml.
Comment 9•7 years ago
|
||
libclang should only be loaded by bindgen from build scripts, which are host binaries. I suppose that since we don't have a `--host=...` in our win32 mozconfigs we're building 32-bit host binaries:
https://dxr.mozilla.org/mozilla-central/source/build/win32/mozconfig.vs2017
Looking at a random win32 opt build on inbound does show:
19:05:42 INFO - checking for host system type... i686-pc-mingw32
I don't know how much of a PITA it would be to change that to x86_64, though, since:
a) we'd have to set HOST_{CC,CXX} appropriately and the LIB/INCLUDE nonsense might be hard to get right
b) we might wind up with a reoccurrence of bug 1377157 because rustc and cargo build scripts don't have a sensible way to set the host compiler
Reporter | ||
Comment 10•7 years ago
|
||
Ok, so to achieve the goal of this bug title ("Use a 64-bit clang-cl.exe for 32-bit static analysis builds"), these things are needed:
* Some preparatory build changes that were already done in bug 1401647.
* Pass the -m32 flag to 64-bit clang-cl. I've split this off into bug 1429128.
* Fix the clang-plugin build. Right now we can't just flip the switch on the "S" builds to use the "win64-clang-cl" toolchain because then clang-plugin fails to build because of wrong-bitness libs. This should probably be its own bug once we know what the change needs to be.
* Then, we _can_ flip the switch on "S" builds to use the "win64-clang-cl" toolchain
* Nail in the coffin: delete the win32-clang-cl toolchain definition.
Reporter | ||
Comment 11•7 years ago
|
||
> * Fix the clang-plugin build. Right now we can't just flip the switch on the
> "S" builds to use the "win64-clang-cl" toolchain because then clang-plugin
> fails to build because of wrong-bitness libs. This should probably be its
> own bug once we know what the change needs to be.
I broke this out into bug 1429549, though I still don't know what the fix should be.
Depends on: 1429549
Updated•7 years ago
|
Product: Core → Firefox Build System
Reporter | ||
Comment 12•7 years ago
|
||
(In reply to David Major [:dmajor] from comment #1)
> And ThinLTO builds will need this too. They OOM left and right with a 32-bit toolchain.
This is no longer the case after bug 1443827 made the st-an builders use their own toolchain.
No longer blocks: WinLTO
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → mh+mozilla
Assignee | ||
Comment 13•6 years ago
|
||
This also requires the 64-bits rust compiler and some build system
tweaks.
Assignee | ||
Comment 14•6 years ago
|
||
Depends on D7845
Assignee | ||
Comment 15•6 years ago
|
||
Depends on D7846
Comment 16•6 years ago
|
||
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/73dcff37f846
Use a 64-bits clang-cl for 32-bits static analysis builds r=dmajor
https://hg.mozilla.org/integration/autoland/rev/98bb6d9eb63c
Remove now unused win32-clang-cl-st-an toolchain r=dmajor
https://hg.mozilla.org/integration/autoland/rev/5cc491e4d9cb
Remove now unused win32-rust-1.29 toolchain r=dmajor
Comment 17•6 years ago
|
||
Backed out 3 changesets (bug 1414287) for build bustages module machine type 'x64' conflicts with target machine type 'x86
push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=203766661&revision=5cc491e4d9cb991d8e14b3710b83ff29d9562a8a
failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&fromchange=b26a70a0fe8f22ee4a5118c7c563ab98a115e692&selectedJob=203766661&searchStr=windows%2C2012%2Cpgo%2Cbuild-win32%2Fpgo%2C%28b%29
backout: https://hg.mozilla.org/integration/autoland/rev/ca3b9c38e8e5af2a405353c2eb41f354f5e5f5ba
Flags: needinfo?(mh+mozilla)
Comment 18•6 years ago
|
||
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/76fafdaa9216
Use a 64-bits clang-cl for 32-bits static analysis builds r=dmajor
https://hg.mozilla.org/integration/mozilla-inbound/rev/273e84414434
Remove now unused win32-clang-cl-st-an toolchain r=dmajor
https://hg.mozilla.org/integration/mozilla-inbound/rev/b8da3d4e6da0
Remove now unused win32-rust-1.29 toolchain r=dmajor
Assignee | ||
Updated•6 years ago
|
Flags: needinfo?(mh+mozilla)
Comment 19•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/76fafdaa9216
https://hg.mozilla.org/mozilla-central/rev/273e84414434
https://hg.mozilla.org/mozilla-central/rev/b8da3d4e6da0
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•6 years ago
|
Comment 20•6 years ago
|
||
Backed out 3 changesets (Bug 1414287) for causing Bug 1497029 a=backout
Backout: https://hg.mozilla.org/mozilla-central/rev/f95186d58bfaad221b599e284b57d980ade32468
Status: RESOLVED → REOPENED
status-firefox64:
fixed → ---
Resolution: FIXED → ---
Target Milestone: mozilla64 → ---
Comment 21•6 years ago
|
||
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/ce3b1b7b826f
Use a 64-bits clang-cl for 32-bits static analysis builds r=dmajor
https://hg.mozilla.org/integration/autoland/rev/0a7a9e17c1ea
Remove now unused win32-clang-cl-st-an toolchain r=dmajor
https://hg.mozilla.org/integration/autoland/rev/a5fe00a3b116
Remove now unused win32-rust-1.29 toolchain r=dmajor
Comment 22•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ce3b1b7b826f
https://hg.mozilla.org/mozilla-central/rev/0a7a9e17c1ea
https://hg.mozilla.org/mozilla-central/rev/a5fe00a3b116
Status: REOPENED → RESOLVED
Closed: 6 years ago → 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in
before you can comment on or make changes to this bug.
Description
•