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

Initial WasmLinkerTool implementation and supporting cleanup. #4958

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

ScottTodd
Copy link
Member

Progress on #4019. I can generate .wasm files using iree-translate -iree-hal-target-backends=dylib-llvm-aot -iree-llvm-target-triple=wasm32-unknown-unknown -iree-llvm-keep-linker-artifacts and can inspect the .wasm artifacts using wasm-decompile and the other tools from https://github.com/WebAssembly/wabt. I haven't yet been able to actually call a function from a generated .wasm file and inspect its output though, so we could be missing some configuration.

This PR also includes some supporting changes in the other linker tools, mostly playing cross-platform development whack-a-mole until the code is robust enough. As one side effect, I can now use UnixLinkerTool from Windows, by passing -iree-llvm-target-triple=x86_64-linux-gnu, which discovers C:\Program Files\LLVM\bin\ld.lld on my system, from having that bin\ directory on my PATH.

@ScottTodd ScottTodd added platform/windows 🚪 Windows-specific build, execution, benchmarking, and deployment codegen/llvm LLVM code generation compiler backend labels Feb 27, 2021
@ScottTodd ScottTodd requested a review from benvanik February 27, 2021 00:54
@google-cla google-cla bot added the cla: yes label Feb 27, 2021
Copy link
Collaborator

@benvanik benvanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Using the unix linker tool on windows is a good improvement as that's a valid scenario, and if we have our own elf loader then we'd be using elfs for that and could build them on windows. May be worth renaming WindowsLinkerTool to MSVCLinkerTool.

@ScottTodd ScottTodd merged commit 96770d1 into iree-org:main Mar 1, 2021
@ScottTodd ScottTodd deleted the linking-wasm branch March 1, 2021 17:42
@NatashaKnk NatashaKnk mentioned this pull request Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen/llvm LLVM code generation compiler backend platform/windows 🚪 Windows-specific build, execution, benchmarking, and deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants