Skip to content

Instantly share code, notes, and snippets.

@Mic92
Created August 6, 2021 14:11
Show Gist options
  • Select an option

  • Save Mic92/0ce93f2974e23f940920d47d495aa86f to your computer and use it in GitHub Desktop.

Select an option

Save Mic92/0ce93f2974e23f940920d47d495aa86f to your computer and use it in GitHub Desktop.
unwrapped clang
with import <nixpkgs> {};
let
gccForLibs = stdenv.cc.cc;
in mkShell {
buildInputs = [
llvmPackages_11.clang-unwrapped
];
disableHardening = true;
CFLAGS = ''-target x86_64-unknown-linux-gnu -resource-dir=${llvmPackages_11.clang}/resource-root -B${gccForLibs}/lib/gcc/${targetPlatform.config}/${gccForLibs.version} -B${llvmPackages_11.clang-unwrapped} --gcc-toolchain=${gccForLibs} -B${stdenv.cc.libc}/lib -idirafter ${stdenv.cc.libc.dev}/include'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment