Closed Bug 1902211 Opened 4 months ago Closed 4 months ago

lld-link: warning: ignoring unknown argument ...

Categories

(Firefox Build System :: General, task)

task

Tracking

(firefox129 fixed)

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

[task 2024-06-13T01:39:35.856Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-ID:/task_171824023203011/fetches/clang/include'
[task 2024-06-13T01:39:35.857Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-Xclang'
[task 2024-06-13T01:39:35.857Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-std=c++17'
[task 2024-06-13T01:39:35.857Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-EHs-c-'
[task 2024-06-13T01:39:35.857Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-GR-'
[task 2024-06-13T01:39:35.858Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_CRT_SECURE_NO_DEPRECATE'
[task 2024-06-13T01:39:35.858Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_CRT_SECURE_NO_WARNINGS'
[task 2024-06-13T01:39:35.858Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_CRT_NONSTDC_NO_DEPRECATE'
[task 2024-06-13T01:39:35.858Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_CRT_NONSTDC_NO_WARNINGS'
[task 2024-06-13T01:39:35.858Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_SCL_SECURE_NO_DEPRECATE'
[task 2024-06-13T01:39:35.859Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_SCL_SECURE_NO_WARNINGS'
[task 2024-06-13T01:39:35.859Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-DUNICODE'
[task 2024-06-13T01:39:35.859Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D_UNICODE'
[task 2024-06-13T01:39:35.859Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D__STDC_CONSTANT_MACROS'
[task 2024-06-13T01:39:35.860Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D__STDC_FORMAT_MACROS'
[task 2024-06-13T01:39:35.860Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-D__STDC_LIMIT_MACROS'
[task 2024-06-13T01:39:35.860Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-GR-'
[task 2024-06-13T01:39:35.860Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-EHsc'
[task 2024-06-13T01:39:35.860Z] 01:39:35     INFO -  lld-link: warning: ignoring unknown argument '-O2'

On clang-cl builds, the compiler and the linker are two completely different
things. The linker thankfully ignores the flags it doesn't know but
it's not optimal that it has to complain about them.

The historical reason we add compiler flags to linker flags is that some
flags, mostly related to optimization, such as -flto or --profile-generate,
need to be applied to both. This generally keeps being true for builds
using clang or GCC, although ideally we'd set things separately.

Anyways, generally speaking, we don't expect such flags to be necessary
for host linking, so let's start by cleaning up those. This does affect
all builds, but shouldn't matter.

It is worth noting that commands to link target things on clang-cl
builds actually use a different set of flags, so the linker doesn't end
up complaining about unknown arguments there.

Blocks: 1902214
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/343410c864fe Don't add compiler flags to host linker flags. r=firefox-build-system-reviewers,sergesanspaille
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: