[lldb-dev] Canonicalize armv6l and armv7l to v6 and v7
William Dillon via lldb-dev
lldb-dev at lists.llvm.org
Fri Jan 8 20:58:30 PST 2016
Hi all,
I have a small patch that fixes an issue that prevents use of the Swift REPL on arm-linux. When working with targets that the OS presents as armv7l, for example, there is an inconsistency when the architecture sub-type is parsed. Detecting this condition and removing the ‘l’ fixes it. I’ve tried to make this logic as restrictive in scope and application as possible. It will only trigger on arm hosts in linux.
The theory of operation is that, within llvm, the v6l and v7l subtypes alias to v6 and v7 respectively. Also in llvm, when a triple is created, the original string is preserved until parts of it are mutated. When llvm executes its architecture synonym logic, armv7l (and armv6l once my patch there is merged) is resolved to armv7. By querying the parsed subtype from llvm, this centralized logic is used to sanitize the architecture. The end result is that if the architecture provided to the triple constructor is an alias for the v7 or v6 subtype, it is discarded and replaced with v6 or v7 itself.
My hope is that this code can make it into the Swift 2.2 release, and I’m working with Bob Wison on a related patch to LLVM. I appreciate any and all comments and suggestions.
Thanks!!
- Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lldb.diff
Type: application/octet-stream
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160108/a6b2e2d5/attachment.obj>
More information about the lldb-dev
mailing list