Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm-nm #10

Open
ElvishJerricco opened this issue Nov 19, 2017 · 1 comment
Open

llvm-nm #10

ElvishJerricco opened this issue Nov 19, 2017 · 1 comment

Comments

@ElvishJerricco
Copy link
Member

GHC uses nm to find the sizes of some things when building, but llvm-nm doesn't quite work for WebAssembly (or -flto for that matter). They tried fixing it once, but llvm-nm now shows the offset information, not the size information as expected.

We currently have a hacky fix that uses -flto to trick GHC into producing LLVM bitcode, which we then llvm-dis to get the necessary information out of. I find it rather amusing that this works, but it's obviously a terrible solution.

We have a ticket in with LLVM:
https://bugs.llvm.org/show_bug.cgi?id=34392

@dfordivam
Copy link
Member

This has been fixed in LLVM (see https://reviews.llvm.org/rL312294). So the hack should be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants