This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Avoid depending on objdump
ClosedPublic

Authored by jsji on Nov 1 2021, 12:48 PM.

Details

Reviewers
daltenty
shchenz
Group Reviewers
Restricted Project
Commits
rGf1d32a521e62: [AIX] Avoid depending on objdump
Summary

On AIX, we are currently relying on objdump to detemine the
is_32_bit_windows.

objdump is not installed by default on AIX, it is creating problem to
depend on it, especially just for an always false detection on AIX.

So this patch simply provide a always false function to satify the
detection.

Diff Detail

Event Timeline

jsji requested review of this revision.Nov 1 2021, 12:48 PM
jsji created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2021, 12:48 PM
jsji updated this revision to Diff 383862.Nov 1 2021, 12:49 PM

Remove empty line.

jsji edited the summary of this revision. (Show Details)Nov 1 2021, 1:02 PM
daltenty requested changes to this revision.Nov 1 2021, 4:25 PM
daltenty added inline comments.
llvm/utils/extract_symbols.py
131

Won't this break other platforms? This script could (and probably is) run on Windows with GNU toolchain (i.e. MINGW with GNU nm) and would fall in to this case and get incorrect results

This revision now requires changes to proceed.Nov 1 2021, 4:25 PM
jsji updated this revision to Diff 383944.Nov 1 2021, 7:20 PM

Address comment, support non AIX for nm.

jsji updated this revision to Diff 383946.Nov 1 2021, 7:24 PM

Update

jsji updated this revision to Diff 383947.Nov 1 2021, 7:29 PM

Use correct syntax.

jsji marked an inline comment as done.Nov 1 2021, 7:31 PM
daltenty added inline comments.Nov 1 2021, 8:29 PM
llvm/utils/extract_symbols.py
129–130

This isn't really related to us using nm. Technically someone could target 32-bit windows from AIX using the GNU toolchain, though no one is actually going to do that, so let's clarify what we're doing is working around limitations of the system toolchain.

131
365

maybe let's just provide a default value before the search for AIX, rather than modifying the nm entry

jsji updated this revision to Diff 384166.Nov 2 2021, 11:09 AM

Address comments.

jsji marked 3 inline comments as done.Nov 2 2021, 11:09 AM
daltenty accepted this revision.Nov 2 2021, 11:34 AM

LGTM, thanks!

This revision is now accepted and ready to land.Nov 2 2021, 11:34 AM
This revision was landed with ongoing or failed builds.Nov 2 2021, 12:16 PM
This revision was automatically updated to reflect the committed changes.