summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-shlib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"Steven Wu2016-05-261-11/+0
| | | | | | This reverts r270723. This commit breaks greendragon. llvm-svn: 270820
* [CMake] LINK_LIBS need to be public for Darwin dylib targetsChris Bieneman2016-05-251-0/+11
| | | | | | This should actually address PR27855. This results in adding references to the system libs inside generated dylibs so that they get correctly pulled in when linking against the dylib. llvm-svn: 270723
* [CMake] If set we should pass LLVM_VERSION_INFO into config.hChris Bieneman2016-04-251-2/+0
| | | | | | | | Autoconf used to support setting LLVM_VERSION_INFO and there is some code filtered around llvm in Support/CommandLine.cpp and LTO/LTOCodeGenerator.cpp that uses it if it is set. We also shouldn't be explicitly setting it as a define on llvm-shlib. It is pointless there because there is no code using it in llvm-shlib, and it is better to have it as part of the generated config.h so that it is available everywhere. llvm-svn: 267490
* llvm-shlib: Remove the option to override __cxa_atexitJustin Bogner2016-03-141-7/+0
| | | | | | | | | | | | | | If anybody is actually using this, it probably doesn't do what they think it does. This actually causes the dylib to *export* a __cxa_atexit symbol, so anything that links it probably loses their exit time destructors as well as disabling LLVM's. This just removes the option entirely. If somebody does need this behaviour we should figure out a more principled way to do it. This is effectively a revert of r223805. llvm-svn: 263498
* Remove autoconf supportChris Bieneman2016-01-261-116/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* [CMake] Bug 25059 - CMake libllvm.so.$MAJOR.$MINOR shared object name not ↵Chris Bieneman2015-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | compatible with ldconfig Summary: This change makes the CMake build system generate libraries for Linux and Darwin matching the makefile build system. Linux libraries follow the pattern lib${name}.${MAJOR}.${MINOR}.so so that ldconfig won't pick it up incorrectly. Darwin libraries are not versioned. Note: On linux the non-versioned symlink is generated at install-time not build time. I plan to fix that eventually, but I expect that is good enough for the purposes of fixing this bug. Reviewers: loladiro, tstellarAMD Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D13841 llvm-svn: 252093
* [CMake] Get rid of LLVM_DYLIB_EXPORT_ALL, and make it the default, add ↵Chris Bieneman2015-10-271-40/+41
| | | | | | | | | | | | | | | | | | | libLLVM-C on darwin to cover the C API needs. Summary: We've had a lot of discussion in the past about the meaningful and useful default behaviors for the llvm-shlib tool. The original implementation was heavily geared toward Apple's use, and I think that was wrong. This patch seeks to correct that. I've removed the LLVM_DYLIB_EXPORT_ALL variable and made libLLVM export everything by default. I've also added a new target that is only built on Darwin for libLLVM-C as a library that re-exports the LLVM-C API. This library is not built on Linux because ELF doesn't support re-export libraries in the same way MachO does. Reviewers: chapuni, resistor, bogner, axw Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13842 llvm-svn: 251411
* [CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libLTO and ↵Chris Bieneman2015-10-141-1/+1
| | | | | | | | libLLVM. This is to match autoconf where LLVM_SUBMIT_SUBVERSION is usually set to ${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}. llvm-svn: 250277
* [CMake] libLLVM's compatibility version should be 1.Chris Bieneman2015-10-131-1/+1
| | | | | | This is in matching with the autoconf build system. llvm-svn: 250244
* [CMake] If LLVM_DYLIB_EXPORT_ALL is On don't generate an export list at all, ↵Chris Bieneman2015-10-091-18/+10
| | | | | | | | just export the world. This should resolve Bug 24157 - CMake built shared library does not export all public symbols llvm-svn: 249862
* [cmake] rework LLVM_LINK_LLVM_DYLIB option handlingAndrew Wilkins2015-09-051-47/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This diff attempts to address the concerns raised in http://reviews.llvm.org/D12488. We introduce a new USE_SHARED option to llvm_config, which, if set, causes the target to be linked against libLLVM. add_llvm_utility now uniformly disables linking against libLLVM. These utilities are not intended for distribution, and this keeps the option handling more centralised. llvm-shlib is now processes before any other "tools" subdirectories, ensuring the libLLVM target is defined before its dependents. One main difference from what was requested: llvm_config does not prune LLVM_DYLIB_COMPONENTS from the components passed into explicit_llvm_config. This is because the "all" component does something special, adding additional libraries (namely libLTO). Adding the component libraries after libLLVM should not be a problem, as symbols will be resolved in libLLVM first. Finally, I'm not really happy with the DISABLE_LLVM_LINK_LLVM option, but I'm not sure of a better way to get the following: - link all tools and shared libraries to libLLVM if LLVM_LINK_LLVM_DYLIB is set - some way of explicitly *not* doing so for utilities and libLLVM itself Suggestions for improvement here are particularly welcome. Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12590 llvm-svn: 246918
* Enable linking tools, shared libraries against libLLVMAndrew Wilkins2015-09-011-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Three closely related changes, to have a mode in which we link all executables and shared libraries against libLLVM. 1. Add a new LLVM_LINK_LLVM_DYLIB cmake option, which, when ON, will link executables and shared libraries against libLLVM. For this to work, it is necessary to also set LLVM_BUILD_LLVM_DYLIB and LLVM_DYLIB_EXPORT_ALL. It is not strictly necessary to set LLVM_DISABLE_LLVM_DYLIB_ATEXIT, but we also default to OFF in this mode, or tools tend to misbehave (e.g. stdout may not flush on exit when output is buffered.) llvm-config and Tablegen do not use libLLVM, as they are dependencies of libLLVM. 2. Modify llvm-go to take a new flag, "linkmode=component-libs|dylib". Depending on which one is passed (default is component-libs), we link with the individual libraries or libLLVM respectively. We pass in dylib when LLVM_LINK_LLVM_DYLIB is ON. 3. Fix LLVM_DYLIB_EXPORT_ALL on Linux, and expand the symbols exported to actually export all. Don't strip leading underscore from symbols on Linux, and make sure we get all exported symbols and weak-with-default symbols ("W" in nm output). Without these changes, passes won't load because the "Annotate..." symbols defined in lib/Support/Valigrind.cpp are not found. Testing: - Ran default build ("ninja") with LLVM, clang, compiler-rt, llgo, lldb. - Ran "check", "check-clang", "check-tsan", "check-libgo" targets. I've never had much success with LLDB tests, and llgoi is currently broken so check-llgo fails for an unrelated reason. - Ran "lldb" to ensure it loads. Reviewers: chandlerc, beanz, pcc, rnk Subscribers: rnk, chapuni, sylvestre.ledru, llvm-commits Differential Revision: http://reviews.llvm.org/D12488 llvm-svn: 246527
* [PM/AA] Remove the last relics of the separate IPA library from LLVM,Chandler Carruth2015-08-181-1/+0
| | | | | | | | | | | | | | | | | | | | | folding the code into the main Analysis library. There already wasn't much of a distinction between Analysis and IPA. A number of the passes in Analysis are actually IPA passes, and there doesn't seem to be any advantage to separating them. Moreover, it makes it hard to have interactions between analyses that are both local and interprocedural. In trying to make the Alias Analysis infrastructure work with the new pass manager, it becomes particularly awkward to navigate this split. I've tried to find all the places where we referenced this, but I may have missed some. I have also adjusted the C API to continue to be equivalently functional after this change. Differential Revision: http://reviews.llvm.org/D12075 llvm-svn: 245318
* [CMake] Add missing DebugInfo libraries to llvm-shlibKeno Fischer2015-07-131-0/+2
| | | | | | | | | | Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11128 llvm-svn: 242054
* Updating symbol wildcards one more time.Chris Bieneman2015-04-161-1/+1
| | | | | | This should catch all C++ symbols containing llvm in the name. llvm-svn: 235136
* Properly escaping the quotes so that bash doesn't do stupid things with the ↵Chris Bieneman2015-04-161-1/+1
| | | | | | wildcards. llvm-svn: 235127
* Fixing llvm-shlib's LLVM_DYLIB_EXPORT_ALL to work with Darwin fat binaries.Chris Bieneman2015-04-161-25/+27
| | | | llvm-svn: 235114
* [CMake] Updates to llvm-shlib to support overriding exports list and added ↵Chris Bieneman2015-04-131-10/+21
| | | | | | an option to export all symbols. llvm-svn: 234798
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-03-231-1/+1
| | | | | | This commit is in reference to the llvm-dev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/083672.html llvm-svn: 233008
* Revert "Raising minimum required CMake version to 2.8.12.2."Tobias Grosser2015-02-241-1/+1
| | | | | | | | | | | This reverts commit r230062. Debian stable (wheezy) ships still with cmake 2.8.9. The commit broke my LLVM/Polly buildbot, to my knowledge our only Linux+cmake buildbot. llvm-svn: 230343
* Revert "Revert "Raising minimum required CMake version to 2.8.12.2.""Chad Rosier2015-02-231-1/+1
| | | | | | This reverts commit r230240, which was an accidental commit. llvm-svn: 230246
* Revert "Raising minimum required CMake version to 2.8.12.2."Chad Rosier2015-02-231-1/+1
| | | | | | This reverts commit 247aed4710e8befde76da42b27313661dea7cf66. llvm-svn: 230240
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-02-201-1/+1
| | | | llvm-svn: 230062
* Fixing a CMake developer warning.Chris Bieneman2015-02-181-1/+3
| | | | llvm-svn: 229721
* [cmake] Start making LLVM_LIBDIR_SUFFIX effective by adding it toChandler Carruth2014-12-291-1/+1
| | | | | | | | | | | | | | | | | *numerous* places where it was missing in the CMake build. The primary change here is that the suffix is now actually used for all of the lib directories in the LLVM project's CMake. The various subprojects still need similar treatment. This is the first of a series of commits to try to make LLVM's cmake effective in a multilib Linux installation. I don't think many people are seriously using this variable so I'm hoping the fallout will be minimal. A somewhat unfortunate consequence of the nature of these commits is that until I land all of them, they will in part make the brokenness of our multilib support more apparant. At the end, things should actually work. llvm-svn: 224919
* Adding a new option to CMake to disable C++ atexit on llvm-shlib.Chris Bieneman2014-12-091-0/+7
| | | | | | | | | | | | | | | | | Summary: This is desirable for WebKit and other clients of the llvm-shlib because C++ exit time destructors have a tendency to crash when invoked from multi-threaded applications. Ideally this option will be temporary, because the ideal fix is to just not have exit time destructors. Reviewers: chapuni, ributzka Reviewed By: ributzka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6572 llvm-svn: 223805
* [CMake] llvm-shlib: Prune redundant components, AsmPrinter, MC, and ↵NAKAMURA Takumi2014-11-111-3/+0
| | | | | | SelectionDAG. llvm-svn: 221675
* [CMake] Let llvm-shlib work on Linux with --whole-archive.NAKAMURA Takumi2014-11-101-4/+10
| | | | | | | | | | | | | | | | | | | | | | FIXME: It should work on not only Linux but elf-targeting gnu ld. For example if LLVM_DYLIB_COMPONENTS is "BitWriter Support", CMake emits the command line like; -Wl,--whole-archive lib/libLLVMBitWriter.a lib/libLLVMSupport.a *1 -Wl,--no-whole-archive lib/libLLVMCore.a lib/libLLVMSupport.a *2 -lrt -ldl -ltinfo -lpthread -lm It works since symbols in LLVMCore is resolved with not *2 but *1. Unfortunately, --gc-sections is not powerful in this case to prune unused "visibility(default)" entries. I am still experimenting other way not to rely on --whole-archive. llvm-svn: 221591
* [CMake] llvm-shlib: Add possibly missing BitReader and MCDisassembler for ↵NAKAMURA Takumi2014-11-081-0/+2
| | | | | | | | | | | | llvm-c. FYI, 3 modules below are redundant in trunk; AsmPrinter MC SelectionDAG llvm-svn: 221579
* Adding llvm-shlib to CMake build system with a few new bells and whistlesChris Bieneman2014-10-232-0/+108
| | | | | | | | | | | | | | | | | Summary: This patch adds a new CMake build setting LLVM_BUILD_LLVM_DYLIB, which defaults to OFF. When set to ON, this will generate a shared library containing most of LLVM. The contents of the shared library can be overriden by specifying LLVM_DYLIB_COMPONENTS. LLVM_DYLIB_COMPONENTS can be set to a semi-colon delimited list of any LLVM components that you llvm-config can resolve. On Windows, unless you are using Cygwin, you must specify an explicit symbol export file using LLVM_EXPORTED_SYMBOL_FILE. On Cygwin and all unix-like platforms if you do not specify LLVM_EXPORTED_SYMBOL_FILE, an export file containing only the LLVM C API will be auto-generated from the list of LLVM components specified in LLVM_DYLIB_COMPONENTS. Reviewers: rnk Reviewed By: rnk Subscribers: rnk, llvm-commits Differential Revision: http://reviews.llvm.org/D5890 llvm-svn: 220490
* Revert of 214418:Sylvestre Ledru2014-08-011-5/+0
| | | | | | | | | "Create a default symver on Linux like ELF OSes." Fails the build under Debian with ld.gold: /usr/bin/ld.gold: --default-symver: unknown option llvm-svn: 214482
* Create a default symver on Linux like ELF OSes.Eric Christopher2014-07-311-0/+5
| | | | | | Patch by Adam Jackson. llvm-svn: 214418
* autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)Tom Stellard2014-05-131-2/+2
| | | | | | | | | | | | | We were using libLLVM-Major.Minor.Patch.so for the soname, but we need the soname to stay consistent for all Major.Minor.* releases otherwise operating system distributors will need to rebuild all packages that link with LLVM every time there is a new point release. This patch also reverses the compatibility symlink, so libLLVM-Major.Minor.Patch.so is now a symlink that points to libLLVM-Major-Minor.so. llvm-svn: 208721
* Revert "autoconf: Fix soname for libLLVM-Major.Minor.so"Tom Stellard2014-05-131-2/+2
| | | | | | | | | This reverts commit r208708. I forgot to run make clean before testing this and it broke tools linking. llvm-svn: 208709
* autoconf: Fix soname for libLLVM-Major.Minor.soTom Stellard2014-05-131-2/+2
| | | | | | | | | | | | | We were using libLLVM-Major.Minor.Patch.so for the soname, but we need the soname to stay consistent for all Major.Minor.* releases otherwise operating system distributors will need to rebuild all packages that link with LLVM every time there is a new point release. This patch also reverses the compatibility symlink, so libLLVM-Major.Minor.Patch.so is now a symlink that points to libLLVM-Major-Minor.so. llvm-svn: 208708
* Add patch level to llvm version in CMake and AutoconfTom Stellard2014-03-031-0/+2
| | | | | | | | | | The shared library generated by autoconf will now be called libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)$(VERSION_SUFFIX).so and a symlink named libLLVM-$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_SUFFIX).so will also be created in the install directory. llvm-svn: 202720
* Centralize the handling of install_name and rpath.Rafael Espindola2014-02-281-8/+0
| | | | | | | | | | | This centralizes the Makefile handling of -install_name and -rpath. It also moves the cmake build to using @rpath. The reason being that libclang needs it, and it works for everything else. A followup patch will move clang to using this and then there will be a single point to edit to support other systems. llvm-svn: 202499
* Strip dead code when linking by default with BFD ld (linux, ...) and ld64 ↵Nico Weber2013-12-271-3/+0
| | | | | | | | | | | | | (os x). This reduces the size of clang-format from 22 MB to 1.8 MB, diagtool goes from 21 MB to 2.8 MB, libclang.so goes from 29 MB to 20 MB, etc. The size of the bin/ folder shrinks from 270 MB to 200 MB. Targets that support plugins and don't already use EXPORTED_SYMBOL_FILE (which libclang and libLTO already do) can set NO_DEAD_STRIP to opt out. llvm-svn: 198087
* Rules adjustments in order to build on DragonFly BSD.Rafael Espindola2013-10-311-2/+2
| | | | | | Patch by Robin Hahling. llvm-svn: 193750
* Use @rpath for libraries rather than @executable_path on OSX.Eric Christopher2013-08-021-1/+1
| | | | | | Patch by Benjamin Scarlet! llvm-svn: 187641
* The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.Sylvestre Ledru2013-07-011-3/+3
| | | | | | | | | | | | | | | | | This kind of simplification is sometimes useful, but in general it's not correct. As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the build definitions used for FreeBSD, whereas for userland-related issues we want to match the definitions used for other systems with Glibc. The current modification adjusts the build system so that they can be distinguished, and explicitly adds GNU/kFreeBSD to the build checks in which it belongs. Fixes bug #16444. Patch by Robert Millan in the context of Debian. llvm-svn: 185311
* Remove "-Wl,-seg1addr -Wl,0xE0000000" from link options.Bob Wilson2013-06-041-2/+1
| | | | | | | | Specifying the load address for Darwin i386 dylibs was a performance optimization for dyld that is not relevant for x86_64 or arm. We can just remove this now. llvm-svn: 183230
* Add support for the OpenBSD for Bitrig.Eric Christopher2012-08-061-1/+1
| | | | | | Patch by David Hill. llvm-svn: 161344
* openbsd doesn't support soname, patch by Brad Smith!Chris Lattner2012-04-251-0/+3
| | | | llvm-svn: 155536
* Fix the build under Debian GNU/Hurd.Sylvestre Ledru2012-04-111-2/+2
| | | | | | Thanks to Pino Toscano for the patch llvm-svn: 154500
* Set soname for FreeBSD as well.Anton Korobeynikov2012-04-031-2/+2
| | | | | | Patch by Bernard Cafarelli! llvm-svn: 153965
* Add soname to LLVM shared library on Linux. Probably the same stuff is ↵Anton Korobeynikov2012-03-231-0/+2
| | | | | | | | necessary for *BSD. Patch from Mageia! llvm-svn: 153324
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-181-4/+4
| | | | | | new all-targets pseudo-component. llvm-svn: 142401
* Exclude libLLVMTableGen.a from the shared libraryPeter Collingbourne2011-10-041-2/+3
| | | | | | Unbreaks tools for --enable-shared build. llvm-svn: 141052
* improve solaris support, from PR9109, patch by Yuri!Chris Lattner2011-02-131-0/+5
| | | | llvm-svn: 125456
OpenPOWER on IntegriCloud