Qt Base is built with LLVM 5 on Darwin. LLVM 11 causes problems for
WebEngine because of the "version" includes in libc++abi. LLVM 7 would
work but since parts are built with LLVM 5 anyway it seemed like a more
straightforward option.
Libc++abi 11 has `#include <version>` in some places. This clashes with
projects that have files named "version" in directories that end up on
the include path. This includes files named "VERSION" on
case-insensitive file systems.
One of the test files has a different encoding depending on the
filesystem's normalization. By picking a character that does not have
multiple possible encodings we make the source indifferent to
normalization. This allows the FOD hash to match across platforms with
differently normalizing filesystems.
By changing the condition for the patch it'll hopefully break when the
version is updated for Darwin and not stick around forever.
Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
Clang 11 complains about implicit conversion from int to float so we
disable `-Wimplicit-const-int-float-conversion`. The conversion causes a
difference in the constant of 1, so how bad can it be? ; )
libcxx-11.1.0 uses `#include <version>` in several places. There's a
`storage/mroonga/version` file in the mariadb source and this gets
picked up by libcxx when building mroonga but that file doesn't contain
valid source code.
To avoid the issue altogether we're sticking with a clang-7 stdenv to
build mariadb for now.
Based on 787f934b24 from LnL7's WIP LLVM 9
update.
Co-authored-by: Daiderd Jordan <daiderd@gmail.com>
On the Hydra builders and with Clang 7, CMake fails to find OpenGL. With
Clang 11 it manages to find the the OpenGL and GLUT system frameworks
for me. It does not find `gl.h` however. So the tests for `tiffgt` fail
on a missing include.
Since previously OpenGL wasn't detected I've opted to disable the CMake
check for OpenGL for darwin. This means `tiffgt.c` is never built and
tested. Ideally we'd provide the proper headers so the tests can
succeed.
The libcxxabi expression had a `standalone` argument in LLVM 7 which
triggered passing of the `-DLLVM_ENABLE_LIBCXX=ON` flag. In LLVM 11 this
flag and others are toggled by the `useLLVM` attribute of
`stdenv.hostPlatform` but this toggles a flag we don't need on Darwin.
Similar to the refactoring of LLVM 7 libc++abi by Ericson2314 in
3af7e98470, I have reintroduced the standalone argument for use in
bootstrapping the Darwin stdenv.
The Darwin stdenv takes some of the llvmPackages from the top-level pkgs
rather than explicitly from `llvmPackages_*`. This means you cannot
simply bump the LLVM version in the stdenv, you have to bump the default
version in all-packages.nix as well.
`TargetConditionals.h` was missing several definitions, like
`TARGET_OS_TV` that are part of SDK 10.12 at least. And one that doesn't
seem to occur in any SDK afaict, `TARGET_OS_EMBEDDED_OTHER`.
I added the definitions from SDK 10.12 verbatim and defined
`TARGET_OS_EMBEDDED_OTHER` to be equal to `0`.
I think none of this works if `darwin.Libsystem` is used to build for
linux or iOS though so maybe this needs a more thorough fix?
This reverts 336d82617f because it's no
longer necessary.