check_vanilla_allocations.py cannot handle an LTO build

RESOLVED FIXED in Firefox 62

Status

enhancement
RESOLVED FIXED
Last year
7 months ago

People

(Reporter: tjr, Assigned: tjr)

Tracking

3 Branch
mozilla62
Dependency tree / graph

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(1 attachment)

When building with Clang LTO, check_vanilla_allocations.py runs 'nm' on libjs_static.a, which fails, because nm cannot read that object file. We need to use the NM environment variable (which will point to llvm-nm)
Comment on attachment 8971664 [details]
Bug 1457483 Retrieve nm from environment for check_vanilla_allocations.py

https://reviewboard.mozilla.org/r/240430/#review246616

::: config/check_vanilla_allocations.py:80
(Diff revision 2)
>  
>      # Run |nm|.  Options:
>      # -u: show only undefined symbols
>      # -C: demangle symbol names
>      # -A: show an object filename for each undefined symbol
> -    cmd = ['nm', '-u', '-C', '-A', args.file]
> +    nm = buildconfig.substs.get('NM') or 'nm'

.get('NM', 'nm')
Attachment #8971664 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/23b5cf2c6824
Retrieve nm from environment for check_vanilla_allocations.py r=glandium
Keywords: checkin-needed
Backed out for build bustages OSError: [Errno 13] Permission denied/ make[2]: *** [check-vanilla-allocations] Error 1

Push that started the failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=23b5cf2c6824961ffb77a4a1f9d5d0888d678281

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=178771924&repo=autoland&lineNumber=38705

Backout: https://hg.mozilla.org/integration/autoland/rev/71f9465fb8544b37a447efedf4cd8a220ee9b130
Flags: needinfo?(tom)
So " .get('NM', 'nm') " causes a build bust because NM is present and blank. I've changed it back to the prior version, which was " nm = buildconfig.substs.get('NM') or 'nm' "
Flags: needinfo?(tom) → needinfo?(mh+mozilla)
fair enough.
Flags: needinfo?(mh+mozilla)
Keywords: checkin-needed
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4a56903882a
Retrieve nm from environment for check_vanilla_allocations.py r=glandium
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f4a56903882a
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.