This extension contains various components of the LLVM Project (version 11.x).
Among provided tools there are LLVM Core libraries, Clang, Clang Extra Tools, LLDB and LLD.
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.llvm11" ],
...
"build-options":{
"prepend-path": "/usr/lib/sdk/llvm11/bin",
"prepend-ld-library-path": "/usr/lib/sdk/llvm11/lib"
}
Example:
{
"id" : "org.example.MyApp",
"runtime" : "org.freedesktop.Platform",
"runtime-version" : "20.08",
"sdk" : "org.freedesktop.Sdk",
"sdk-extensions" : [ "org.freedesktop.Sdk.Extension.llvm11" ],
"modules" : [
{
"name" : "Myapp",
"build-options":{
"prepend-path": "/usr/lib/sdk/llvm11/bin",
"prepend-ld-library-path": "/usr/lib/sdk/llvm11/lib"
},
]
}
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/llvm11/lib/libLLVM-11.so /app/lib/
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/llvm11/enable.sh