LLVMSharp | LLVM bindings for .NET Standard | Compiler library
kandi X-RAY | LLVMSharp Summary
kandi X-RAY | LLVMSharp Summary
LLVMSharp is a multi-platform .NET Standard library for accessing the LLVM infrastructure. The bindings are auto-generated using ClangSharp parsing LLVM-C header files. LLVMSharp NuGet Package for .NET Core 2.0+ (Linux, macOS, Windows) and .NET Framework 4+ - each version is built from the corresponding LLVM Release.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of LLVMSharp
LLVMSharp Key Features
LLVMSharp Examples and Code Snippets
Community Discussions
Trending Discussions on LLVMSharp
QUESTION
Fixed: I set the DLL storage class of the function I was importing to dllimport
, and that allowed wasm-ld to emit the correct import namespace.
I am building a compiler with the LLVMSharp* library, and it emits LLVM .bc module files targeted to wasm32-unknown-unknown
. I am trying to import functions into it from the WASI interface by tagging those function values with the { "wasm-import-module"="wasi_unstable" }
attribute. (This should be equivalent to what clang does with __attribute__((import_module()))
; see here). However, when I pass the resulting .bc files to wasm-ld (the Windows 64-bit 9.0.0 installed version), the resulting .wasm module still imports those functions from "env"
, which doesn't work.
Is there some option to pass to wasm-ld to get it to handle wasm-import-module
correctly, or do I need to go another route?
*Specifically, I'm using LLVMSharp 5.0.0, which is the latest stable version. It's possible that LLVMSharp 8.0.0 may support building .wasm modules, but there isn't a release NuGet for it, and the beta NuGet has some problems that prevent me from upgrading. That's why I'm going the wasm-ld route.
...ANSWER
Answered 2020-Feb-06 at 16:46wasm-ld should support this attribute. The first thing to check is your object file.
You can use llvm-readobj --syms
to dump the symbols in your object file. You should see ImportModule: foo
on your symbol where foo
is the module name you specified in your attribute.
I looks like the support for this landed in wasm-ld in: https://reviews.llvm.org/D45796
I believe this change landed just before llvm 8.0, so you will llvm 8.0 or above.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LLVMSharp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page