path: root/tools/llvm-config
AgeCommit message (Collapse)AuthorFilesLines
2014-04-25Change llvm-config --ldflags to report ${CMAKE_CXX_LINK_FLAGS}Reid Kleckner1-1/+2
Should fix PR19526. When Oscar added this code in the intial CMake build system port, he had a TODO saying that ${CMAKE_SHARED_LINKER_FLAGS} was probably wrong. I agree. I'm using ${CMAKE_CXX_LINK_FLAGS} to point LLVM at my custom installation of gcc 4.recent, so that seems more correct. With this change, I can build creduce against an installed clang, and it picks up the write flags from --ldflags. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-29Windows: canonicalise the default windows tripleSaleem Abdulrasool1-1/+2
Canonicalise the default triple that is used on Windows. This should hopefully fix the MSVC buildbots. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03Don't emit a blank line when running llvm-config --system-libs.Richard Osborne1-18/+20
Summary: Previously llvm-config --system-libs would print something like: $ llvm-config --system-libs -lz -ltinfo -lrt -ldl -lm Now we don't emit blank line. Functionality is unchanged otherwise, in particular llvm-config --libs --system-libs still emits the LLVM libraries and the system libraries on different lines. Reviewers: chapuni Reviewed By: chapuni CC: llvm-commits Differential Revision: git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-23Simplify linking to system librariesNAKAMURA Takumi1-1/+1
The LLVMSupport library implementation consolidates all dependencies on system libraries. Move the logic gathering system libraries out of 'cmake/modules/LLVM-Config.cmake' and into 'lib/Support/CMakeLists.txt'. Use the target_link_libraries() command there to tell CMake about the link dependencies of the LLVMSupport implementation. CMake will automatically propagate this to all targets that link LLVMSupport directly or indirectly. We still need to build knowledge of system library dependencies into 'llvm-config'. Store the list of libraries needed in a property on LLVMSupport and teach 'tools/llvm-config/CMakeLists.txt' to retrieve it from there. Drop all calls to 'link_system_libs' and 'get_system_libs' from our CMake code. Replace their implementations with a warning that explains the calls are no longer necessary. Also drop from 'LLVMConfig.cmake' the HAVE_* and related variables that were published there only to allow 'get_system_libs' to run outside our build process. Contributed by Brad King. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-25llvm-config: Fix typo in help message introduced with r197664.NAKAMURA Takumi1-1/+1
Thanks, Vinson Lee! git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20llvm-config: Show OBJROOT rather than OBJROOT/BUILD_MODE in MakefileStyle.NAKAMURA Takumi1-0/+1
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20llvm-config: Use build_mode instead of LLVM_BUILDMODE. It should be ↵NAKAMURA Takumi1-3/+3
equivalent in MakefileStyle. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19llvm-config: Don't show build tree with --obj-root for installed ↵NAKAMURA Takumi1-1/+1
llvm-config. Show $(prefix) instead. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19llvm-config: Show build root instead of parent path in build tree with ↵NAKAMURA Takumi1-0/+1
--obj-root for CMake multiconfig. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19llvm-config: Introduce --system-libs to print SYSTEM_LIBS, and deprecate ↵NAKAMURA Takumi1-3/+11
SYSTEM_LIBS in --ldflags. Although --system-libs is expected to use after --libs, it can be used alone. $ bin/llvm-config --ldflags -L/path/to/llvm/objroot/lib $ bin/llvm-config --libs object -lLLVMObject -lLLVMSupport $ bin/llvm-config --system-libs (Blank line. "all" is assumed but nothing is printed.) -lrt -ldl -ltinfo -lpthread -lz $ bin/llvm-config --ldflags --libs --system-libs object -L/path/to/llvm/objroot/lib -lLLVMObject -lLLVMSupport -lrt -ldl -ltinfo -lpthread -lz It is reimplementation of r197380, and workaround for PR3347 and PR8449. FIXME: Each LLVM component may have its dependent system libs. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18Revert r197380, "llvm-config: Print SYSTEM_LIBS with --libs, instead of ↵NAKAMURA Takumi1-8/+2
--ldflags." I will introduce another flag, like --system-libs, later. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17llvm-config: Let directories aware of CMAKE_CFG_INTDIR.NAKAMURA Takumi1-7/+9
With llvm-config.exe --bindir --libdir --build-mode, on Visual Studio 2010, In build tree: (OBJ_ROOT)/bin/MinSizeRel (OBJ_ROOT)/lib/MinSizeRel MinSizeRel In installed tree: (INSTALL_PREFIX)/bin (INSTALL_PREFIX)/lib MinSizeRel This is enhancements since r196283. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16llvm-config: Fixup r197380, tweak for cross compilation. SYSTEM_LIBS should ↵NAKAMURA Takumi1-1/+9
be --host's in BuildTools/llvm-config. FIXME: Host's llvm-config is not generated. It's for target's. Host tools, aka "BuildTools", in utils, do not require llvm-config to build. For example with --host=i686-pc-mingw32 --build=linux, $ BuildTools/Release+Asserts/bin/llvm-config --libs support -lLLVMSupport -lpthread -lshell32 -lpsapi -limagehlp -lm git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16llvm-config: Print SYSTEM_LIBS with --libs, instead of --ldflags.NAKAMURA Takumi1-2/+8
LLVM libs are printed in the first line, and system libs are printed in the next line. $ bin/llvm-config --libs object -lLLVMObject -lLLVMSupport -lrt -ldl -ltinfo -lpthread -lz It is workaround for PR3347 and PR8449. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-05Correct word hyphenationsAlp Toker1-2/+2
This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03check-llvm: Ask llvm-config about assertion mode, instead of llc.NAKAMURA Takumi1-0/+7
Add --assertion-mode to llvm-config. It emits ON or OFF according to NDEBUG. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03llvm-config: With --build-mode, show ${CMAKE_CFG_INTDIR} on multiconfig builder.NAKAMURA Takumi2-1/+9
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28cmake: Prevent semicolon separated lists in llvm-config (PR17020)Hans Wennborg1-1/+2
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23CMake: build llvm-config on Windows.Hans Wennborg1-23/+11
It was previously not being built on Windows because the cmake file relied on a sed script to generate a .in file that llvm-config needs. By using cmake's configure_file function, we can get rid off the sed hack, and also have this work on Windows. Differential Revision: git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26Remove unused includes.Rafael Espindola1-1/+0
llvm itself is now PathV1 clean. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26Port GetMainExecutable over to PathV2.Rafael Espindola1-3/+3
I will remove the V1 version as soon as I change clang in the next commit. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-11Include PathV1.h in files that use it.Rafael Espindola1-0/+1
This is preparation for replacing Path.h with PathV2.h. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-01Re-enable support for --program-prefix.Jordan Rose1-1/+1
The Apple buildbots have been modified not to pass --target, so they shouldn't choke on a default program prefix anymore. Patch by Rick Foos! git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26Revert "Add --program-prefix support to build"Jordan Rose1-1/+1
The Apple buildbots are set up to pass --target to configure for both cross- and non-cross-compile builds, and the standard autoconf response to this is to set the program prefix to '<target>-'. Until we can figure out the proper way to handle this (don't pass --target? pass an explicit --program-prefix=""? don't auto-populate program_prefix with target_alias?) it's more important to keep the buildbots running. This reverts r164633 / ba48ceb1a3802e20e781ef04ea2573ffae2ac414. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25Add --program-prefix support to buildSebastian Pop1-1/+1
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15llvm-config: Use sys::fs::equivalent instead of string comparison.Daniel Dunbar1-5/+6
- Hopefully fixes PR11600 (untested). git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-15llvm-build: Add support for non-installed libraries (e.g., gtest).Daniel Dunbar1-5/+18
- These libraries are only reported by llvm-config when run from a development tree. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-09Do not install llvm-config-host for cross-builds of clang. rdar://11317847Bob Wilson1-0/+8
My previous change to install llvm-config-host for cross-builds resulted in that file being installed even when the normal llvm-config was not installed, e.g., when building the install-clang target. Daniel suggested this alternative, which solves the immediate problem and also avoids the gunk in the top-level makefile. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-23An easy case where GCC should really be able to work out that the value is onlyDuncan Sands1-0/+1
used if IsInDevelopmentTree is 'true'. But it doesn't, so help it out. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26llvm-config: Add support for CMake build trees in which the buildPeter Collingbourne1-7/+19
mode does not form part of the path. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-16llvm-config: Fix --targets-built, I changed this to use the registry but wasn'tDaniel Dunbar4-9/+5
properly initializing the target infos. I decided it wasn't worth linking them in for this, so just switched back to using the Makefile variable for now. We can reconsider later if we ever get pluggable targets. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15llvm-config: Update help text for removal of "backend" pseudo component.Daniel Dunbar1-1/+0
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-12llvm-config: Default to "all" if no components are specified.Daniel Dunbar1-0/+4
- Fixes PR11530. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01llvm-config: Replace with C++ version (was llvm-config-2).Daniel Dunbar6-824/+415
- Another reapply of r144300, with hopefully one last fix. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01Revert commit 145449 (ddunbar) since it is breaking the dragonegg buildbots.Duncan Sands6-416/+824
Original commit message: llvm-config: Replace with C++ version (was llvm-config-2). - Reapply of r144300, with lots of fixes/migration easement in between. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29llvm-config: Replace with C++ version (was llvm-config-2).Daniel Dunbar6-824/+416
- Reapply of r144300, with lots of fixes/migration easement in between. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-10Revert r144300 "llvm-config: Replace with C++ version (was llvm-config-2).",Daniel Dunbar6-405/+824
which didn't appear ready for prime time. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-10llvm-config: Replace with C++ version (was llvm-config-2).Daniel Dunbar6-824/+405
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09llvm-config: Drop 'backend' pseudo-component. We don't support/qualify the CBEDaniel Dunbar1-2/+0
enough to have this be useful. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02Add back the top-level target for 'llvm-config' and the dependency edgeChandler Carruth1-0/+7
to force it to build after all library targets so it has complete dependency information. This should fix broken 'make install' with CMake. This is a partial revert of r143540, but it doesn't revert the most important part of that change: removing the dependency edge from LLVM tools to the llvm-config script. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02build/Make: Get rid of llvm-config-perobj, which isn't used anymore.Daniel Dunbar1-44/+0
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02build/CMake: Remove used to serialize tool builds onDaniel Dunbar1-11/+0
llvm-config build, there is no longer a point to this after Chandler's work. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-28Have llvm-config --cppflags print correct flags when in CMake build directoryPeter Collingbourne3-1/+10
Previously, if invoked from a CMake build directory, 'llvm-config --cppflags' and friends would only print a -I flag for the build directory's header search path, because it would assume that it was already installed, not recognising its parent directory as being the build directory. Teach llvm-config about CMake build directories so that it prints a -I for both the source and build directory's search paths. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-18llvm-config: Add an all-targets pseudo-component.Daniel Dunbar1-2/+6
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth1-24/+0
specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05Rename LLVMConfig.cmake to LLVM-Config.cmake. The *Config.cmake namingOscar Fuentes1-1/+1
scheme is used by the functionality related to find_package. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-01CMake: remove debug code from previous commit.Oscar Fuentes1-4/+0
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-01Fix assignment of -fPIC to CMAKE_C_FLAGS. Configure Fuentes1-4/+8
with the contents of CMAKE_C(XX)_FLAGS too, else `llvm-config --c(xx)flags' doesn't tell the absolute truth. This comes from PR9603 and is based on a patch by Ryuta Suzuki! git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19Make configuration more MSYS-friendly.Oscar Fuentes1-9/+10
Some of those POSIX <-> Windows command line conversions ended on failure. git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-19CMake: store TARGET_TRIPLE on Fuentes1-0/+1
git-svn-id: 91177308-0d34-0410-b5e6-96231b3b80d8