Giter VIP home page Giter VIP logo

meta-clang's Introduction

meta-clang (a C language family frontend and LLVM compiler backend)

This layer provides clang/llvm as alternative to your system C/C++ compiler for OpenEmbedded based distributions along with gcc

Getting Started

git clone git://github.com/openembedded/openembedded-core.git
cd openembeeded-core
git clone git://github.com/openembedded/bitbake.git
git clone git://github.com/kraj/meta-clang.git

$ . ./oe-init-build-env

Edit conf/bblayers.conf to add meta-clang to layer mix e.g.

BBLAYERS ?= " \
  /home/kraj/openembedded-core/meta-clang \
  /home/kraj/openembedded-core/meta \
  "

Default Compiler Switch

Note that by default gcc will remain the system compiler, however if you wish clang to be the default compiler then set

TOOLCHAIN ?= "clang"

in local.conf, this would now switch to using clang as default compiler systemwide you can select clang per package too by writing bbappends for them containing

TOOLCHAIN = "clang"

Building

Below we build for qemuarm machine as an example

$ MACHINE=qemux86 bitbake core-image-minimal

Running

$ runqemu qemux86

Limitations

Few components do not build with clang, if you have a component to add to that list simply add it to conf/nonclangable.inc e.g.

TOOLCHAIN_pn-<recipe> = "gcc"

and OE will start using gcc to cross compile that recipe,

Dependencies

URI: git://github.com/openembedded/openembedded-core.git
branch: master
revision: HEAD

URI: git://github.com/openembedded/bitbake.git
branch: master
revision: HEAD

Send pull requests to [email protected] with '[meta-clang]' in the subject'

When sending single patches, please use something like:

'git send-email -M -1 --to [email protected] --subject-prefix=meta-clang][PATCH'

You are encouraged to fork the mirror on github to share your patches, this is preferred for patch sets consisting of more than one patch. Other services like gitorious, repo.or.cz or self hosted setups are of course accepted as well, 'git fetch ' works the same on all of them. We recommend github because it is free, easy to use, has been proven to be reliable and has a really good web GUI.

Layer Maintainer: Khem Raj

meta-clang's People

Contributors

kraj avatar ribalda avatar rossburton avatar walkthetalk avatar dankm avatar dsacre avatar otavio avatar kergoth avatar ipuustin avatar mythi avatar sakoman avatar

Watchers

James Cloos avatar John Ludwig avatar BJ Fox avatar Martin Kelly avatar Sam McKelvie avatar

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.