GithubHelp home page GithubHelp logo

klozz / yuki-clang Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 3.66 GB

Moved to https://gitlab.com/TheXPerienceProject/yuki_clang, or https://bitbucket.org/thexperienceproject/yuki-clang/src/18.0.0/ Clone with --depth=1

License: Other

XC 0.92% XS 0.91% Python 0.41% C++ 1.93% C 83.62% CMake 2.07% Shell 0.01% AppleScript 0.01% Emacs Lisp 0.06% Roff 9.11% CSS 0.03% Tcl 0.91%
llvm clang

yuki-clang's Introduction

Yuki CLANG 18.0.0 >

Yuki clang 18.0.0 or superior will be moved to https://bitbucket.org/thexperienceproject/yuki-clang/

Yuki-clang

This is a LLVM and Clang compiler toolchain built for kernel development. Builds are always made from the latest LLVM sources rather than stable releases, so complete stability cannot be guaranteed.

This toolchain targets the AArch32, AArch64, and x86 architectures. It is built with LTO and PGO to reduce compile times as much as possible.

binutils is also included for convenience. Unlike LLVM, however, the latest stable version of binutils is always used to reduce the opportunity for breakage because this project is primarily focused on cutting-edge Clang, not binutils. This means that users do not need to download separate GCC toolchains to build the Linux kernel.

Automated builds occur weekly at 11 PM UTC-6 on every Sunday using fresh sources from the LLVM Git monorepo. If any part of the builds fail, this repository will not be updated. The build scripts (powered by tc-build).

This Readme is based on Proton clang cuz it has good information Credits to kdrag0n.

Building Linux

Make sure you have this toolchain in your PATH:

export PATH="$HOME/tools/yuki-clang/bin:$PATH"

For an AArch64 cross-compilation setup, you must set the following variables. Some of them can be environment variables, but some must be passed directly to make as a command-line argument. It is recommended to pass all of them as make arguments to avoid confusing errors:

  • CC=clang (must be passed directly to make)
  • CROSS_COMPILE=aarch64-linux-gnu-
  • If your kernel has a 32-bit vDSO: CROSS_COMPILE_ARM32=arm-linux-gnueabi-

This is an example from one of my scripts with clang lto

    PATH="$HOME/tools/yuki-clang/bin:${PATH}" \
      make -j$(nproc --all) O=out \
      ARCH=arm64 \
      LD=ld.lld \
      NM=llvm-nm \
      AR=llvm-ar \
      CC="ccache clang" \
      CLANG_TRIPLE=aarch64-linux-gnu- \
      CROSS_COMPILE=aarch64-linux-gnu- \
      CROSS_COMPILE_ARM32=arm-linux-gnueabi-

if your kernel has defined REAL_CC instead of CC use: REAL_CC="clang" or with ccache REAL_CC="ccache clang" to use ccache you need to install ccache

To use ld.lld linker or similar you will need aditional patches to your kernel

Android kernels 4.19 and newer use the upstream variable CROSS_COMPILE_COMPAT. When building these kernels, replace CROSS_COMPILE_ARM32 in your commands and scripts with CROSS_COMPILE_COMPAT.

yuki-clang's People

Contributors

klozz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kry0nauth

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.