Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4615598
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:51:46+00:00 2026-05-22T01:51:46+00:00

I’m evaluating different possibilities for a custom VM, and I left out LLVM from

  • 0

I’m evaluating different possibilities for a custom VM, and I left out LLVM from another question. Since I’m still working on the evaluation of embedded language VMs I can’t test/check this myself for now. I would like to know the following information about LLVM/CLANG:

  • Is it supported well on Windows? Or Solaris? (cross-platform is a plus for me)
  • If I want to write my own/custom VM with a C-like language, what would I need to include in the project? (LLVM/CLANG sections or components, etc)
  • I would keep the compiler separate from the VM for obvious reasons (not writing an interpreter). What would be the size of the required components? Could I build them ‘in’ the program instead of dynamically linking to them?
  • Can I avoid JIT? I would like to have a bytecode VM which does not necessarily translate to native code. This would help when JIT is not supported on the platform (ex. systems with restrictive memory permissions that do not allow wx/rwx memory mappings).

I know the clamav antivirus for instance uses bytecode backed by LLVM/clang to support dynamic/runtime signatures. However I do not know if there is an existent facility to implement this and/or tutorials or documentation which guides you through the process of implementing such a thing.

Thanks! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:51:47+00:00Added an answer on May 22, 2026 at 1:51 am

    Clang is a parser for C-like languages including C++. If your language is C-like enough (ie., Java is not) then you could add support for your language to clang, which knows how to produce LLVM IR.

    LLVM does not require JIT, and is normally statically linked. LLVM provides libraries that perform optimization and code generation of LLVM IR. To JIT is just to generate code to memory instead of on disk. The ordinary usage of Clang+LLVM is as a drop-in replacement for GCC, generating code to .o files.

    How big it will be depends on what you need. Do you want all the optimizations? Do you want all the targets (unlike GCC, LLVM is can be built with as many backends in one binary as you want). Since you mentioned embedded, one example is Android using LLVM on cell phones: http://android-developers.blogspot.com/2011/02/introducing-renderscript.html

    Windows is supported rather well, you can build LLVM with MSVC++ using our CMake build system, or mingw32. Solaris support is more iffy, we periodically used to get patches to fix it up, but I haven’t seen any for a while.

    Finally, you may want to read the tutorial at http://llvm.org/docs/tutorial . This chronicles the construction of a JITted REPL language, but the basis is the same for a statically compiled language. Instead of using an llvm::JIT object, you call Target.addPassesToEmitFile and hand it the output stream to write to. See llvm/tools/llc/llc.cpp for a fully worked example (it’s lengthy; only a small fraction of that is needed if you don’t want to support all the options that llc does).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.