Naive concatenation of $LD_LIBRARY_PATH can result in an empty
colon-delimited segment; this tells glibc to load libraries from the
current directory, which is definitely wrong, and may be a security
vulnerability if the current directory is untrusted. (See #67234, for
example.) Fix this throughout the tree.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Quoting from the splitString docstring:
NOTE: this function is not performant and should never be used.
This replaces trivial uses of splitString for splitting version
strings with the (potentially builtin) splitVersion.
LLVM should be target independent because it will work with all
machine types. This is different from GCC where it needs to know what
target to build ahead of time.
clang needs to find headers + libraries for compiling with libc++. We
need to add a libcxx argument to cc-wrapper. This means you do not
have to pass in c++ headers directly.
This resolves the last case remaining of #30670. Darwin clang++ now
works properly.
Fixes#30670
This makes LLVM tools (including dependent tools such as LLD) readily useful in
more situations, foresees such needed additions as BPF and NVPTX, and brings
llvm_6 and newer on par with the current default llvm_5.
LLVM’s `LLVM_TARGETS_TO_BUILD` build flag defauls to `all`, which contains
`AMDGPU` among others. [1] Changes in llvm [2] switched to explicitly listing
host and target platforms, excluding the AMDGPU target, which is required
for Mesa to build.
[1]: db50b6fe39/CMakeLists.txt (L286-L302)
[2]: https://github.com/NixOS/nixpkgs/pull/52031
This is necessary to avoid objc errors like:
"_OBJC_CLASS_$_NSDictionary", referenced from:
objc-class-ref in liblldbHost.a(HostInfoMacOSX.mm.o)
objc-class-ref in liblldbPluginPlatformMacOSX.a(PlatformiOSSimulatorCoreSimulatorSupport.mm.o)
ld: symbol(s) not found for architecture x86_64
On darwin llvmPackages is built using python-boot to avoid dependencies
in the stdenv, but we can't and shouldn't use that when building the
manpages since it depends on python packages.
Since years I'm not maintaining anything of the list below other
than some updates when I needed them for some reason. Other people
is doing that maintenance on my behalf so I better take me out but
for very few packages. Finally!
Previously we only set these when using musl.
See https://github.com/NixOS/nixpkgs/pull/42452#discussion_r197618464
Same should be done for changes in #42452,
I'll add a follow-up commit doing so in the PR containing this
or wherever makes sense-- depending on how review/merging of that goes.
Sending similar changes for LLVM 4 to master, as suggested.