Closed Bug 1562389 Opened 3 months ago Closed 3 months ago

Set correct target and host for clang and rustc when using Windows to build Gecko/Android

Categories

(Firefox Build System :: General: Unsupported Platforms, enhancement)

Unspecified
Windows
enhancement
Not set

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Since host is clang-cl and target is clang, we need set correct target/triple option. But compiler detection for host uses c_compiler (it is for target), it may not set correctly.

When host and target are different compiler type, triple for rustc may be incorrect. If target is clang, host is always clang, not using host compiler type.

Example, when host is clang-cl for windows, and target is clang for Android, host's triple for ructc sets windows-gnu, not windows-msvc.

When building Gecko/Android/aarch64 on Windows, --target parameter may not be incorrect value. Since check_compiler's info is host compiler, aarch64 target is always --target=aarch64-windows-msvc.

Since Android build only supports clang, we should always set --target parameter if building Android version.

Depends on D36421

Attachment #9074954 - Attachment description: Bug 1562389 - Set target parameter when building Android → Bug 1562389 - Better detect non-clang-cl native windows clang
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/68ad44276058
Set correct triple for rustc when host and target are different compiler type. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/7dbb546e6138
Better detect non-clang-cl native windows clang r=glandium

Backed out 2 changesets (Bug 1562389) for causing bustages in ../python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py::WindowsToolchainTest::test_clang_cl CLOSED TREE

https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=254703453

https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=254703453&repo=autoland&lineNumber=40729

Flags: needinfo?(m_kato)
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/41de4f2ef213
Backed out 2 changesets for causing bustages in ../python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py::WindowsToolchainTest::test_clang_cl CLOSED TREE

ah, I need to fix test_toolchain_configure.py since FmeCompiler has no _MT macro.

Flags: needinfo?(m_kato)
Attachment #9074954 - Attachment description: Bug 1562389 - Better detect non-clang-cl native windows clang → Bug 1562389 - Better detect non-clang-cl native windows clang. r=glandium
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/eb3e6a4dde4b
Set correct triple for rustc when host and target are different compiler type. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/c3c853745453
Better detect non-clang-cl native windows clang. r=glandium
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.