Commit Graph

817 Commits

Author SHA1 Message Date
Oscar Fuentes
a447cfea45 CMake: Pass -lm to check_symbol_exists for detecting several math
functions like floorf, ceilf, ... Add test for detecting nearbyintf.

This change was prompted by test/Transforms/SimplifyLibCalls/floor.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86954 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 05:36:09 +00:00
Douglas Gregor
8781416858 CMake: Add Darwin-specific linker flags for building loadable modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 15:30:33 +00:00
Oscar Fuentes
c5e1ae1313 CMake: Support for building llvm loadable modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 02:45:37 +00:00
Oscar Fuentes
3171f33bc2 CMake: Remove unnecessary `unset' which was not supported by old cmake
releases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10 01:45:05 +00:00
Oscar Fuentes
6a660d4a43 CMake: Detect gv, circo, twopi, neato, fdo, dot and dotty.
Patch by Arnaud Allard de Grandmaison!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 15:26:40 +00:00
Daniel Dunbar
5ba331a2ae Fix CMake reporting of target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:52:27 +00:00
Daniel Dunbar
e9b88e4440 Stop running get_target_triple more than we need to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86418 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:52:20 +00:00
Oscar Fuentes
b5b10c25f7 CMake: Detect dotty.
Patch by Arnaud Allard de Grandmaison!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 19:03:26 +00:00
Oscar Fuentes
20f17149a8 CMake: do not test for pthread and dl libraries on Windows (except
Cygwin). Fixes PR 5368.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 18:57:56 +00:00
Oscar Fuentes
d442ab87b3 CMake: Report an error if there is an unknown .cpp file in a source
directory.

This is useful in case someone who works with the config&make build
system forgot to add a file to its CMakeLists.txt. Instead of
obtaining undefined references at link time, cmake will complain at
configure time on the first build after a svn update.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85817 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-02 19:11:03 +00:00
Benjamin Kramer
74b691e4e4 Teach cmake that mk[sd]temp is defined in stdlib.h on some systems.
This fixes parallel build with clang on glibc platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28 18:37:31 +00:00
Chandler Carruth
8b67f774e9 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 01:35:46 +00:00
Daniel Dunbar
d1478006d2 Update CMake dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-24 20:32:43 +00:00
Oscar Fuentes
8e6323c8b9 Updated cmake library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 23:00:00 +00:00
Edward O'Callaghan
c6cf5fe595 Fix LLVM CMake build system so that it may now work on Solaris and AuroraUX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 04:00:11 +00:00
Edward O'Callaghan
a2c7535e64 CMake misses a check for sbrk on NetBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-05 23:05:32 +00:00
Douglas Gregor
9c091a4846 Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-01 17:25:36 +00:00
Jeffrey Yasskin
b7a8d400be Fix a compile failure introduced by r82675 on MinGW which doesn't have
setenv().  This patch just disables the test rather than getting putenv() to
work.  Thanks to Sandeep Patel for reporting the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25 21:07:20 +00:00
Daniel Dunbar
e443525f35 Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 00:06:48 +00:00
Daniel Dunbar
5ea51ade50 Update CMake dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14 05:22:54 +00:00
Oscar Fuentes
a9ff1392ea CMake: New user-settable variable LLVM_TARGET_ARCH useful when
cross-compiling.

Patch by Xerxes Rånby!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81722 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13 22:18:38 +00:00
Daniel Dunbar
c1f329bf2b Update lib deps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 05:07:44 +00:00
Oscar Fuentes
b0fc781115 CMake: updated library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 01:58:50 +00:00
Gabor Greif
4c75054b01 re-apply r80197, now that iterator.h is not mentioned any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 17:07:35 +00:00
Bill Wendling
fffb7266fe --- Reverse-merging r80147 into '.':
A    include/llvm/ADT/iterator.cmake
U    autoconf/configure.ac
--- Reverse-merging r80161 into '.':
U    cmake/config-ix.cmake
--- Reverse-merging r80171 into '.':
U    Makefile
--- Reverse-merging r80173 into '.':
U    configure
U    include/llvm/Config/config.h.in
--- Reverse-merging r80180 into '.':
A    include/llvm/ADT/iterator.h.in

Despite common miscomceptions, iterator.h is alive and well. It broke the build
bots for several hours. And yet no one bothered to look at them.

Gabor and Doug, please review your changes and make sure that they actually
build before resubmitting them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-27 03:29:26 +00:00
Douglas Gregor
c33e696477 De-bork CMake build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 22:12:02 +00:00
Oscar Fuentes
e1e3aaf0ac Ignore -fPIC test on Windows. Suggested by Yonggang Luo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 17:05:06 +00:00
Daniel Dunbar
87cbef0df0 Remove alloca config.h support.
- I did not actually remove the configure test itself, someone who can
   regenerate configure should do this (see FIXME in autoconf/configure.ac)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 02:14:39 +00:00
Oscar Fuentes
e029305bb0 CMake: Updated library dependencies and list of source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 23:59:15 +00:00
Douglas Gregor
66aa9b1c2f CMake: Don't use copy_if_different for TableGen output, because it does not work with IDE targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-22 07:00:18 +00:00
Duncan Sands
dfcb9bfcc0 Fix cmake build on non-x86 targets. Patch by
Xerxes Rånby.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 12:41:52 +00:00
Oscar Fuentes
4113f2e1f1 CMake: Updated library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79223 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 04:23:50 +00:00
Oscar Fuentes
22624b1d8e CMake: LLVMConfig assigns LLVMX86 to the `native' component
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 01:41:46 +00:00
Oscar Fuentes
c23a8d133c CMake: Discriminate MINGW, MSYS, CYGWIN: does not try to build llvm-config under mingw without msys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79202 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 20:50:41 +00:00
Benjamin Kramer
0bbbf7ecae Fix the MSVC build again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 09:44:27 +00:00
Oscar Fuentes
69e973d79b CMake: Hopefully this will fix the build on VS. I can't replicate the
failure with VS 9.0, nmake and cmake 2.6.4. The buildbot output does
not show the patch level of cmake, it just says 2.6.

Sadly, parallel builds are broken due to recent changes on LLVM Target
libraries and its auxiliaries (TargetInfo, AsmPrinter, AsmParser). I
have a patch for stablishing the correct dependencies, but cmake is
buggy and generates makefiles that can't handle them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 07:44:02 +00:00
Oscar Fuentes
b78829ee38 CMake: Revert r79144. It reverted a change necessary for correct
parallel builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-16 05:16:43 +00:00
Benjamin Kramer
04ef5428cd Revert 78996. It was breaking MSVC builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 21:57:01 +00:00
Richard Osborne
1c8c15f6d2 Move XCore AsmPrinter to XCore/AsmPrinter directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-15 12:53:15 +00:00
Oscar Fuentes
9c546cd946 CMake: Updated library dependence info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 20:30:18 +00:00
Oscar Fuentes
94d38e561b CMake: Automatic regeneration of the library dependencies file.
It doesn't stop or reconfigure the build, though, so the user will see
a broken build that magically succeeds at the next attempt. It is
technically possible to halt the build with a helpful message, and
even to automatically restart the build using the new dependencies as
it we did when llvm-config was used by cmake for learning
dependencies. This is left on the TODO list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 16:59:41 +00:00
Oscar Fuentes
3d3ed36572 CMake: Builds main LLVM Target library before its sublibraries. This
way we ensure that tablegenned files exist before they are #include'd
by the LLVM Target sublibraries. Required for parallel builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78996 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 05:17:24 +00:00
Oscar Fuentes
d8b1b9a3c1 CMake: Use LLVM_COMMON_DEPENDS on add_llvm_executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 04:38:57 +00:00
Oscar Fuentes
5905bc4fd3 CMake: updated library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-14 01:55:28 +00:00
Oscar Fuentes
c16f16505a CMake: Fixed sed script for translating library dependencies from
LibDeps.txt format to LLVMLibDeps.cmake format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 04:18:10 +00:00
Oscar Fuentes
fdb9677ae9 CMake: Localized dependency on Perl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78788 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 04:16:19 +00:00
Oscar Fuentes
8e3864f99c CMake: Rely on llvm_config again for obtaining the list of required
libraries for an executable.

Now LLVMConfig uses a new system for sorting library dependencies, as
the list of dependent libraries for each entry of FinalLibDeps.txt no
longer is topologically sorted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 04:05:26 +00:00
Oscar Fuentes
9bbdf64c98 CMake: updated library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 03:57:26 +00:00
Oscar Fuentes
f2a5e95cba CMake: cmake/modules/LLVMLibDeps.cmake: Use unix line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 03:36:43 +00:00
Oscar Fuentes
b034cc4058 CMake: Moved hard-coded library dependencies to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78784 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 03:32:44 +00:00
Oscar Fuentes
9f817031f1 CMake: target triple for MSVC on Windows 64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-12 00:04:12 +00:00
Douglas Gregor
a4e3879339 CMake configuration: find mkdtemp, mkstemp, mktemp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:23:41 +00:00
Dan Gohman
d2cb3d2c32 Remove the IA-64 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:30:09 +00:00
Daniel Dunbar
092a9dda2d Sketch support for target specific assembly parser.
- Not fully enabled yet, need a configure regeneration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:42:00 +00:00
Xerxes Ranby
6215c6227e Implement cmake LLVM_MULTITHREADED gcc atomic builtin checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76221 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:22:41 +00:00
Daniel Dunbar
3434312a17 Regerate CMake library dependencies.
- Added a sed script to do this in the comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 00:43:36 +00:00
Daniel Dunbar
fef02e9af2 Kill off cmake magic to force linking.
- This isn't needed anymore, we require clients to call the appropriate
   initialization routines using TargetSelect.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 00:35:05 +00:00
Daniel Dunbar
ab52ae8388 Tweak CMake component lookup, I misunderstood what was happening here.though. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 07:52:36 +00:00
Daniel Dunbar
8cca8f98bb Teach Makefiles & CMake to link in the <TARGET>Info library when linking the
TARGET component.
 - Also, updated some CMake library dependencies, it is still missing some
   though. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 07:43:34 +00:00
Oscar Fuentes
d97ea308ed CMake: tablegen: Add .td files under the inlude/llvm directory
hierarchy to the list of dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 21:35:00 +00:00
Jeffrey Yasskin
ed1c0ffe0b Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
Windows variant, strerror_s, but I couldn't test that.

I'll update configure and config.h.in in a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 18:11:20 +00:00
Douglas Gregor
48715a17c1 Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-29 16:25:22 +00:00
Douglas Gregor
c7077c7015 CMake: add configure checks for pthread_rwlock_init and pthread_getspecific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26 14:35:43 +00:00
Douglas Gregor
4b73893d82 Add missing dependencies to the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-25 05:03:06 +00:00
Douglas Gregor
343beeb386 Reinstate target dependencies on Table_gen targets in CMake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 21:05:21 +00:00
Douglas Gregor
8756a8db5b CMake: remove support for llvm-config-generated dependencies in the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:30:17 +00:00
Douglas Gregor
bb3231f7c4 Eliminate some unused code in CMa'e add_llvm_target. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:58:51 +00:00
Douglas Gregor
7e9e36a23e Eliminate object-relinking support from CMake. Fixes PR 4429 and
cleans up the CMake-based build system a bit. Started by a patch from
Xerxes Rånby.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 17:57:35 +00:00
Douglas Gregor
e9d683b052 Define LLVM_NATIVE_ARCH in CMake, so that lli can actually JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 17:01:56 +00:00
Oscar Fuentes
af0f65fe6a CMake: New variable LLVM_LIBDIR_SUFFIX.
Patch by Ingmar Vanhassel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-12 02:49:53 +00:00
Oscar Fuentes
99b94892f5 CMake: Fixed parallel build problem related to native tblgen when
cross-compiling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-11 04:16:10 +00:00
Douglas Gregor
318de60701 More portability checks for CMake's config.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 23:46:34 +00:00
Douglas Gregor
8eeb96d2d5 CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
the CMake-generated Xcode project build properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 19:53:37 +00:00
Douglas Gregor
ef23d711bc Properly detect malloc_zone_statistics in CMake build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 17:22:52 +00:00
Oscar Fuentes
1a53cbfb4a CMake: Set LIBS on llvm-config so we can query the system libraries
used by CMake with --ldflags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-27 15:49:33 +00:00
Oscar Fuentes
db917fe8aa CMake: Use libdl only when available. Fixes build on FreeBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72311 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-23 02:37:24 +00:00
Douglas Gregor
071d73d67e termios.h contains the winsize structure we need to determine the
width of a terminal. Don't try to get the width of a terminal if we
don't have this header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-18 17:21:34 +00:00
Douglas Gregor
01746745f1 Add terminal width detection to llvm::sys::Process. This is needed to
fix Clang PRs 4148 and 4183.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-11 18:05:52 +00:00
Oscar Fuentes
69b20fd6f9 CMake: Use pthread library when requested and available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-06 20:42:04 +00:00
Oscar Fuentes
d413c01088 CMake: Detects libpthread and sets HAVE_LIBPTHREAD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-06 14:40:37 +00:00
Oscar Fuentes
34fc51710a CMake: Added notes pointing to the LLVM CMake documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68429 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 22:52:02 +00:00
Oscar Fuentes
9a0107db72 CMake: defines and uses macro add_llvm_definitions for keeping track
of compiler parameters explicitly added by the build
specification. This macro replaces the cmake built-in
`add_definitions'.

Detects glibc and defines _GNU_SOURCE accordingly.

Resolves bug 3882.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 22:41:07 +00:00
Douglas Gregor
4752bd3b40 CMake: Build system fixes for XCode. llvm-config still causes us some serious trouble, but it's less serious than it used to be
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 22:53:26 +00:00
Douglas Gregor
af3f5441b5 CMake: Make sure to build TableGen'd files in the binary directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 21:35:18 +00:00
Nick Lewycky
59fad7d933 Remove configurey-fu to autodetect hash_map and hash_set now that they are
no longer used in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 06:16:26 +00:00
Cedric Venet
07b9d69ad1 Add mode_t to the config.h generated by cmake on win32. Used by clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-14 16:13:26 +00:00
Oscar Fuentes
1271b9f071 CMake: Tests PERL availability with PERL_EXECUTABLE variable.
On MSVC 64bits, does not put underscore before the symbol name on the
/INCLUDE linker parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-22 01:20:31 +00:00
Oscar Fuentes
82447ebb41 CMake: replace `rm' with portable invocations of cmake.
Based on a bug report by Yonggang Luo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-07 19:24:44 +00:00
Eli Friedman
56e6d644d0 Fix a link issue I ran into trying compiling LLVM on MinGW with CMake.
Hopefully this doesn't break anyone else's build... it shouldn't unless 
the MinGW variable means something other than compiling with MinGW.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60273 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 02:42:05 +00:00
Oscar Fuentes
beb7a05086 CMake: Do not rebuild the world when tblgen changes but the .inc files
it produces are not affected by the change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 00:18:45 +00:00
Oscar Fuentes
148d245c32 CMake: when building shared libraries, use -fPIC for compiling
partially linked objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-20 03:10:17 +00:00
Oscar Fuentes
4b442836fc CMake: Option for enabling/disabling threads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59565 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-18 23:45:21 +00:00
Oscar Fuentes
808e3a9266 CMake: MSVC: Pass list of components the right way to msvc_llvm_config
and siblings. Support targets whose name does not end on
`CodeGen'. Remove a performance bottleneck.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59383 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-16 04:13:19 +00:00
Oscar Fuentes
7f6f21ebae CMake: Forces linking of the rest of architecture targets and its
respective asm printers on MSVC.

Based on a patch by Scott Graham.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59379 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-15 22:51:03 +00:00
Oscar Fuentes
50925fbed4 CMake: Adds header and TableGen files to Visual Studio solution. A new
dummy library, `llvm_headers_do_not_build', is created for containing
all header and TableGen files under include/llvm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59346 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-15 02:08:08 +00:00
Oscar Fuentes
cccecb8ea2 CMake: Use LLVM_MAIN_SRC_DIR instead of CMAKE_SOURCE_DIR, for
consistency.

Patch by Kevin Andre!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59326 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-14 22:21:02 +00:00
Oscar Fuentes
1bbdd4645b CMake: Fixed dependencies of .cpp source files on .td and tablegenned
files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59325 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-14 22:06:14 +00:00
Oscar Fuentes
3af7fd5038 CMake: Updated library dependency info used for MSVC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59079 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 20:04:40 +00:00
Oscar Fuentes
578f6cf6d0 CMake: Removed unnecessary library path setting that was breaking the
build on OS X.

Fix by Jjgod Jiang!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 16:56:52 +00:00
Oscar Fuentes
0ef3b61c98 CMake: Fixed cross-compiling.
`clean' makefile target removes add-hoc directory created for building
the native tablegen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 22:09:59 +00:00
Oscar Fuentes
41bdedf17a CMake: Builds a native tblgen when cross-compiling and the user didn't
set LLVM_TABLEGEN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58953 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 02:35:55 +00:00
Oscar Fuentes
02516ba8b4 CMake: Non-working code for auto-building the native tblgen util when
cross-compiling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58950 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-10 01:32:14 +00:00
Oscar Fuentes
3ab40ca3d5 CMake: Support for cross-compiling. For now, requires a previously
built native tblgen which is passed to cmake in the variable
LLVM_TABLEGEN.

See

http://www.cmake.org/Wiki/CmakeMingw

for a quick example on how to cross-compile with CMake.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-09 18:53:19 +00:00
Oscar Fuentes
b0c56992ce CMake: Support for building 32 bit mode libs and binaries on
Linux/x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58677 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-04 03:27:24 +00:00
Oscar Fuentes
4727f83741 CMake: Fix some unwanted commentary line wraps on the last change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58485 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 01:37:26 +00:00
Oscar Fuentes
9b17d97bc5 CMake: Establish dependencies among executables and libraries, using
data manually extracted from llvm-config.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58484 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31 01:24:51 +00:00
Oscar Fuentes
980e842153 CMake: Removed some cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-29 02:33:15 +00:00
Oscar Fuentes
bcc1db5f0a CMake: Support for LLVM_USED_LIBS variable, which is the cmake
counterpart of USED_LIBS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58178 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 00:51:05 +00:00
Oscar Fuentes
579e43a44a CMake: GetTargetTriple: new module for determining the target
triple. Assign to LLVM_HOSTTRIPLE so it figures in config.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58176 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 00:47:52 +00:00
Oscar Fuentes
de98db33fb CMake: MSVC++ no longer uses a special configuration method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25 03:29:36 +00:00
Cedric Venet
389b715e0f Modify the cmake build system so that if it doesn't find bison, it will use the pregenerated file in from the svn (.cvs). Work only for windows for the moment. Tested on Vista64 with MSVC2008express.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58090 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 11:24:33 +00:00
Oscar Fuentes
1dc9716121 CMake: `make install' for libraries, executables and header files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 02:56:07 +00:00
Oscar Fuentes
e1ad087fcb CMake: Builds all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56641 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 04:40:32 +00:00
Oscar Fuentes
cb7053bf7a CMake: Removed unnecessary messages from msvc_llvm_config macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56540 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-24 01:54:03 +00:00
Oscar Fuentes
1d8e4cfdb7 CMake build system: support for parallel builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56453 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 18:21:51 +00:00
Oscar Fuentes
b3334b6cce add_partially_linked_object: Replaced nonexistent MESSAGE option in
add_custom_command with COMMENT. It was forcing unconditional command
execution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56425 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 02:33:43 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00