Giter Club home page Giter Club logo

clang-tools-static-binaries's Introduction

clang-tools (clang-format, clang-query, clang-tidy) static binaries

Download

Grab clang-tools static binaries for your platform from Releases tab!

Motivation behind this repo

I use to contribute to different repositories and they often use different versions of clang-format.

I could either compile clang-format for each one I want to have or I could try messing up with my package system (I use Arch Linux btw) and try installing all of them on my system. This can very quickly get out of hand, hence I created this repository.

These binaries aim to:

  • be as small as possible
  • not require any additional dependencies apart from OS itself

How can I trust this repository?

  • Verify sha512sums of binaries against output from GitHub Actions to make sure binaries are not modified
  • Fork this repository and run GitHub actions on your behalf
  • Build manually using steps using commands from .github/workflows

More clang-tools

If there's any interest I could add more tools, or a build for new OS (ex. FreeBSD)

clang-tools-static-binaries's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clang-tools-static-binaries's Issues

Question: Have you seen, been ablet to get rid of these warnings?

I've been trying to use your flags to be able to build LLVM statically locally (in my case to get a static build of include-what-you-use). Incidentally while building I saw the following warning:

/usr/bin/ld: /tmp/clang-tblgen.mtd4W8.ltrans10.ltrans.o: in function `llvm::sys::fs::real_path(llvm::Twine const&, llvm::SmallVectorImpl<char>&, bool) [clone .part.0]':
<artificial>:(.text._ZN4llvm3sys2fs9real_pathERKNS_5TwineERNS_15SmallVectorImplIcEEb.part.0+0x4c5): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: <artificial>:(.text._ZN4llvm3sys2fs9real_pathERKNS_5TwineERNS_15SmallVectorImplIcEEb.part.0+0x848): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
[1043/2608] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/EarlyCSE.cpp.o

I'm wondering if you've seen this and if it is a concern or if perhaps I've misconfigured my code.

My configure command looks like:

cmake -S llvm -B iwyu_build -DCMAKE_BUILD_TYPE=Release -G 'Ninja' -DLLVM_ENABLE_PROJECTS=clang -DLLVM_EXTERNAL_PROJECTS=iwyu -DLLVM_EXTERNAL_IWYU_SOURCE_DIR=/<redacted>/iwyu_git/ -DPython3_EXECUTABLE="/<redacted>/bin/python" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_STATIC=ON -DCMAKE_CXX_FLAGS="-s -flto" -DBUILD_SHARED_LIBS=OFF

WebAssembly support?

I'd like to use clang tools inside a browser, would it be possible to compile them to WebAssembly using something like Emscripten?

clang-format fails to run on macOS 10.15.7

Hi there!

First of all thank you for doing this. I am using Windows and Linux binaries without any issue. But running clang-format on macOS gives this issue:

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H15
$ xcodebuild -version
Xcode 12.4
Build version 12D4e
$ ./clang-format-12_macosx-amd64 
dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
  Referenced from: /Users/test/Downloads/./clang-format-12_macosx-amd64
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___emutls_get_address
  Referenced from: /Users/test/Downloads/./clang-format-12_macosx-amd64
  Expected in: /usr/lib/libSystem.B.dylib

Killed: 9

[MacOS@ARM]Library not loaded: /usr/local/opt/zstd/lib/libzstd.1.dylib

dyld[49194]: Library not loaded: /usr/local/opt/zstd/lib/libzstd.1.dylib
  Referenced from: <FEF6988E-39DD-39D9-9EE2-57BB22A06C08> /Users/XXXX/Downloads/clang-format-16_macosx-amd64
  Reason: tried: '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/opt/zstd/lib/libzstd.1.dylib' (no such file), '/usr/local/lib/libzstd.1.dylib' (no such file), '/usr/lib/libzstd.1.dylib' (no such file, not in dyld cache)
[1]    49194 abort      ./clang-format-16_macosx-amd64

same err:

  • clang-format-15_macosx-amd64
  • clang-format-16_macosx-amd64

works:

  • clang-format-14_macosx-amd64

AUR package clang-format-static-bin outdated

Hey muttleyxd,

I noticed that you are the maintainer of the clang-format-static-bin AUR package. In the PKGBUILD I saw that it uses links to this repository, which frankly enough, is your own repository. I've seen that you updated this repository to clang-format-16 which is fairly nice because since version 16 of clang-format the AlignTrailingComments option is not simply a boolean anymore, but has various options (see screenshot below) which I need for a codebase that I am maintaining.

Could you please also update the PKGBUILD of the AUR package? In the meantime I'll run clang-format version 16 manually from this repository thus outside of my AUR package manager.

Untitled

LLVM 13.0.0 binaries

Since there are no official Window binaries provided anymore it would be great to have them here. Thx!

[REQUEST] clang-tidy too?

Thanks for this invaluable resource! Would it be possible to add clang-tidy too? And maybe some of the other clang tools (clang-query maybe?)

clang-tidy 14 segfault

Hello,

Running clang-tidy 14 on my available systems (ubuntu 22.02, Gentoo or arch linux) results in a segfault.

clang-format 14 doesn't segfault, nor does clang-tidy 13, 12...

Any idea?

This is an extract running the program with valgrind:

==1536299== Memcheck, a memory error detector
==1536299== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1536299== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==1536299== Command: ./clang-tidy-14_linux-amd64
==1536299== Parent PID: 1534110
==1536299== 
==1536299== Syscall param set_robust_list(head) points to uninitialised byte(s)
==1536299==    at 0x1B27B95: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1C2DD4E: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x42BD1D: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1FFF000417: ???
==1536299==  Address 0x4000bf0 is in the brk data segment 0x4000000-0x400123f
==1536299== 
==1536299== Conditional jump or move depends on uninitialised value(s)
==1536299==    at 0x1C62FF0: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1C62FBC: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1B27D86: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1C2DD4E: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x42BD1D: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1FFF000417: ???
==1536299== 
==1536299== Conditional jump or move depends on uninitialised value(s)
==1536299==    at 0x1C63074: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1C62FBC: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1B27D86: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1C2DD4E: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x42BD1D: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1FFF000417: ???
==1536299== 
==1536299== Conditional jump or move depends on uninitialised value(s)
==1536299==    at 0x1C68140: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1CCE1DA: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1CD2E44: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1CD60F5: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1C2DD88: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x42BD1D: ??? (in /home/user/Downloads/clang-tidy-14/clang-tidy-14_linux-amd64)
==1536299==    by 0x1FFF000417: ???

Support clang-format and clangd for GLIBC 2.12

Ey! I will be pleased if you could upload statically build binaries for clangd and clang-format to work on a Red Hat 6.3.
This machine is not mine and I don't have root access.
The compiler installed on it is GCC 4.4.6.
On that machine clang is not installed, nor LLVM.

$ rpm -q glibc
glibc-2.12-1.80.el6.x86_64
glibc-2.12-1.80.el6.i686

$ cat /proc/version
Linux version 2.6.32-279.el6.x86_64 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Jun 13 18:24:36 EDT 2012

$ cat /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.3 (Santiago)

See my post on reddit for details.
I have tested everything I know, and sadly I think I'm going to need to compile them.

Could you please take a look at it?
Thanks in advance!

Add LLVM 16 binaries

It would be great to update this repo to include the static binaries from the LLVM v16 release. I tried to do this myself (see the llvm16 branch on my fork) but the CI kept failing (e.g. see this job - I've copied the relevant output below) and I don't know enough about building LLVM to be able to resolve it.

Here are the relevant lines from the build logs where it seems to be failing:

 [ 32%] Building AArch64GenDAGISel.inc...
[0x4c3752]
[0x4be47c]
[0x5227f0]
[0x4f557a]
[0x4e67de]
[0x42ddb2]
[0x43388f]
[0x426ff6]
[0x426c3d]
[0x426c3d]
[0x4280fa]
[0x432bb6]
[0x42cd99]
[0x4aab10]
[0x4dbe39]
[0x401db1]
[0x517d9a]
[0x5195f7]
[0x404a35]
Stack dump:
0.	Program arguments: ../../../bin/llvm-tblgen -gen-dag-isel -I /home/runner/work/clang-tools-static-binaries/clang-tools-static-binaries/llvm-project-7.1.0/llvm/lib/Target/AArch64 -I /home/runner/work/clang-tools-static-binaries/clang-tools-static-binaries/llvm-project-7.1.0/llvm/include -I /home/runner/work/clang-tools-static-binaries/clang-tools-static-binaries/llvm-project-7.1.0/llvm/lib/Target /home/runner/work/clang-tools-static-binaries/clang-tools-static-binaries/llvm-project-7.1.0/llvm/lib/Target/AArch64/AArch64.td -o /home/runner/work/clang-tools-static-binaries/clang-tools-static-binaries/llvm-project-7.1.0/build/lib/Target/AArch64/AArch64GenDAGISel.inc.tmp 
Segmentation fault (core dumped)
gmake[3]: *** [lib/Target/AArch64/CMakeFiles/AArch64CommonTableGen.dir/build.make:428: lib/Target/AArch64/AArch64GenDAGISel.inc.tmp] Error 139
gmake[2]: *** [CMakeFiles/Makefile2:13733: lib/Target/AArch64/CMakeFiles/AArch64CommonTableGen.dir/all] Error 2

clang-format 12.0.1

The patch release 12.0.1 of clang-format unfortunately formats differently than clang-format 12.0.0. Could you please provide a binary for clang-format 12.0.1 as well? Thank you!

Please add clang-tools 17 binaries

Clang 17 and its supplementary tools have been released, but there are no binaries for them. Can you please make a new release that will include them?

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.