All Projects → qbicc → qbicc

qbicc / qbicc

Licence: Unknown, GPL-2.0 licenses found Licenses found Unknown LICENSE.txt GPL-2.0 COPYING.txt
Experimental static compiler for Java programs.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to qbicc

codebrowser
Woboq CodeBrowser
Stars: ✭ 985 (+734.75%)
Mutual labels:  llvm
expressi
Expression-oriented toy programming language written in Rust
Stars: ✭ 17 (-85.59%)
Mutual labels:  llvm
neo-c
Yet another modern compiler. It is also C compiler. Using LLVM wih boehmGC
Stars: ✭ 72 (-38.98%)
Mutual labels:  llvm
vicis
Manipulate LLVM-IR in Pure Rust
Stars: ✭ 194 (+64.41%)
Mutual labels:  llvm
SCAF
A Speculation-Aware Collaborative Dependence Analysis Framework
Stars: ✭ 25 (-78.81%)
Mutual labels:  llvm
suicide
LLVM pass that detects one undefined behavior, and emits code to delete your hard drive
Stars: ✭ 33 (-72.03%)
Mutual labels:  llvm
Dr checker
DR.CHECKER : A Soundy Vulnerability Detection Tool for Linux Kernel Drivers
Stars: ✭ 251 (+112.71%)
Mutual labels:  llvm
nocc
A LLVM based self-hosting C compiler
Stars: ✭ 22 (-81.36%)
Mutual labels:  llvm
Lesma
The Lesma Programming Language
Stars: ✭ 14 (-88.14%)
Mutual labels:  llvm
holy-lambda
The extraordinary simple, performant, and extensible custom AWS Lambda runtime for Clojure.
Stars: ✭ 318 (+169.49%)
Mutual labels:  native-image
Kernel-Compile-Script
This is a collection of scripts aimed at streamlining the process of kernel compilation for improved efficiency and effectiveness.
Stars: ✭ 20 (-83.05%)
Mutual labels:  llvm
EffectiveSan
Runtime type and bounds-error checking for C/C++
Stars: ✭ 95 (-19.49%)
Mutual labels:  llvm
FastLua
Lua trace JIT compiler using LLVM-C
Stars: ✭ 22 (-81.36%)
Mutual labels:  llvm
sbt-instrumentation
Configurable instrumentation of LLVM bitcode
Stars: ✭ 31 (-73.73%)
Mutual labels:  llvm
linux
Linux kernel source tree
Stars: ✭ 234 (+98.31%)
Mutual labels:  llvm
docker-java-centos
This is docker images of CentOS 7 with different versions of java
Stars: ✭ 50 (-57.63%)
Mutual labels:  openjdk
NatsuLang
No description or website provided.
Stars: ✭ 96 (-18.64%)
Mutual labels:  llvm
nballerina-cpp
Ballerina compiler backend that generates platform-specific executables.
Stars: ✭ 16 (-86.44%)
Mutual labels:  llvm
clangbuilder
Building Clang ♡ Utility and Environment
Stars: ✭ 101 (-14.41%)
Mutual labels:  llvm
TON-Compiler
Clang compiler for Free TON Virtual Machine
Stars: ✭ 56 (-52.54%)
Mutual labels:  llvm

qbicc

This is the README for qbicc. There’s not much here yet but be sure to read the overview.

Our Zulip chat is a great place to ask questions and get started.

Building

To quickly build the project, execute mvn install -DskipTests in the root. This will build qbicc using the latest pre-built release of the qbicc-class-library. Adding -DskipTests avoids running the integration tests, which take about 15 minutes.

Class Library

Qbicc uses a customized version of the OpenJDK libraries: qbicc-class-library. The class libraries are released as a maven artifact, but if you are developing qbicc you will eventually want to build your own local version.

Note: You must clone the qbicc-class-library repository on a case-sensitive file system. If you are on macOS, please follow the instructions for creating a case-sensitive file system on macOS before executing the commands below.

git clone --recurse-submodules [email protected]:qbicc/qbicc-class-library.git
cd qbicc-class-library
mvn install

Running with Maven

Add the following XML to the plugins element of your Maven build to automatically produce a qbicc-built native image:

<plugin>
    <groupId>org.qbicc</groupId>
    <artifactId>qbicc-maven-plugin</artifactId>
    <version>${qbicc.version}</version>
    <executions>
        <execution>
            <id>qbicc-compile</id>
            <goals>
                <goal>compile</goal>
            </goals>
            <configuration>
                <!-- replace this with your main class name -->
                <mainClass>hello.world.Main</mainClass>
            </configuration>
        </execution>
    </executions>
</plugin>

Be sure to configure the qbicc.version property in your POM to correspond to the current version of qbicc.

Running with jbang

To run the driver, first build the project and then use jbang to run it:

jbang --quiet org.qbicc:qbicc-main:0.65.0 --app-path-file /path/to/main.jar --output-path /tmp/output hello/world/Main

For a step-by-step example, see examples/helloworld/hello/world/Main.java

Running with a locally built Class Library

After building the class library, you can get qbicc to use it simply by adding the command line argument --rt-version=17.alpha.0.NNN-SNAPSHOT (where NNN matches your local class lib version) to your qbicc invocation. For example,

jbang --quiet org.qbicc:qbicc-main:0.65.0 --app-path-file /path/to/main.jar --output-path /tmp/output --rt-version=17.alpha.0.NNN-SNAPSHOT hello/world/Main

JBang cache

When plugins are added or removed, the jbang cache may become inconsistent and result in build errors. If that happens, add the --fresh option to the above command line. Eg: jbang --fresh …​ Alternatively, clear the entire cache using:

jbang cache clear

Requirements

Please ensure the follow are installed and available on your path:

  • LLVM 13+ (we test against 13, 14, and 15)

  • JDK 17

  • Maven 3.6.1+

MacOS

You can install LLVM, Java and Maven using brew. In addition, you will also need to install XCode (to get Apple’s version of clang). Do not attempt to override XCode’s clang with the one that brew installed` (brew will not put its llvm toolchain into your path by default). Instead use symlinks to add just the brew installed llc, llvm-objcopy, and opt executables to your path.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].