{"id":13831738,"url":"https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm","last_synced_at":"2025-07-09T15:33:05.951Z","repository":{"id":38680220,"uuid":"269096539","full_name":"ARM-software/LLVM-embedded-toolchain-for-Arm","owner":"ARM-software","description":"A project dedicated to building LLVM toolchain for Arm and AArch64 embedded targets.","archived":false,"fork":false,"pushed_at":"2024-11-13T11:06:38.000Z","size":1018,"stargazers_count":418,"open_issues_count":20,"forks_count":98,"subscribers_count":31,"default_branch":"main","last_synced_at":"2024-11-13T12:19:26.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ARM-software.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-03T13:32:46.000Z","updated_at":"2024-11-06T15:12:32.000Z","dependencies_parsed_at":"2023-09-27T09:13:52.857Z","dependency_job_id":"2862faca-a64e-4c3d-a9e2-4ca0c7ad21e7","html_url":"https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARM-software%2FLLVM-embedded-toolchain-for-Arm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARM-software%2FLLVM-embedded-toolchain-for-Arm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARM-software%2FLLVM-embedded-toolchain-for-Arm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ARM-software%2FLLVM-embedded-toolchain-for-Arm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ARM-software","download_url":"https://codeload.github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225565910,"owners_count":17489284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T10:01:38.808Z","updated_at":"2025-07-09T15:33:05.901Z","avatar_url":"https://github.com/ARM-software.png","language":"CMake","readme":"\u003e [!WARNING] \n\u003e This repository is deprecated!\n\u003e\n\u003e LLVM Embedded Toolchain for Arm is now\n\u003e [Arm Toolchain for Embedded](https://github.com/arm/arm-toolchain/tree/arm-software/arm-software/embedded)\n\u003e maintained in the unified Arm Toolchain [repository](https://github.com/arm/arm-toolchain)\n\u003e hosting embedded and Linux toolchains.\n\u003e\n\u003e 19.1.5 is the last release of the LLVM Embedded Toolchain for Arm.\n\u003e Use Arm Toolchain for Embedded [releases](https://github.com/arm/arm-toolchain/releases) for LLVM 20 and later.\n\n# LLVM Embedded Toolchain for Arm\n\nThis repository contains build scripts and auxiliary material for building a\nbare-metal LLVM based toolchain targeting Arm based on:\n* clang + llvm\n* lld\n* libc++abi\n* libc++\n* compiler-rt\n* picolibc, or optionally newlib or LLVM's libc\n\n## Goal\n\nThe goal is to provide an LLVM based bare-metal toolchain that can target the\nArm architecture family from Armv6-M and newer. The toolchain follows the ABI\nfor the Arm Architecture and attempts to provide typical features needed for\nembedded and realtime operating systems.\n\n## Supported architectures\n\n- Armv6-M\n- Armv7-M\n- Armv7E-M\n- Armv8-M Mainline and Baseline\n- Armv8.1-M Mainline and Baseline\n- Armv4T (experimental)\n- Armv5TE (experimental)\n- Armv6 (experimental, using the Armv5TE library variant)\n- Armv7-A\n- Armv7-R\n- AArch32 Armv8-A\n- AArch32 Armv8-R\n- AArch64 Armv8-A\n\n## C++ support\n\nC++ is partially supported with the use of libc++ and libc++abi from LLVM. Features\nthat are not supported include:\n - Multithreading\n\nLLVM Embedded Toolchain for Arm uses the unstable libc++ ABI version. This ABI\nuses all the latest libc++ improvements and bugfixes, but may result in link\nerrors when linking against objects compiled against older versions of the ABI.\nFor more information see https://libcxx.llvm.org/DesignDocs/ABIVersioning.html.\n\n## Components\n\nThe LLVM Embedded Toolchain for Arm relies on the following upstream components\n\nComponent  | Link\n---------- | ------------------------------------\nLLVM       | https://github.com/llvm/llvm-project\npicolibc   | https://github.com/picolibc/picolibc\n\n## License\n\nContent of this repository is licensed under Apache-2.0, see\n[LICENSE.txt](LICENSE.txt). Individual patch files under the\n[patches](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/tree/main/patches)\nfolder may contain code under the upstream project license, if they are\ncherry-picks of upstream commits into the LLVM Embedded Toolchain for Arm\nrelease branches, see corresponding pull requests for references.\n\nThe resulting binaries are covered under their respective open source licenses,\nsee component links above.\n\nTesting for some targets uses the freely-available but not open-source Arm FVP\nmodels, which have their own licenses. These are not used by default, see\n[Building from source](docs/building-from-source.md) for details.\n\n## Host platforms\n\nLLVM Embedded Toolchain for Arm is built and tested on Ubuntu 18.04 LTS.\n\nThe Windows version is built on Windows Server 2019 and lightly tested on Windows 10.\n\nBuilding on macOS is functional for x86_64 and Apple Silicon.\n\n[Binary packages](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases)\nare provided for major LLVM releases for Linux and Windows.\n\n## Getting started\n\nDownload a release of the toolchain for your platform from [Github\nreleases](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases)\nand extract the archive into an arbitrary directory.\n\n### Pre-requisite for using toolchain on Windows\n\nInstall appropriate latest supported Microsoft Visual C++ Redistributable package, such as from [Microsoft Visual C++ Redistributable latest supported downloads](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170).\n\n### Using the toolchain\n\n\u003e *Note:* If you are using the toolchain in a shared environment with untrusted input,\n\u003e make sure it is sufficiently sandboxed.\n\nTo use the toolchain, on the command line you need to provide the following options:\n* The target triple.\n* The FPU to use.\n* Disabling/enabling C++ exceptions and RTTI.\n* The C runtime library: either `crt0` or `crt0-semihost`.\n  `crt0` will be linked automatically, but this can be suppressed\n  with the `-nostartfiles` option so that `crt0-semihost` can be used.\n* The semihosting library, if using `crt0-semihost`.\n* A [linker script](\n  https://sourceware.org/binutils/docs/ld/Scripts.html) specified with `-T`.\n  Default `picolibcpp.ld` and `picolibc.ld` scripts are provided and can be used\n  directly or included from a [custom linker script](\n  https://github.com/picolibc/picolibc/blob/main/doc/linking.md#using-picolibcld).\n\nFor example:\n```\n$ PATH=\u003cinstall-dir\u003e/LLVMEmbeddedToolchainForArm-\u003crevision\u003e/bin:$PATH\n$ clang \\\n--target=armv6m-none-eabi \\\n-mfpu=none \\\n-fno-exceptions \\\n-fno-rtti \\\n-nostartfiles \\\n-lcrt0-semihost \\\n-lsemihost \\\n-T picolibc.ld \\\n-o example example.c\n```\n\n`clang`'s multilib system will automatically select an appropriate set of\nlibraries based on your compile flags. `clang` will emit a warning if no\nappropriate set of libraries can be found.\n\nTo display the directory selected by the multilib system, add the flag\n`-print-multi-directory` to your `clang` command line options.\n\nTo display all available multilibs run `clang` with the flag `-print-multi-lib`\nand a target triple like `--target=aarch64-none-elf` or `--target=arm-none-eabi`.\n\nIt's possible that `clang` will choose a set of libraries that are not the ones\nyou want to use. In this case you can bypass the multilib system by providing a\n`--sysroot` option specifying the directory containing the `include` and `lib`\ndirectories of the libraries you want to use. For example:\n\n```\n$ clang \\\n--sysroot=\u003cinstall-dir\u003e/LLVMEmbeddedToolchainForArm-\u003crevision\u003e/lib/clang-runtimes/arm-none-eabi/armv6m_soft_nofp \\\n--target=armv6m-none-eabi \\\n-mfpu=none \\\n-fno-exceptions \\\n-fno-rtti \\\n-nostartfiles \\\n-lcrt0-semihost \\\n-lsemihost \\\n-T picolibc.ld \\\n-o example example.c\n```\n\nThe FPU selection can be skipped, but it is not recommended to as the defaults\nare different to GCC ones.\n\n\nThe builds of the toolchain come packaged with two config files, Omax.cfg and OmaxLTO.cfg.\nWhen used, these config files enable several build optimisation flags to achieve highest performance on typical embedded benchmarks. OmaxLTO.cfg enables link-time optimisation (LTO) specific flags.\nThese configs can be optionally passed using the `--config` flag. For example:\n\n```\n$ clang \\\nexample.c \\\n...\n--config=Omax.cfg \\\n--config=OmaxLTO.cfg \\\n-o example\n```\n\nUsers should be warned that Omax.cfg enables `-ffast-math` which breaks IEEE compliance and\nenables maths optimisations which can affect code correctness.  LTOs are\nkept separately in OmaxLTO.cfg as users may not want LTOs due to potential increase in link time\nand/or increased memory usage during linking. Some of the options in the config files are undocumented internal LLVM options. For these undocumented options please see the source code of the\ncorresponding optimisation passes in the [LLVM project](https://github.com/llvm/llvm-project)\nto find out more. Users are also encouraged to create their own configs and tune their own\nflag parameters.\nInformation on LLVM Embedded Toolchain for Arm specific optimization flags is available in [Optimization Flags](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/blob/main/docs/optimization-flags.md)\n\nBinary releases of the LLVM Embedded Toolchain for Arm are based on release\nbranches of the upstream LLVM Project, thus can safely be used with all tools\nprovided by LLVM [releases](https://github.com/llvm/llvm-project/releases)\nof matching version.\n\nSee [Migrating from Arm GNU Toolchain](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/blob/main/docs/migrating.md)\nand [Experimental newlib support](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/blob/main/docs/newlib.md)\nfor advice on using LLVM Embedded Toolchain for Arm with existing projects\nrelying on the Arm GNU Toolchain.\n\n\u003e *Note:* `picolibc` provides excellent\n\u003e [support for Arm GNU Toolchain](https://github.com/picolibc/picolibc/blob/main/doc/using.md),\n\u003e so projects that require using both Arm GNU Toolchain and LLVM Embedded Toolchain for Arm\n\u003e can choose either `picolibc` or `newlib`.\n\n## Building from source\n\nLLVM Embedded Toolchain for Arm is an open source project and thus can be built\nfrom source. Please see the [Building from source](docs/building-from-source.md)\nguide for detailed instructions.\n\n## Providing feedback and reporting issues\n\nPlease raise an issue via [Github issues](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/issues).\n\n## Contributions and Pull Requests\n\nPlease see the [Contribution Guide](docs/contributing.md) for details.\n","funding_links":[],"categories":["CMake"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FARM-software%2FLLVM-embedded-toolchain-for-Arm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FARM-software%2FLLVM-embedded-toolchain-for-Arm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FARM-software%2FLLVM-embedded-toolchain-for-Arm/lists"}