Closed
Bug 1439767
Opened 7 years ago
Closed 7 years ago
configure should look in ~/.mozbuild/clang/bin for clang-cl and friends
Categories
(Firefox Build System :: General, enhancement)
Firefox Build System
General
Tracking
(firefox60 fixed)
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: away, Assigned: froydnj)
Details
Attachments
(1 file)
1.46 KB,
patch
|
nalexander
:
review+
away
:
feedback+
|
Details | Diff | Splinter Review |
In bug 1428349 comment 9, ted wrote:
> dmajor and I discussed briefly on IRC, but as an additional nicety we could fix
> configure to look in ~/.mozbuild/clang/bin when looking for compilers, so that
> developers could simply add `CC=clang-cl CXX=clang-cl` to their mozconfigs and
> have it Just Work with the toolchain that `mach bootstrap` installs.
(I assume this would also cover lld-link.exe?)
Ted, are you able to take on this work?
Flags: needinfo?(ted)
Comment 1•7 years ago
|
||
For lld-link, you'd have to set LINKER too. Which I think is reasonable.
(In reply to Mike Hommey [:glandium] from comment #1)
> For lld-link, you'd have to set LINKER too. Which I think is reasonable.
Yes, of course. What I meant was, if you set LINKER, then we should look for it in ~/.mozbuild.
Comment 3•7 years ago
|
||
I'm probably not going to get around to this, but I don't think it ought to be a lot of work.
It's also just a "nice to have" to make it easier for people to use clang-cl. It should be already possible for people to simply set:
CC=~/.mozbuild/clang/bin/clang-cl.exe
CXX=~/.mozbuild/clang/bin/clang-cl.exe
in their mozconfigs.
Flags: needinfo?(ted)
![]() |
Assignee | |
Comment 4•7 years ago
|
||
Doing this means compiling with clang-cl is just `export CC=clang-cl` in
somebody's mozconfig, rather than something more elaborate.
This is untested at the moment; David, would you test this out?
Attachment #8954397 -
Flags: review?(core-build-config-reviews)
Attachment #8954397 -
Flags: feedback?(dmajor)
Comment on attachment 8954397 [details] [diff] [review]
add .mozbuild clang path to the toolchain search path on Windows
Works great, thank you!
I removed my PATH hacks from start-shell.bat, confirmed I could no longer find clang-cl nor lld-link, applied the patch, and found them both.
Attachment #8954397 -
Flags: feedback?(dmajor) → feedback+
![]() |
Assignee | |
Comment 6•7 years ago
|
||
(In reply to David Major [:dmajor] from comment #5)
> Works great, thank you!
>
> I removed my PATH hacks from start-shell.bat, confirmed I could no longer
> find clang-cl nor lld-link, applied the patch, and found them both.
\o/
Comment 7•7 years ago
|
||
Comment on attachment 8954397 [details] [diff] [review]
add .mozbuild clang path to the toolchain search path on Windows
Review of attachment 8954397 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm.
I wonder if we could be more systematic. What if we added $MOZ_STATE_PATH/$PROG and $MOZ_STATE_PATH/$PROG/bin to the search path for every moz.configure `check_path` (https://searchfox.org/mozilla-central/source/build/moz.configure/checks.configure#101)? Maybe we could make this work more generally.
Attachment #8954397 -
Flags: review?(core-build-config-reviews) → review+
![]() |
Assignee | |
Comment 8•7 years ago
|
||
(In reply to Nick Alexander :nalexander from comment #7)
> I wonder if we could be more systematic. What if we added
> $MOZ_STATE_PATH/$PROG and $MOZ_STATE_PATH/$PROG/bin to the search path for
> every moz.configure `check_path`
> (https://searchfox.org/mozilla-central/source/build/moz.configure/checks.
> configure#101)? Maybe we could make this work more generally.
I like this idea. Offhand, we'd have to teach this mechanism that `clang-cl`, `lld-link` (or just `lld`?), and `llvm-config` need to be looked up in the PROG=clang directory.
We already have this mozbuild_state_path dance in (at least!) two places, so it'd be nice to avoid introducing any more!
Comment 9•7 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #8)
> (In reply to Nick Alexander :nalexander from comment #7)
> > I wonder if we could be more systematic. What if we added
> > $MOZ_STATE_PATH/$PROG and $MOZ_STATE_PATH/$PROG/bin to the search path for
> > every moz.configure `check_path`
> > (https://searchfox.org/mozilla-central/source/build/moz.configure/checks.
> > configure#101)? Maybe we could make this work more generally.
>
> I like this idea. Offhand, we'd have to teach this mechanism that
> `clang-cl`, `lld-link` (or just `lld`?), and `llvm-config` need to be looked
> up in the PROG=clang directory.
I was a little worried about that. Follow-up, for sure.
To me, it's connected to $topsrcdir/{clang,android-sdk,etc...} in the source directory, so we should try to address them together. Maybe.
> We already have this mozbuild_state_path dance in (at least!) two places, so
> it'd be nice to avoid introducing any more!
Indeed.
![]() |
Assignee | |
Updated•7 years ago
|
Assignee: nobody → nfroyd
Comment 10•7 years ago
|
||
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/94094c6e6f87
add .mozbuild clang path to the toolchain search path on Windows; r=nalexander
![]() |
||
Comment 11•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•