Sign inSign up

openeulertest/llvm

By openeulertest

Updated 2 months ago

Image
0

1.1K

openeulertest/llvm repository overview

Quick reference

LLVM | openEuler

Current LLVM docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

LLVM is a general-purpose compiler infrastructure that provides a modular and reusable backend for building modern compilers.

Learn more about LLVM on LLVM Website⁠.

The tag of each llvm docker image is consist of the version of llvm and the version of basic image. The details are as follows

TagCurrentlyArchitectures
20.1.6-oe2403sp1LLVM 20.1.6 on openEuler 24.03-LTS-SP1amd64, arm64

Usage

In this usage, users can select the corresponding {Tag} based on their requirements.

  • Pull the openeuler/llvm image from docker

    docker pull openeuler/llvm:{Tag}
    
  • Run with an interactive shell

    You can start the container with an interactive shell to run your own code using llvm.

    docker run -it --rm openeuler/llvm:{Tag} bash
    

    The openeuler/llvm image is used to verify the integration between the upstream LLVM version and openEuler.

  • Create simple C source file

    cat > /tmp/hello.c <<EOF
    #include <stdio.h>
    void hello() {
      printf("Hello from Clang!\\n");
    }
    EOF
    
  • Compile to object file (.o):

    Use clang to compile but not link:

    /usr/local/llvm/bin/clang -c /tmp/hello.c -o /tmp/hello.o
    

    The -c flag tells clang to stop after producing the object file.

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

Tag summary

Content type

Image

Digest

sha256:3ab5096ec

Size

3 GB

Last updated

2 months ago

docker pull openeulertest/llvm:21.1.5-oe2403sp4-aarch64