Git Product home page Git Product logo

org.freedesktop.sdk.extension.llvm14's Introduction

SDK Extension for LLVM Project 14

This extension contains various components of the LLVM Project (version 14.x).

Among provided tools there are LLVM Core libraries, Clang, Clang Extra Tools, LLDB and LLD.

Usage

Build

In order to build your app with tools provided with this extension you have to set following variables in app manifest:

"sdk-extensions" : [ "org.freedesktop.Sdk.Extension.llvm14" ],
...
"build-options":{
    "append-path": "/usr/lib/sdk/llvm14/bin",
    "prepend-ld-library-path": "/usr/lib/sdk/llvm14/lib"
    }

Example:

{
  "id" : "org.example.MyApp",
  "runtime" : "org.freedesktop.Platform",
  "runtime-version" : "21.08",
  "sdk" : "org.freedesktop.Sdk",
  "sdk-extensions" : [ "org.freedesktop.Sdk.Extension.llvm14" ],
  "modules" : [
  {
    "name" : "Myapp",
    "build-options":{
    "append-path": "/usr/lib/sdk/llvm14/bin",
    "prepend-ld-library-path": "/usr/lib/sdk/llvm14/lib"
  }
 ]
}

Troubleshooting:

It's possible that your app will additionally need some special variable(s) beside the above. Please consult your app documentation or source files like CMakeLists.txt to confirm that.

If your app dynamically links to any shared library provided by this extension then you need to copy that library in /app/lib directory during the build, i.e:

cp /usr/lib/sdk/llvm14/lib/libLLVM-14.so /app/lib/

Debugging/Development

In order to use this extension in flatpak SDK environment you may add all provided tools in your PATH by executing first:

source /usr/lib/sdk/llvm14/enable.sh

org.freedesktop.sdk.extension.llvm14's People

Contributors

abderrahim avatar erick555 avatar flathubbot avatar gasinvein avatar istori1 avatar lctrs avatar refi64 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

alatiera istori1

org.freedesktop.sdk.extension.llvm14's Issues

OpenMP support

Hello, I'm trying to create a build for a project (https://github.com/hanatos/vkdt) that requires llvm and OpenMP.
Unfortunately, it does not seem the llvm extension includes the libomp build, and trying to build it as part of my flatpak build leads to errors in LLVMExports.cmake that is part of this SDK.

What should be the best approach ? Trying to build libomp as a standalone project or include the build as part of this SDK (I would then work on a PR to do so)

Here is what I tried:

 - name: libomp
    sources:
      - type: archive
        url: https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.6/openmp-14.0.6.src.tar.xz
        sha256: 4f731ff202add030d9d68d4c6daabd91d3aeed9812e6a5b4968815cfdff0eb1f
    buildsystem: cmake
    config-opts:
      - -DCMAKE_BUILD_TYPE=Release
      - -DOPENMP_STANDALONE_BUILD=true
      - -DCLANG_LINK_CLANG_DYLIB:BOOL=ON
      - -DLLVM_DIR=/usr/lib/sdk/llvm14/lib/cmake/llvm
      - -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON
      - -DLLVM_ENABLE_LLD:BOOL=ON
    build-options:
      prepend-path: "/usr/lib/sdk/llvm14/bin"
      prepend-ld-library-path: "/usr/lib/sdk/llvm14/lib"
      env:
        CC: clang
        CXX: clang++

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.