Opened 15 years ago
Closed 14 years ago
#24112 closed enhancement (fixed)
Add clang, checker and lto to llvm
Reported by: | macports@… | Owned by: | erickt@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.2 |
Keywords: | haspatch | Cc: | ryandesign (Ryan Carsten Schmidt), bgrupe27, raimue (Rainer Müller) |
Port: | llvm |
Description
The attached patches add a macports-clang option to portconfigure.tcl and introduce clang, checker, and lto as variants to llvm.
The lto variant is a workaround for missing link time optimization support in odcctools. This workaround enables -flto and -O4 in clang and in the llvm-gcc42 port on darwin9 and darwin10. See #19679 and #23580 for a discussion of this issue.
I'd continue to maintain this port.
Attachments (2)
Change History (10)
Changed 15 years ago by macports@…
Attachment: | portconfigure.tcl.diff added |
---|
Changed 15 years ago by macports@…
Attachment: | Portfile.diff added |
---|
comment:1 Changed 15 years ago by mf2k (Frank Schima)
Cc: | erickt@… removed |
---|---|
Keywords: | haspatch added; llvm lto clang checker removed |
Owner: | changed from macports-tickets@… to erickt@… |
comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
comment:3 Changed 14 years ago by macports@…
I have changed this port quite a bit since I first submitted these patches. The version/revision was upgraded to 2.7_0. The clang and checker variants were moved to a standalone clang port. The lto variant was deleted and instead compilers now have to depend on a new standalone port of ld64, which in turn depends on llvm, to get support for LTO. This seems to be the cleanest solution. See #23580 for more information. No files are installed outside of destroot using this approach.
The latest versions of these ports can be found at https://macports.feiri.eu. This is a subversion repo which can be added to sources.conf.
I didnt know about #15726. Interesting. I do see two .dir files in subdirectories of ${destroot}/lib/llvm/obj. But I dont see how this could be problematic. Of course I can restore the removal these files. Although I wonder if it would be better to just remove the obj directory entirely and instead rebuild llvm inside llvm-gcc42.
comment:4 Changed 14 years ago by macports@…
All ".dir" files get removed now. Additionally a fix for #24807 is included. And I decided to make llvm-mc accessible in ${prefix}/bin. My patchset has grown considerably, so I dont create diffs anymore. The latest version is available from https://macports.feiri.eu/
comment:5 Changed 14 years ago by macports@…
The repository at https://macports.feiri.eu/ now includes fixes for #20889, #16367, #19262, #19679, #20890, #24046, #24112, #24807, #24978, #21059. Some notable enhancements are LTO, ld64, clang, clang++, clang-analyzer, llvm-mc, llvm-gfortran, a libgcc_s variant, and version 2.7 of all llvm components. Additionally the following reports dont seem to apply anymore: #15496, #19087, #20453, #21174, #23580. This should close all tickets related to llvm.
Here is a short guide how to use https://macports.feiri.eu/ as an external repo (assuming you installed macports in /opt/local, which is the default):
- sudo svn co https://macports.feiri.eu /opt/local/var/macports.feiri.eu
- echo file:///opt/local/var/macports.feiri.eu/ | cat - /opt/local/etc/macports/sources.conf > /tmp/sources.conf.bak
- sudo mv /tmp/sources.conf.bak /opt/local/etc/macports/sources.conf
- sudo port selfupdate
- sudo port install clang llvm-gcc42
comment:8 Changed 14 years ago by mfeiri
Resolution: | → fixed |
---|---|
Status: | new → closed |
I'm a little concerned about the lto variant you added, which installs a file outside the destroot, thus violating the mtree. If this is the best way to do it, then at least "destroot.violate_mtree yes" should be used in the variant.
Since this patch changes what files the port installs (since it adds clang and checker variants and makes them default variants), the port revision should be increased.
Doesn't your patch unfix #15726?