Closed Bug 1490549 Opened 2 years ago Closed 2 years ago

Make configure choose clang by default on all platforms

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(4 files)

No description provided.
Depends on: 1481721
Now that we ship builds using clang on all platforms, pick it during
configure. It is still possible to opt-in to building other compilers by
setting CC/CXX (or even only CC) to the desired compiler.
Comment on attachment 9008283 [details]
Bug 1490549 - Make configure choose clang by default on all platforms

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9008283 - Flags: review+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/a7c42fbaa18e
Make configure choose clang by default on all platforms r=froydnj
Backed out changeset a7c42fbaa18e (bug 1490549) for build bustage

Log:
https://treeherder.mozilla.org/logviewer.html#?job_id=198987983&repo=autoland&lineNumber=42296

INFO - /builds/worker/workspace/build/src/python/mozbuild/mozbuild/test/configure/lint.py
[task 2018-09-13T02:20:49.432Z] 02:20:49     INFO - ============================= test session starts ==============================
[task 2018-09-13T02:20:49.433Z] 02:20:49     INFO - platform linux2 -- Python 2.7.9, pytest-3.6.2, py-1.5.4, pluggy-0.6.0 -- /builds/worker/workspace/build/src/obj-firefox/_virtualenvs/src-UL-dti-o-2.7/bin/python
[task 2018-09-13T02:20:49.434Z] 02:20:49     INFO - rootdir: /builds/worker/workspace/build/src, inifile: /builds/worker/workspace/build/src/config/mozunit/mozunit/pytest.ini
[task 2018-09-13T02:20:49.435Z] 02:20:49     INFO - collecting ... collected 6 items
[task 2018-09-13T02:20:49.436Z] 02:20:49  WARNING - ../python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_browser TEST-UNEXPECTED-FAIL
[task 2018-09-13T02:20:49.437Z] 02:20:49  WARNING - ../python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_embedding_ios TEST-UNEXPECTED-FAIL
[task 2018-09-13T02:20:49.445Z] 02:20:49  WARNING - ../python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_extensions TEST-UNEXPECTED-FAIL
[task 2018-09-13T02:20:49.446Z] 02:20:49  WARNING - ../python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_js TEST-UNEXPECTED-FAIL
[task 2018-09-13T02:20:49.447Z] 02:20:49  WARNING - ../python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_memory TEST-UNEXPECTED-FAIL
[task 2018-09-13T02:20:49.448Z] 02:20:49  WARNING - ../python/mozbuild/mozbuild/test/configure/lint.py::Lint::test_mobile_android TEST-UNEXPECTED-FAIL
[task 2018-09-13T02:20:49.456Z] 02:20:49     INFO - =================================== FAILURES ===================================
[task 2018-09-13T02:20:49.456Z] 02:20:49     INFO - ______________________________ Lint.test_browser _______________________________
[task 2018-09-13T02:20:49.457Z] 02:20:49     INFO - self = <lint.Lint testMethod=test_browser>

Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=a7c42fbaa18e447e70e835f5dff17f73dfb891d4

Backout:
https://hg.mozilla.org/integration/autoland/rev/4c7e307b75fa7aec17dd2c5fc09104b9196d4480
Flags: needinfo?(mh+mozilla)
The test failures actually raise something interesting:
When GCC was the default, setting CC=clang switched HOST_CC too if not given, which makes sense and matches what I originally intended.

However, with clang as the default, setting CC=gcc doesn't switch HOST_CC, which is weird. I have to investigate this further.
Flags: needinfo?(mh+mozilla)
While those builds are not fully supported yet, it's better to ensure
the coming changes to toolchain.configure won't break them.
Before this change, we'd derive a host compiler and handle things as if
HOST_CC/HOST_CXX had been passed. With this change, we change the list
of compilers that are tested with check_prog instead.

Depends on D5828
Comment on attachment 9008283 [details]
Bug 1490549 - Make configure choose clang by default on all platforms

Nathan Froyd [:froydnj] has been removed from the revision.
Attachment #9008283 - Flags: review+
Comment on attachment 9008969 [details]
Bug 1490549 - Add some Windows-cross toolchain configure tests

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9008969 - Flags: review+
Comment on attachment 9008970 [details]
Bug 1490549 - Change how host compilers are found

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9008970 - Flags: review+
Comment on attachment 9008283 [details]
Bug 1490549 - Make configure choose clang by default on all platforms

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9008283 - Flags: review+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/16416957bb5a
Add some Windows-cross toolchain configure tests r=froydnj
https://hg.mozilla.org/integration/autoland/rev/394ff9e067c8
Change how host compilers are found r=froydnj
https://hg.mozilla.org/integration/autoland/rev/e545bb3cfcca
Make configure choose clang by default on all platforms r=froydnj
Dammit, I missed the comments in phabricator.
Comment on attachment 9009285 [details]
Bug 1490549 - Fix some comments

Nathan Froyd [:froydnj] has approved the revision.
Attachment #9009285 - Flags: review+
You need to log in before you can comment on or make changes to this bug.