Commit Graph

53 Commits

Author SHA1 Message Date
Will Dietz
04fb628780 llvm_39: unconditionally apply sigaltstack fix
(as we do on other LLVM builds)
2018-06-23 15:53:43 -05:00
Will Dietz
96cfd14fd2 llvm-3.9: patches to fix w/musl
Mostly same as used with LLVM 4.0
2018-06-23 15:53:43 -05:00
John Ericson
1eacf21bd4 darwin bootstrapping: Avoid overriding aliases for LLVM
Respect the fix points and aliases by overriding originals.
2018-06-14 15:05:18 -04:00
John Ericson
7156f46949 llvm 3.8+: Remove unneeded libcxxabi dependency
Evidentally this hasn't been needed for a while
2018-06-13 21:06:00 -04:00
John Ericson
e358fff0d6 llvm: use native cmake for libc++abi
Finish what 1cb1b9193b started.
2018-06-13 21:02:04 -04:00
Matthew Bauer
1cb1b9193b llvm: use native cmake for libc++abi 2018-06-12 20:36:16 -04:00
John Ericson
d7144e708b Merge remote-tracking branch 'upstream/master' into staging 2018-05-23 16:00:04 -04:00
John Ericson
58fd684c76 llvm: Separate tools and libraries for clarity
Especially provides clarity with respect to cross.
2018-05-23 14:42:06 -04:00
John Ericson
18742471af Merge remote-tracking branch 'upstream/master' into staging
Use newer vagrant from master
2018-05-23 09:40:37 -04:00
John Ericson
acc9843691 llvm: Starting to fix Clang wrapping and stdenv building for cross 2018-05-23 00:42:47 -04:00
John Ericson
25e866a7fe treewide: Less {cc,bintools}-wrapper eta expansion
Also makes the LLVM ones more correct
2018-05-23 00:27:30 -04:00
John Ericson
4f7cdd35d5
Merge pull request #40139 from obsidiansystems/modular-setup-hooks
treewide: Modular setup hooks
2018-05-07 15:32:10 -04:00
John Ericson
2110c0bd30 treewide: Use pkgs/build-support/roles.bash to remove copy pasta
Also fix some setup hooks that unnecessarily used environment hooks,
which revolted in the same variable being modified too many times.
2018-05-07 15:10:37 -04:00
John Ericson
88d18d2e04
Merge pull request #39947 from obsidiansystems/libcxx-cross
lib{std,}c++: Fix setup hooks for cross
2018-05-03 18:20:13 -04:00
John Ericson
39df5831ca lib{std,}c++: Fix setup hooks for cross 2018-05-03 17:55:03 -04:00
Matthew Bauer
9ee69c27c9 llvm: remove libedit from clang
clang should never need libedit. From what I understand this is only
needed by LLDB.

https://github.com/llvm-mirror/clang/search?q=libedit
2018-04-17 09:52:08 -05:00
Matthew Bauer
7b73c7f49a clang: only link if LLVMgold exists
buildEnv now errors with broken symlinks. Lots of things like this
still exist.

Discussion in #39038.
2018-04-17 09:50:21 -05:00
Daiderd Jordan
917429233b
clang: patch cmake files for lib output
Fixes cmake build issues introduced in #33342.
2018-01-16 21:46:43 +01:00
Daiderd Jordan
e66a5f8862
Merge pull request #33342 from LnL7/clang-outputs
clang: add lib output
2018-01-07 09:43:38 +01:00
Daiderd Jordan
812f7714e2
clang: move libclang to separate lib output
Currently clang-unwrapped can't be used as a buildInput without also
shadowing clang/clang++ of a clang based stdenv.
2018-01-02 00:50:01 +01:00
John Ericson
4651407654 darwin stdenv: Make stdenv.cc, not stdenv, bring in libcxx
stdenvNoCC should not inject any C++ standard library, just as it
doesn't inject any C standard library. stdenv still does, but only
indirectly through stdenv.cc. Wrapped clangs can be simplified now that
they don't need to worry about clobbering CoreFoundation when replacing
the C++ standard library implementation.

This generally-good cleanup should assist with debugging some C++
failures in #26805.
2017-12-25 19:32:07 -05:00
John Ericson
2bba929062 bintools-wrapper: Import separately from cc-wrapper 2017-12-13 16:08:18 -05:00
John Ericson
e65259f00c LLVM: Get binutils plugin header from libbfd 2017-11-13 08:46:13 -05:00
aszlig
44cb95a234
llvmPackages/libc++: Fix build against glibc 2.26
This is very similar to what we had in bb0b0822ef.

The xlocale.h header is no longer existing in glibc version 2.26, so we
need to avoid including it.

I've tested building against all of the libcxx attributes of LLVM 3.5,
3.7, 3.8, 3.9, 4 and 5.

All of them succeeded except version 3.5, which failed because of an
unrelated issue (build of libc++abi has failed, one of its
dependencies), so I only verified whether the patch applies cleanly.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @vcunat
2017-11-08 22:08:11 +01:00
Vladimír Čunát
e0a36522a7
llvm 3.7--4: fixup build with glibc-2.26 2017-11-07 09:17:00 +01:00
Dan Peebles
b426c85ce2 Get rid of most @rpath nonsense on Darwin
This requires some small changes in the stdenv, then working around the
weird choice LLVM made to hardcode @rpath in its install name, and then
lets us remove a ton of annoying workaround hacks in many of our Go
packages. With any luck this will mean less hackery going forward.
2017-10-08 16:13:46 -04:00
John Ericson
0d12d040e7 Merge pull request #29402 from obsidiansystems/binutils-output-ref
treewide: Fix some references to binutils
2017-09-14 18:51:12 -04:00
John Ericson
bf7b521500 treewide: Fix some references to binutils
- Compiler's shouldn't use `binutils.dev` as that doesn't yet exist
   with a cross binutils.

 - Last two `binutils.binutils` which weren't reverted
2017-09-14 18:12:54 -04:00
John Ericson
349a09228e Merge pull request #29246 from LnL7/clang-stdenv
clang-stdenv: move libstdcxxHook to cc-wrapper
2017-09-13 16:21:41 -04:00
Daiderd Jordan
ad486c48a6
llvm-packages: apply cc-wrapper/stdenv changes to older versions 2017-09-13 20:51:52 +02:00
John Ericson
5aec3f96a2 treewide: Use *Platform.extensions 2017-09-13 11:16:10 -04:00
Jörg Thalheim
b6bacc4bb2 llvmPackage_{3.4,3.5,3.7,3.8,3.9}: fix output of llvm-config
llvm-config is a tool to output compile and linker flags, when compiling against llvm.

The tool however outputs static library names despite libllvm is build
as shared library on nixos. This was fixed for llvm 3.4, 3.5 and 3.7.

For llvm 3.8 and 3.9 it printed the library extension twice (.so.so).
This was fixed in 4.0 and the patch is backported to 3.8 and 3.9 in
this pull request.

```
$ for i in 34 35 37 38 39; do echo "\nllvm-$i"; nix-shell -p llvmPackages_$i.llvm --run 'llvm-config --libnames'; done

llvm-34
libLLVMInstrumentation.so libLLVMIRReader.so libLLVMAsmParser.so
...

llvm-35
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMipo.so
...

llvm-37
libLLVMLTO.so libLLVMObjCARCOpts.so libLLVMLinker.so libLLVMBitWriter.so
...

llvm-38
libLLVM-3.8.1.so

llvm-39
libLLVM-3.9.so
```

fixes #26713
2017-06-20 10:22:06 +01:00
Joe Hermaszewski
ad778a64d7 LLVM-3.9: formatting 2017-04-29 11:18:25 +00:00
Joe Hermaszewski
7b7ffc4999 LLVM-3.9: disable shared libraries in cross builds
The current cc-wrapper script seems to have trouble setting the rpath
correctly. Hopefully #25047 will fix this.
2017-04-29 11:18:15 +00:00
Joe Hermaszewski
bad5ca0525 LLVM-3.9: Use nativeBuildInputs instead of buildPackages 2017-04-25 22:31:31 +00:00
Joe Hermaszewski
fea424fea3 LLVM-3.9: Fix RPATH in cross compile builds
This error was cause by multiple-outputs.sh not setting
NIX_CROSS_LDFLAGS
2017-04-25 22:25:17 +00:00
Joe Hermaszewski
12bbc63024 llvm-3.9: Fix cross compilation
It's now possible to cross compile llvm:

`nix-build -E '(import ./. { crossSystem = import ./platform.nix; }).pkgs.llvm'`
2017-04-25 19:59:35 +00:00
Joe Hermaszewski
34436df0d0 clang: Use cmake from buildPackages 2017-04-25 19:59:09 +00:00
Vladimír Čunát
c1a9dc3d37
Merge branch 'master' into staging 2017-03-23 13:31:28 +01:00
Dan Peebles
3263d02626 xcbuild: assorted fixes and cleanups
This is in preparation for the LLVM 4 upgrade (which gets more strict
about e.g., return false in xcbuild itself) and also for using xcbuild
more extensively in the Darwin stdenv bootstrap process, which is why I
killed the unnecessary gcc dependency in the toolchain. llvm-cov pretends
to be gcov anyway, so we're fine.
2017-03-21 23:22:15 -04:00
Dan Peebles
f3aeb3b0ab llvm-39: a couple of improvements
Splits outputs in clang like we do in 3.8 and 4.0 to avoid runtime
dependency on Python in the main derivation.

I also disable TSAN on Darwin to maintain consistency with 4.0, which
disables it because it forces an unfree dependency in the stdenv.
2017-03-18 15:08:58 -04:00
Vladimír Čunát
2dba30af72
Merge recent staging
It's almost finished by Hydra now.
2017-02-12 19:51:01 +01:00
Will Dietz
947c26972b LLVM: Fix licensing metadata, closes #22679. (#22681)
* All projects are available under NCSA license,
  other than dragonegg.
* "Runtime" projects are dual-licensed under
  both NCSA and MIT:
  libc++, libc++abi, compiler-rt
* I don't mention MIT for compiler-rt as
  we only build it as part of LLVM.
2017-02-11 23:13:29 +01:00
Vladimír Čunát
f4d1bcb9a7
llvm: fix #22567 oversaturated red icons 2017-02-11 11:03:59 +01:00
Will Dietz
10b8cfbdbd llvm: 3.9.0 -> 3.9.1 2016-12-28 12:56:55 -06:00
Vladimír Čunát
b67ae8b33c
llvmPackages*.lldb: fixup input by disabling libedit
Fixes #20773.  https://llvm.org/bugs/show_bug.cgi?id=28898
Of course, feel free to find a better solution.

I love this copy&paste :-/
2016-11-28 19:02:15 +01:00
Shea Levy
be02229f06 Add libcxxStdenv attribute to recent llvm package sets 2016-10-25 10:29:40 -04:00
Anthony Cowley
0f6ef7c41c llvm_39: fix on darwin 2016-10-19 01:53:13 -04:00
Aneesh Agrawal
c04e46c87d llvm3.9: Remove -DCMAKE_BUILD_TYPE=Release flags
Since commit 183d05a in 2012, this is the default.
2016-10-01 13:55:42 -04:00
Vladimír Čunát
d2965a7d85 llvm-3.9: move shared libLLVM to a separate output
Fixes #18840: too large closure of mesa_drivers.

Tested atop 16.09:
 - clang compiles a hello-world app;
 - mesa seems to link OK;
 - ispc builds.

Size comparison:
 - 80 MB of full llvm-3.7 on 16.03;
 - 200 MB of full llvm-3.9 on 16.09 before this patch;
 - 50 MB of libLLVM after this commit.
2016-09-24 18:32:45 +02:00