Closed Bug 1483835 Opened 6 years ago Closed 6 years ago

Local Windows builds should use clang-cl by default

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: emk, Assigned: away)

References

(Depends on 2 open bugs)

Details

Attachments

(1 file)

Because it is the compiler that we will use to ship Windows binaries and it is Tier-1.
(In reply to Masatoshi Kimura [:emk] from comment #0)
> Because it is the compiler that we will use to ship Windows binaries and it
> is Tier-1.

Is that actually settled yet?
Blocks: 1483820
How do you drive the clang-cl debugger, if any exists?
https://www.google.com.au/search?q=clang-cl+debugger doesn't yield anything useful at first glance.
(In reply to Jorg K (GMT+2) from comment #2)
> How do you drive the clang-cl debugger, if any exists?
> https://www.google.com.au/search?q=clang-cl+debugger doesn't yield anything
> useful at first glance.

You can use your existing favorite debugger with the binaries produced by clang-cl.
(In reply to Mike Hommey [:glandium] from comment #1)
> (In reply to Masatoshi Kimura [:emk] from comment #0)
> > Because it is the compiler that we will use to ship Windows binaries and it
> > is Tier-1.
> 
> Is that actually settled yet?

At this point all signs are pointing to clang-cl being our primary compiler moving forward. While it's not 100% clear that 63 will be its release train, the transition is now a matter of "when" and not "if". At worst we may revert to MSVC for one more cycle in case something horrible happens with an AV or something on beta, but that wouldn't affect developers builds anyway. So I think we're ready to make this change.
Assignee: nobody → dmajor
Attachment #9001767 - Flags: review?(mh+mozilla)
(In reply to David Major [:dmajor] from comment #3)
> You can use your existing favorite debugger with the binaries produced by
> clang-cl.
OK, I applied your patch and the build time came down from ~32 min to ~24 min with the machine working a lot harder and getting hotter. The MSVS debugger appears to be working as before. Just out of interest: Which other debuggers are there on Windows (apart from WinDbg)? If we're not using VS to compile, perhaps we can save the effort installing it and using some other light-weight debugger instead.

Having the same debugger locally as in automation certainly has advantages, especially since VS C++ is pretty lenient and clang-cl is pretty strict, so the surprise comes after the push :-(
(In reply to Jorg K (GMT+2) from comment #6)
> Just out of interest: Which other debuggers are there on Windows (apart from WinDbg)?

I'm pretty sure that only the VS debugger and WinDbg are in use at Mozilla.

> If we're not using VS to compile, perhaps we can save the effort installing it and using some other
> light-weight debugger instead.

We still depend on a VS installation for its headers, libraries, and some auxiliary build tools. (At some point we'll need to overcome this in order to cross-compile from Linux, but that's a longer-term future.)

> Having the same debugger locally as in automation certainly has advantages,
> especially since VS C++ is pretty lenient and clang-cl is pretty strict, so
> the surprise comes after the push :-(

Not sure I understand... automation doesn't use a debugger. Did you mean compiler?
Sorry, yes: Having the same *compiler* locally ...
Comment on attachment 9001767 [details] [diff] [review]
Default to clang-cl and lld-link

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

::: build/moz.configure/windows.configure
@@ +458,5 @@
>  
>  set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
>  
>  
> +link = check_prog('LINKER', ('lld-link.exe','link.exe'),

space after comma.
Attachment #9001767 - Flags: review?(mh+mozilla) → review+
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1b533762e9cb
Default to clang-cl and lld-link in local Windows builds. r=glandium
Flags: needinfo?(dmajor)
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/577ffed9f102
Default to clang-cl and lld-link in local Windows builds. r=glandium
https://hg.mozilla.org/mozilla-central/rev/577ffed9f102
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1490743
Depends on: 1491241
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: