clang 8, lldClangStdenv: Get LLVM's unwind working properly
Backport the `--unwindlib` flag, so it don't try to use libgcc on Linux for hysterical reasons. The alternative of passing `-lunwind` always would mess up C.
This commit is contained in:
committed by
Matthew Bauer
parent
d453273fbf
commit
6794b01658
@@ -97,11 +97,13 @@ let
|
||||
targetLlvmLibraries.libcxx
|
||||
targetLlvmLibraries.libcxxabi
|
||||
targetLlvmLibraries.compiler-rt
|
||||
targetLlvmLibraries.libunwind
|
||||
];
|
||||
extraBuildCommands = ''
|
||||
echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
|
||||
echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
|
||||
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
|
||||
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
|
||||
'' + mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user