Skip to content

Initial WasmLinkerTool implementation and supporting cleanup. - #4958

Merged
ScottTodd merged 3 commits into
iree-org:mainfrom
ScottTodd:linking-wasm
Mar 1, 2021
Merged

ScottTodd merged 3 commits into
iree-org:mainfrom
ScottTodd:linking-wasm

Conversation

@ScottTodd

Copy link
Copy Markdown
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

@benvanik benvanik left a comment •

Copy link
Copy Markdown
Collaborator

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