summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-config
Commit message (Collapse)AuthorAgeFilesLines
* Update compiler extension integration into the build systemserge-sans-paille2020-06-171-0/+23
| | | | | | | | | | | | The approach here is to create a new (empty) component, `Extensions', where all statically compiled extensions dynamically register their dependencies. That way we're more natively compatible with LLVMBuild and llvm-config. Fixes: https://bugs.llvm.org/show_bug.cgi?id=44870 Differential Revision: https://reviews.llvm.org/D78192 (cherry picked from commit 8f766e382b77eef3102798b49e087d1e4804b984)
* llvm-config: do not link absolute paths with `-l`Saleem Abdulrasool2019-12-031-1/+5
| | | | | | | When dealing with system libraries which are absolute paths, use the absolute path rather than the `-l` option. This ensures that the system library can be properly linked against. This is needed to enable using proper link dependencies in CMake.
* llvm-config: emit the C++ standard flag into CXXFLAGSSaleem Abdulrasool2019-11-011-4/+3
| | | | | | | This recovers the now "missing" flag as this is controlled by CMake rather than injected into the user defined flags list. This is primarily needed by LDC and other out-of-tree users which do not correctly setup the C++ flags.
* [NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txtGabor Buella2019-08-261-3/+3
| | | | | | | | | | | | | | | To avoid the following error message (using cmake version 3.13.4) : ``` CMake Error at tools/llvm-config/CMakeLists.txt:37 (string): Syntax error in cmake code when parsing string-std=[^ ]\+Invalid escape sequence \+ ``` Reviewed By: mgorny Differential Revision: https://reviews.llvm.org/D58619 llvm-svn: 369887
* Fix llvm-config support for CMake build-mode-style buildsJordan Rose2019-08-161-5/+8
| | | | | | | | | | | | At some point we and/or CMake changed our build-mode-style builds from $LLVM_OBJ_ROOT/bin/$CMAKE_CFG_INTDIR/ to $LLVM_OBJ_ROOT/$CMAKE_CFG_INTDIR/bin/ which is way easier to use. But no one updated llvm-config. https://reviews.llvm.org/D66326 llvm-svn: 369129
* Re-commit: r366610 and r366612: Expand pseudo-components before embedding in ↵Daniel Sanders2019-07-192-1/+2
| | | | | | | | | | | | | | | | | llvm-config There were two main problems: * The 'nativecodegen' pseudo-component was unconditionally adding ${native_tgt}CodeGen even though it conditionally added ${native_tgt}Info and ${native_tgt}Desc. This has been fixed by making ${native_tgt}CodeGen conditional too * The 'all' pseudo-component was causing library names like LLVMLLVMDemangle as the expansion was to a library name and not a component. There doesn't seem to be a list of available components anywhere so this has been fixed by moving the expansion of 'all' back where it was before. This manifested in different ways on different builders but it was the same root cause llvm-svn: 366622
* Revert r366610 and r366612: Expand pseudo-components before embedding in ↵Daniel Sanders2019-07-192-2/+1
| | | | | | | | | | llvm-config Some targets are missing LLVMDemangle, one is adding the LLVM prefix twice, and two are hitting the very error this patch fixes for my target. Reverting while I work through the reports. llvm-svn: 366615
* Expand pseudo-components before embedding in llvm-configDaniel Sanders2019-07-192-1/+2
| | | | | | | | | | | | | | | | | | | | Summary: If you use pseudo-targets like AllTargetsCodeGens in LLVM_DYLIB_COMPONENTS then a test will fail because `./bin/llvm-config --shared-mode` can't handle these targets. We can fix this by expanding them before embedding the string into llvm-config Reviewers: bogner Reviewed By: bogner Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65011 llvm-svn: 366610
* [cmake] Add function for building native toolShoaib Meenai2019-04-021-9/+2
| | | | | | | | | | | | | | | | | | Instead of duplicating functionality for building native versions of tblgen and llvm-config, add a function to set up a native tool build. This will also be used for llvm-nm in a follow-up. This should be NFC for tblgen, besides the slightly different COMMENT for the custom command (it'll display the tablegen target name instead of always saying TableGen). For the native llvm-config, it's a behavior change in that we'll use llvm_ExternalProject_BuildCmd instead of constructing the build command manually, always build in Release, and reference the correct binary path for multi-config generators. I believe all of these changes to be bug fixes. Differential Revision: https://reviews.llvm.org/D60024 llvm-svn: 357486
* [cmake] Change deprecated $<CONFIG> to $<CONFIGURATION>. NFCFangrui Song2019-03-301-1/+1
| | | | | | | See rL357338 for a similar change. The informational expression $<CONFIGURATION> has been deprecated since CMake 3.0 llvm-svn: 357348
* Revert 356905Serge Guelton2019-03-251-12/+6
| | | | | | Commited from wrong directory... llvm-svn: 356907
* Python 2/3 compat: queue vs QueueSerge Guelton2019-03-251-6/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D59590 llvm-svn: 356905
* llvm-config: Include -stdlib= in --cxxflagsTom Stellard2019-02-281-1/+2
| | | | | | | | | | | | | | | | | | Summary: This was removed in r349068, but it is needed when llvm is compiled using the non-default c++ standard library on a platform. Reviewers: sylvestre.ledru, infinity0, mgorny, cuviper Reviewed By: sylvestre.ledru Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57859 llvm-svn: 355107
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Don't add unnecessary compiler flags to llvm-config outputTom Stellard2018-12-131-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-config --cxxflags --cflags, should only output the minimal flags required to link against the llvm libraries. They currently contain all flags used to compile llvm including flags like -g, -pedantic, -Wall, etc, which users may not always want. This changes the llvm-config output to only include flags that have been explictly added to the COMPILE_FLAGS property of the llvm-config target by the llvm build system. llvm.org/PR8220 Output from llvm-config when running cmake with: cmake -G Ninja .. -DCMAKE_CXX_FLAGS=-funroll-loops Before: --cppflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings \ -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough \ -Wno-comment -fdiagnostics-color -g -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS \ -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cxxflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include\ -funroll-loops -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall \ -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers \ -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized \ -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment \ -fdiagnostics-color -g -fno-exceptions -fno-rtti -D_GNU_SOURCE -D_DEBUG \ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" After: --cppflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include \ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include \ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS --cxxflags: -I$HEADERS_DIR/llvm/include -I$HEADERS_DIR/llvm/build/include \ -std=c++11 -fno-exceptions -fno-rtti \ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS Reviewers: sylvestre.ledru, infinity0, mgorny Reviewed By: sylvestre.ledru, mgorny Subscribers: mgorny, dmgreen, llvm-commits Differential Revision: https://reviews.llvm.org/D55391 llvm-svn: 349068
* llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)Fangrui Song2018-09-271-1/+1
| | | | | | | | | | | | Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb Subscribers: MatzeB, sanjoy, arsenm, dschuff, mehdi_amini, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, eraman, aheejin, kbarton, JDevlieghere, javed.absar, gbedwell, jrtc27, mgrang, atanasyan, steven_wu, george.burgess.iv, dexonsmith, kristina, jsji, llvm-commits Differential Revision: https://reviews.llvm.org/D52573 llvm-svn: 343163
* [llvm-config] Use WithColor for printing errors.Jonas Devlieghere2018-06-231-7/+9
| | | | | | Use the WithColor helper from support to print errors. llvm-svn: 335417
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-4/+4
| | | | | | | | | | | | | | | | We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272
* [tools] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer the comments section in D44363 for a list of all the required patches. Reviewers: JDevlieghere, zturner, echristo, dberris, friss Reviewed By: echristo Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D45141 llvm-svn: 328943
* Rename llvm library from libLLVM-X.Y to libLLVM-XSylvestre Ledru2018-03-291-1/+1
| | | | | | | | | | | | | | | | | | Summary: As we are only doing X.0.Z releases (not using the minor version), there is no need to keep -X.Y in the version. Like patch https://reviews.llvm.org/D41808, I propose that we rename libLLVM-7.0svn.so to libLLVM-7svn.so This patch will also rename downstream libraries like liblldb-7.0 to liblldb-7 Reviewers: axw, beanz, dim, hans Reviewed By: dim, hans Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D41869 llvm-svn: 328768
* CMake: Make libxml2 show up in --system-libs (PR36660)Hans Wennborg2018-03-091-2/+3
| | | | | | | | | | lib/WindowsManifest/CMakeLists.txt adds it to LLVM_SYSTEM_LIBS on that target, but it was never getting picked up in tools/llvm-config/CMakeLists.txt. Differential Revision: https://reviews.llvm.org/D44302 llvm-svn: 327135
* [cmake] Don't build Native llvm-config when cross compiling if passed by user.Don Hinton2018-01-211-8/+7
| | | | | | | | | | | | Summary: Rename LLVM_CONFIG_EXE to LLVM_CONFIG_PATH, and avoid building it if passed in by user. This is the same way CLANG_TABLEGEN and LLVM_TABLEGEN are handled, e.g., when -DLLVM_OPTIMIZED_TABLEGEN=ON is passed. Differential Revision: https://reviews.llvm.org/D41806 llvm-svn: 323053
* [GlobalISel] Make GlobalISel a non-optional library.Quentin Colombet2017-08-031-5/+1
| | | | | | | | With this change, the GlobalISel library gets always built. In particular, this is not possible to opt GlobalISel out of the build using the LLVM_BUILD_GLOBAL_ISEL variable any more. llvm-svn: 309990
* [Modules] llvm-config: Exclude CMAKE_CFG_INTDIR. It isn't used in headers.NAKAMURA Takumi2017-07-311-0/+6
| | | | | | This is part of https://reviews.llvm.org/D35559 llvm-svn: 309552
* [llvm-config] Don't use PATH_MAXKeno Fischer2017-06-011-1/+1
| | | | | | | | It doesn't exist on Windows. The number we use here doesn't really matter, the storage will expand automatically but 256 seems like a reasonable default. Should fix windows buildbots that complained about rL304458. llvm-svn: 304468
* [llvm-config] Report --bindir based on LLVM_TOOLS_INSTALL_DIRKeno Fischer2017-06-012-1/+4
| | | | | | | | | | | | | | | | | | | Summary: `LLVM_TOOLS_INSTALL_DIR` was introduced in r272200 in order to override the directory name into which to install LLVM's executable. However, `llvm-config --bindir` still reported `$PREFIX/bin` independent of what LLVM_TOOLS_INSTALL_DIR was set to. This fixes the out-of-tree clang standalone build for me. Reviewers: beanz, tstellar Reviewed By: tstellar Subscribers: chapuni, tstellar, llvm-commits Differential Revision: https://reviews.llvm.org/D22499 llvm-svn: 304458
* [CMake] Use variable interpolation instead of string concatenationSerge Pavlov2017-03-221-3/+3
| | | | | | | String concatenation used in r298336 allowed to get rid of extra spaces but also resulted in lost delimiter spaces, so use previous method. llvm-svn: 298498
* Fix evaluation of LLVM_DEFINITIONSSerge Pavlov2017-03-211-3/+3
| | | | | | | | | | | | | | | | CMake variable LLVM_DEFINITIONS collects preprocessor definitions provided for host compiler that builds llvm components. A function add_llvm_definitions was introduced in AddLLVMDefinitions.cmake to keep track of these definitions and was intended to be a replacement for CMake command add_definitions. Actually in many cases add_definitions is still used and the content of LLVM_DEFINITIONS is not actual now. On the other hand the current version of CMake allows getting set of definitions in a more convenient way. This fix implements evaluation of the variable by reading corresponding cmake property. Differential Revision: https://reviews.llvm.org/D31125 llvm-svn: 298336
* [llvm-config] Fix obviously wrong code in parsing DyLib components.Marcello Maggioni2017-01-121-1/+1
| | | | | | | | | | | | | | The code parsing the string was using the offset returned from StringRef::find() wrong, assuming it was relative to the staring offset that is passed to the function, but the returned offset is always relative to the beginning of the line. This causes odd behaviour while parsing the component string. Spotted thanks to the newly added test: tools/llvm-config/booleans.test llvm-svn: 291803
* [llvm-config] Canonicalize CMake booleans to 0/1Michal Gorny2017-01-103-16/+17
| | | | | | | | | | | | | | | | | | | | Following the similar change to lit configuration, ensure that all CMake booleans are canonicalized to 0/1 when being passed to llvm-config. This fixes the incorrect interpretation of values when user passes another value than the ON/OFF, and simplifies the code by removing unnecessary string matching. Furthermore, the code for --has-rtti and --has-global-isel has been modified to print consistent values indepdently of the boolean used by passed by the user to CMake. Sadly, the code already implicitly used different values for the two (YES/NO for --has-rtti, ON/OFF for --has-global-isel). Include tests for all booleans and multi-value options in llvm-config. Differential Revision: https://reviews.llvm.org/D28366 llvm-svn: 291593
* [llvm-config] Print --system-libs only when static linkingMichal Gorny2017-01-061-2/+6
| | | | | | | | | | | | | | | Modify the --system-libs option in llvm-config to print system libs only when using static linking. The system libraries are irrelevant when linking to a shared library since the library has appropriate library dependencies embedded. Modify the --system-libs test appropriately to force static linking, and disable it if static libs are not available (i.e. BUILD_SHARED_LIBS is enabled). Differential Revision: https://reviews.llvm.org/D27805 llvm-svn: 291285
* [llvm-config] Add --cmakedir to obtain CMake module locationMichal Gorny2017-01-061-1/+9
| | | | | | | | | | | | Add a --cmakedir option to llvm-config that returns the correct path to built/installed CMake modules (i.e. lib/cmake/llvm). This is mostly intended as a convenience option for stand-alone builds of other LLVM projects that frequently reconstruct LLVM_CMAKE_PATH after querying llvm-config. Differential Revision: https://reviews.llvm.org/D26894 llvm-svn: 291218
* cmake: Don't build llvm-config and tblgen concurrently in cross buildsJustin Bogner2016-12-211-1/+2
| | | | | | | | | | | | | This sets USES_TERMINAL for the native llvm-config build, so that it doesn't run at the same time as builds of other native tools (namely, tablegen). Without this, if you're very unlucky with the timing it's possible to be relinking libSupport as one of the tools is linking, causing a spurious failure. The tablegen build adopted USES_TERMINAL for this same reason in r280748. llvm-svn: 290271
* [llvm-config] Fixing one check where shared libs implied dylibChris Bieneman2016-12-131-2/+2
| | | | | | We shouldn't print the dylib if LinkDylib is false. llvm-svn: 289609
* llvm-config: Set LinkMode in addition to LinkDyLib when using --ignore-llvmDerek Schuff2016-12-131-2/+3
| | | | | | | | | | | | | | | Summary: LinkDyLib is only used (before arg processing) to set up the default for LinkMode. So reset LinkMode as well, and process before --link-shared or --link-static to allow those flags to continue to override it. Reviewers: beanz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27736 llvm-svn: 289608
* [llvm-config] Add --ignore-libllvmChris Bieneman2016-12-131-0/+3
| | | | | | This flag forces off linking libLLVM. This should resolve some issues reported on llvm-commits. llvm-svn: 289605
* [llvm-config] Fix bug where `--libfiles` and `--names` would produceDan Liew2016-12-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | incorrect output when LLVM is built with `LLVM_BUILD_LLVM_DYLIB`. `llvm-config` previously produced output like this ``` $ llvm-config --libfiles /usr/lib/liblibLLVM-4.0svn.so.so $ llvm-config --libnames liblibLLVM-4.0svn.so.so ``` The library prefix and shared library extension were added to the library name twice which was wrong. I wanted to write a test cases for this but it looks like **all** `llvm-config` tests were disabled by r260386 so I'll leave this for now. Subscribers: llvm-commits, tstellarAMD Reviewers: beanz, DiamondLovesYou, axw Differential Revision: https://reviews.llvm.org/D27393 llvm-svn: 289488
* Replace a few more "fall through" comments with LLVM_FALLTHROUGHJustin Bogner2016-08-171-1/+1
| | | | | | Follow up to r278902. I had missed "fall through", with a space. llvm-svn: 278970
* [llvm-config][GlobalISel] Canonicalize LLVM_HAS_GLOBAL_ISEL on ON/OFF.Quentin Colombet2016-07-211-1/+5
| | | | | | | | | | | Previously LLVM_HAS_GLOBAL_ISEL would directly get the value of LLVM_BUILD_GLOBAL_ISEL. This could be any integer value and not just ON and OFF. The problem is that lit.cfg was checking for ON to define that global-isel was supported, thus if we were setting LLVM_BUILD_GLOBAL_ISEL with an integer value, say 1, this test would fail whereas we do build global-isel and want to test it. llvm-svn: 276307
* [build] Make sure to link main executable with pthreadsArtem Belevich2016-06-211-1/+7
| | | | | | | | | | Otherwise it gets linked in by one of the dependencies of shared libraries which may be too late and we end up with weird crashes in std::call_once(). Differential Revision: http://reviews.llvm.org/D21478 llvm-svn: 273302
* llvm-config: fix --libs on LinuxReid Kleckner2016-03-141-7/+9
| | | | | | | | | | | | | | | | | | | | Summary: llvm-config --libs does not produce correct output since commit r260263 (llvm-config: Add preliminary Windows support) changed naming format of the libraries. This patch updates llvm-config to recognize new naming format and output correct linker flags. Ref: https://llvm.org/bugs/show_bug.cgi?id=26581 Patch by Vedran Miletić Reviewers: ehsan, rnk, pxli168 Subscribers: pxli168 Differential Revision: http://reviews.llvm.org/D17300 llvm-svn: 263497
* [llvm-config] Get rid of code related to the Makefile buildsFilipe Cabecinhas2016-03-081-32/+5
| | | | | | | | | | | | Summary: I left --build-system for backwards compat, in case there are scripts using it. Feel free to ask for its removal too. Reviewers: chapuni, tstellarAMD Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17886 llvm-svn: 262924
* [llvm-config] Teach llvm-config about global-isel.Quentin Colombet2016-03-083-0/+5
| | | | | | | | llvm-config can know tell whether or not a build has been configured to support global-isel. Use '--has-global-isel' for that. llvm-svn: 262877
* llvm-config: replace assertions with a helpful error messageMehdi Amini2016-02-121-0/+8
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 260700
* llvm-config: Fix DLL prefix on cygming.NAKAMURA Takumi2016-02-101-1/+1
| | | | | | For example, LLVMSupport takes the form of LLVMSupport.dll, not libLLVMSupport.dll. llvm-svn: 260351
* llvm-config: Quick fix for cross compilation. Don't be confsed between host ↵NAKAMURA Takumi2016-02-101-1/+1
| | | | | | | and target. It has been there since r252532. FIXME: The clause may use conditions of host compiler, not HOST_TRIPLE. llvm-svn: 260343
* llvm-config: Add preliminary Windows supportEhsan Akhgari2016-02-092-34/+59
| | | | | | | | | | | | | | | | | Summary: This patch adds Windows support for a few of the llvm-config commands, including cflags, ldflags, libs, and system-libs. Currently llvm-config is untested, so this patch adds tests for the commands that it fixes as well. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16762 llvm-svn: 260263
* Remove autoconf supportChris Bieneman2016-01-261-99/+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
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-204-41/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-commit of r257003, which was reverted, along with the fixes from http://reviews.llvm.org/D15986. r252532 added support for reporting the monolithic library when LLVM_BUILD_LLVM_DYLIB is used. This would only be done if the individual components were not found, and the dynamic library is found. This diff extends this as follows: - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared library, even if all component libraries exist. - Two flags, --link-shared and --link-static are introduced to provide explicit guidance. If --link-shared is passed and the shared library does not exist, an error results. Additionally, changed the expected shared library names from (e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an installation (and then only in CMake builds I think?), and not in the build tree; this breaks usage of llvm-config during builds, e.g. by llvm-go. Reviewers: DiamondLovesYou, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15986 llvm-svn: 258283
* Revert r257003Andrew Wilkins2016-01-124-94/+25
| | | | | | | | This revision breaks llvm-config if you set BUILD_SHARED_LIBS=on in a CMake build. Backing out until the fix is ready to land. llvm-svn: 257457
OpenPOWER on IntegriCloud