summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/clang/clang_git.bb
Commit message (Collapse)AuthorAgeFilesLines
...
* clang: Pass PYTHON_EXECUTABLE to stage2Khem Raj2019-08-261-1/+1
| | | | | | This should fix issues where its looking for python in users build host Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Pass LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN to stage2 as wellKhem Raj2019-08-151-0/+1
| | | | | | | | | | | Fixes CMake Error at cmake/modules/CheckCompilerVersion.cmake:105 (message): libstdc++ version should be at least 5.1 because LLVM will soon use new C++ features which your toolchain version doesn't support. You can temporarily opt out using LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN, but very soon your toolchain won't be supported. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Update clang_git.bbdburnsii2019-08-151-0/+1
|
* clang: Inherit python3native.Piotr Tworek2019-08-131-1/+1
| | | | | | | | | | | | | | | | | Without this for some reason lldb configure process manages to mix host system provided python3 interpreter with libpython provided in recipe-sysroot-native. As result the build fails with the following error message: | -- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.5") ... | -- Found PythonLibs: /mnt/storage/build-purple/tmp-musl/work/x86_64-linux/clang-native/9.0.0-r0/recipe-sysroot-native/usr/lib/libpython3.7m.so (found version "3.7.4") | CMake Error at /mnt/storage/build-purple/tmp-musl/work-shared/llvm-project-source-9.0.0-r0/git/lldb/cmake/modules/LLDBConfig.cmake:204 (message): | Found incompatible Python interpreter (3.6.5) and Python libraries (3.7.4) | Call Stack (most recent call first): | /mnt/storage/build-purple/tmp-musl/work-shared/llvm-project-source-9.0.0-r0/git/lldb/CMakeLists.txt:20 (include) Signed-off-by: Piotr Tworek <tworaz@tworaz.net>
* clang: Build lldb as part of clang unified packageKhem Raj2019-08-121-15/+15
| | | | | | | | | | | | | This helps in building lldb which now needs build tree of llvm/clang to build itself (lldb-tblgen needs the build tree) Promote RISCV to first class citizen Package additional files and depend on libedit for lldb put python lldb files into own package Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Upgrade to 9.x-rcXKhem Raj2019-08-121-0/+1
| | | | | | | dont package six.py, its provided by python3-six package default to lp64d ABI and rv64gc ISA. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* use native-clang compiler when building nativesdk-clangDaniel Dittmann2019-08-041-0/+2
| | | | | | | | | Some cmake based steps when building clang uses BUILD_CC, BUILD_CXX variables, which points to gcc even if TOOLCHAIN_class-nativesdk = "clang". This patch sets it to clang if TOOLCHAIN_class-nativesdk = "clang" is set. Signed-off-by: Daniel Dittmann <daniel.dittmann@rohde-schwarz.com>
* clang: Move libclang into its own dedicated package.yoe/mutPiotr Tworek2019-07-261-1/+5
| | | | | | | | | This library has a few potential consimers (ex, qttools) which don't need whole clang install. Distributions like debian already package lbiclang separately as libclang1. This makes even more sense for embedded systems. Do the same for OE/Yocto. Signed-off-by: Piotr Tworek <tworaz@tworaz.net>
* clang: Add hf to target tuple if hard float calling convention is usedKhem Raj2019-04-091-1/+4
| | | | | | | | This ensures that right default target is used and one does not need to specify it manually using -target option or -mfloat-abi when using on target Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: support old toolchainsAnuj Mittal2019-04-041-0/+1
| | | | | | | Allows building llvm/clang on Centos7 (gcc4.8) which still is one of the suported distros in YP. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
* clang: Add compiler-rt and libcxx-dev to runtime depsKhem Raj2019-04-031-1/+2
| | | | | | | When installing clang to target its important to get these dependencies along with other llvm runtime, so clang can work out of box Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Use gold linker for nativersdkKhem Raj2019-02-111-12/+12
| | | | | | | | | | | | | | nativesdk packages are special in OE, where linker pads the dynamic section with additional bits so that can be patched to a relocatable location duting installing SDK, lld will need such a patch if it has to link the nativesdk apps, until then we use gold Add more fine grained packageconfigs for libpfm, ncurses, and libedit Enable clang as toolchain to build nativesdk version of clang with gold linker Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Fix nativesdk builds to use clang-nativeKhem Raj2019-02-111-8/+21
| | | | | | | | | | - User lld for linking nativesdk-clang - Enable LTO to build nativesdk-clang - Use -static-libgcc when using gold/lld for nativesdk clang build - Use llvm wrappers for ar ranlib and nm to help LTO - Package and create cross versions of lld Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang-nativesdk: Do not default to clang-runtimeKhem Raj2019-02-091-1/+1
| | | | | | | | | | | This make it use same runtime as the cross compiler default, which is more or less what is going to be case, if one wants to use clang runtime then it should be enabled across all clang variants (native/nativesdk/cross) Fixes Issue #66 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Enable lld for linker during stage2 of clang-native buildKhem Raj2019-02-091-0/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Enable 2 stage bootstrap for clang-nativeKhem Raj2019-02-091-5/+23
| | | | | | This will help in using clang Thin-LTO to compile clang itself Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Enable LTO and lld based on distro knobsKhem Raj2019-02-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add to local.conf or distro config the following to enable lto flavors and lld linker DISTRO_FEATURES += "thin-lto" DISTRO_FEATURES += "full-lto" DISTRO_FEATURES += "lld" Add lto.bbclass To enable LTO is currently per recipe, or globally to enable globally add following to global config meta-data e.g. local.conf INHRIT += "lto" other-wise enable LTO per recipe using inherit lto to recipe via bbappend or in main recipe Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Compiler native and clang for target with Thin-LTO enabledKhem Raj2019-02-071-3/+10
| | | | | | Should speed up compiler speed Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Switch to upcoming 8.0 release branchKhem Raj2019-01-191-4/+23
| | | | | | | | | | | | | | | Clang 8.0 is going to be released in Feb-March 2019 so here we switch to release/8.x branch a bit early so we can provide some feedback for release to be good on OE If one needs to use stable 7.0.1 release please use thud branch clang 8.0 does have RISC-V backend, enable it clang: Add building experimental targets e.g. riscv Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang,nativesdk-packagegroup-sdk-host: Recognise risc-vKhem Raj2018-12-271-0/+1
| | | | | | | This helps build SDKs for risc-v when meta-clang is in layer mix even though clang for risc-v may not fully work yet Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nativesdk-clang: Rely on runtime build via libcxx and compiler-rt recipesKhem Raj2018-12-271-2/+0
| | | | | | | | This was trying to build runtime during build but we already have recipes for libcxx and compiler-rt to do that, unless we merge them into clang recipe, we need to keep using them to provide nativesdk clang runtime Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipes: Rework llvm/clang/compiler-rt/libcxx/lldb recipesKhem Raj2018-12-271-19/+4
| | | | | | | | | | | | | | This is an overhaul of clang/llvm project related recipes * switch to using a flat mono repo for all clang/llvm projects * Add llvm-project-source recipe which will prepare source tree in work-shared for all recipes much like kernel and gcc * build lld as part of clang recipes, its much easier and saves build time and hopefully nativesdk version will be built now for free * switch to official git repos at git://github.com/llvm-project * Adjust all recipes to use shared sources Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipes: Upgrade to clang 7.0.0 Release (rc2)Khem Raj2018-09-091-0/+2
| | | | | | | | | | | | | | | | | - Update compiler-rt/llvm/clang/lld licence checksums Triggerred due to copyright year update to 2018 Add libunwind and libcxxabi license to checksum list too - Switch to https protocol for fetching from github - Fix _finite functions on musl - Package new .so files built with clang - package libLLVM-${MAJOR_VER}.so as well since llvm-7 generates it without MINOR_VERSION Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Fix sigsegv of llvm-config on the targetRicardo Ribalda Delgado2018-05-301-0/+3
| | | | | | | llvm-config is, by default, broken by the SSTATE_SCAN_CMD. This patch removes llvm-config from SSTATE_SCAN_FILES. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
* clang: Add package config for shared-libsMichael Davis2018-05-291-3/+4
| | | | | | Allow shared or static libs to be selected by package config. Default to shared. Signed-off-by: Michael Davis <michael.davis@essvote.com>
* recipes: Drop setting NINJA_STATUSKhem Raj2018-04-191-2/+2
| | | | | | This is no longer needed Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: enable support for BPF targetDaniel Díaz2018-04-111-1/+1
| | | | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
* clang: add missing ; for llvm targetsMartin Kelly2017-10-041-1/+1
| | | | | | | | Without this, we get a syntax error when we don't override LLVM_TARGETS_TO_BUILD_TARGET because LLVM_TARGETS_TO_BUILD_TARGET gets set as something like "X86X86" instead of "X86;X86". Signed-off-by: Martin Kelly <mkelly@xevo.com>
* clang: fix nativesdk buildMing Liu2017-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | I could not manage to build nativesdk-clang, I encountered errors as follows: (trimmed for purpose) | ../gcc/x86_64-pokysdk-linux/6.3.0/ld:: | cannot find crt1.o: No such file or directory | cannot find crtbegin.o: No such file or directory | cannot find -lgcc | cannot find -lgcc_s After some investigation, I found it's caused by the llvm native tools could not compile with crosssdk toolchains. (special linking flags are needed) So we introduce a cmake-native class with a task to generate a native toolchain file, it will be used to build llvm native tools by passed with CROSS_TOOLCHAIN_FLAGS_NATIVE. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Add -DLLVM_ENABLE_ASSERTIONS=OFF and -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFFKhem Raj2017-08-031-22/+27
| | | | | | This should speed up clang when compiling other stuff Signed-off-by: Khem Raj <raj.khem@gmail.com>
* recipes: Use ninja generator on top of cmakeKhem Raj2017-07-301-1/+10
| | | | | | ninja is in OE-Core now Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Enable libffi supportKhem Raj2017-07-291-1/+2
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Add missing FILERicardo Ribalda Delgado2017-07-181-0/+1
| | | | | | | | | | | | | | | | Fixes: ERROR: clang-5.0.0+gitAUTOINC+f65227fd46_2ce35b601d-r0 do_package: QA Issue: clang: Files/directories were installed but not shipped in any package: /usr/share/opt-viewer /usr/share/opt-viewer/optrecord.py /usr/share/opt-viewer/opt-viewer.py /usr/share/opt-viewer/opt-stats.py /usr/share/opt-viewer/optpmap.py /usr/share/opt-viewer/opt-diff.py /usr/share/opt-viewer/style.css Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
* clang: Fix name of .so fileRicardo Ribalda Delgado2017-07-181-0/+1
| | | | | | | | | | | | | | When we are building an unreleased version the so name is: libLLVM-MAJOR.MINORsvn.so instead of just libLLVM-MAJOR.MINOR.so E.g.: libLLVM-5.0svn.so Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
* clang: Allow user to add extra build target on class_targetRicardo Ribalda Delgado2017-07-181-1/+4
| | | | | | | | Originally TARGETS_TO_BUILD was limited to the target architecture, which is not enough to build code for heterogenous systems such as (in my case) AMDGPU. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
* clang/llvm: Move to upcoming 5.0.0 ( trunk ) releaseKhem Raj2017-05-221-20/+8
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Handle return the clang arch for arm correctlyKhem Raj2017-05-181-0/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Fix get_clang_arch() to address OE target arch combosKhem Raj2017-05-181-15/+10
| | | | | | Use regular expressions for mapping to a llvm arch Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Change LLVM_TARGETS_TO_BUILD to build everything by defaultKhem Raj2017-05-181-8/+9
| | | | | | | | | | | | | | | | | | | | As described in issue #33, LLVM_TARGETS_TO_BUILD should include build host as well as target arches and that fails since we build clang-native once for all due to its inherent cross compilable nature if one needs to limit the targets please set it in local.conf or via a bbappend in own layer e.g. LLVM_TARGETS_TO_BUILD = "ARM" if you only need 32bit arm or LLVM_TARGETS_TO_BUILD = "ARM;Aarch64" in case of both arm 32bit and 64bit fixes #33 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: update for cmake changes in oe-coreRoss Burton2017-05-051-6/+1
| | | | | | | | | | | cmake.bbclass in oe-core master (soon to be Pyro) doesn't set CMAKE_CROSSCOMPILING unconditionally, but only when it's actually cross-compiling. This means the clang-native build doesn't think it's cross-compiling, so the recipe can be simplified. Signed-off-by: Ross Burton <ross.burton@intel.com>
* clang: remove binutils from DEPENDS.Ismo Puustinen2017-03-231-1/+3
| | | | | | | Binutils is not needed during compile time. Add it instead to RRECOMMENDS_clang. Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
* clang: allow override for not building all targetsMartin Kelly2017-03-211-6/+18
| | | | | | | | | | | | | Allow the user to not build all clang target architectures (by default, all architectures are built). This speeds up build times and reduces image size. Note, however, that the set of architectures built must still be the same between the native and cross clang, because the native llvm-config reports --targets-built according to what "clang-native" supports. Thus when we have target libraries that are a subset of native libraries, the cross llvm-config will fail because it can't find some of the libraries that the native llvm-config finds. Signed-off-by: Martin Kelly <mkelly@xevo.com>
* clang: build libLLVM.soMartin Kelly2017-03-211-1/+8
| | | | | | | It's useful to have a shared library version of LLVM for programs that require it. Signed-off-by: Martin Kelly <mkelly@xevo.com>
* clang: fix the llvm-common wrapperMartin Kelly2017-03-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | The llvm-common wrapper refers to the LLVM_WANT_RELEASE variable, which is not actually exported, so it fails. In addition, meta-clang does not support multiple side-by-side LLVM versions anyway, so the logic isn't really needed. After fixing these issues, I discovered that llvm-config doesn't cross-compile properly without more extensive wrapping. Specifically, the native llvm-config supplies --libdir, and other arguments relative to its current executable path, so it points into the native sysroot rather than the target sysroot. In addition, it supplies the native rather than the target compile CFLAGS, LDFLAGS, etc. Fix these issues by doing the following: - Alter the llvm-config to intercept certain flags, such as --cflags, while passing on other flags to the native llvm-config. - Patch llvm-config to be able to specify an alternate root location on which to base --libdir, etc. in order to optionally point into the target sysroot when needed. Signed-off-by: Martin Kelly <mkelly@xevo.com>
* clang: remove commented-out codeMartin Kelly2017-03-211-15/+0
| | | | Signed-off-by: Martin Kelly <mkelly@xevo.com>
* clang: correct spacing issueMartin Kelly2017-03-211-2/+2
| | | | Signed-off-by: Martin Kelly <mkelly@xevo.com>
* clang/compiler-rt: Fix nativesdk builds break compiler-rt dep for clangKhem Raj2017-03-161-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Fix cross compiler search path for compiler-rtKhem Raj2017-03-161-0/+1
| | | | | | | | It was looking into compiler install area but for OE cross compiling scenario the compiler runtime is installed into target sysroot, Fix clang to look into sysroot Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang/compiler-rt: Use compiler-rt and libcxx as default runtime for target ↵Khem Raj2017-03-161-2/+15
| | | | | | | | clang One can still use -stdlib=libstdc++ and -rtlib=libgcc to use gcc runtime Signed-off-by: Khem Raj <raj.khem@gmail.com>
* clang: Disable using shared libs for llvm on targetKhem Raj2017-03-131-1/+2
| | | | | | Slows down compilation by 6x Signed-off-by: Khem Raj <raj.khem@gmail.com>