1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
Commit Graph

219 Commits

Author SHA1 Message Date
Eric Christopher
c31256808e Temporarily revert 185601 as it caused cmake build regressions.
llvm-svn: 185603
2013-07-04 00:51:26 +00:00
Eric Christopher
f92d25bdca Add support for futimens for platforms that don't support futimes.
Patch by pashev.igor.

llvm-svn: 185601
2013-07-04 00:47:09 +00:00
Andy Gibbs
d76c23149b Support using "host" as a target in LLVM_TARGETS_TO_BUILD when using cmake.
llvm-svn: 184923
2013-06-26 07:57:53 +00:00
Rafael Espindola
0ff7ea94a2 Don't define LTDL_SHLIBPATH_VAR.
llvm-svn: 183771
2013-06-11 19:04:13 +00:00
Ulrich Weigand
0d393e5693 [SystemZ] Add configure bits
This patch wires up the SystemZ target in configure, so that it can now be
built using --enable-targets=systemz.   It is not yet included in the default
build (--enable-targets=all); this will be done by a follow-up patch.

Patch by Richard Sandiford.

llvm-svn: 181208
2013-05-06 16:22:34 +00:00
Tim Northover
33a7a57446 Build system changes to enable MCJIT on AArch64
These changes just allow AArch64 to take part in the MCJIT world when
built correctly.

llvm-svn: 181130
2013-05-04 20:13:52 +00:00
Tim Northover
f5d9c9ba13 Allow host triple to be correctly overridden in CMake builds
The intended semantics mirror autoconf, where the user is able to
specify a host triple, but if it's left to the build system then
"config.guess" is invoked for the default.

This also renames the LLVM_HOSTTRIPLE define to LLVM_HOST_TRIPLE to
fit in with the style of the surrounding defines.

llvm-svn: 181112
2013-05-04 07:36:23 +00:00
Benjamin Kramer
3d4ed151f8 CMake: cxxabi.h is only available to C++ compilers, use the right check macro.
llvm-svn: 181019
2013-05-03 14:48:29 +00:00
Joerg Sonnenberger
3486008857 Only use cxxabi.h's demangler, if it is actually available.
llvm-svn: 180684
2013-04-27 22:12:32 +00:00
Alexey Samsonov
cb820bd0a4 Use zlib to uncompress debug sections in DWARF parser.
This makes llvm-dwarfdump and llvm-symbolizer understand
debug info sections compressed by ld.gold linker.

llvm-svn: 180088
2013-04-23 10:17:34 +00:00
Alexey Samsonov
30f0410c39 Add basic zlib support to LLVM. This would allow to use compression/uncompression in selected LLVM tools.
llvm-svn: 180083
2013-04-23 08:28:39 +00:00
Joerg Sonnenberger
d2fdae5765 Refine fenv.h handling: check if the desired macros exist, before using
it. NetBSD/ARM and TILE-Gx are examples for platforms that have an
unusable fenv.h and this avoids the need for a blacklist.

llvm-svn: 177865
2013-03-25 13:13:33 +00:00
Jordan Rose
3f1e87dccf CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.
check_cxx_symbol_exists requires CMake 2.8.6, so even though I
recommended it to Owen it's probably better to stay away for now.
This check is not technically correct because we're checking <math.h>
but then using <cmath> in the actual code, but if we run into problems we
can do the same sort of dance as isinf() and isnan() where we check /both/
headers and then write a wrapper header around them.

llvm-svn: 174773
2013-02-08 23:17:31 +00:00
Owen Anderson
09e506b2be Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.
llvm-svn: 174564
2013-02-07 00:54:05 +00:00
Owen Anderson
4d8f6634c5 Conditionalize constant folding of math intrinsics on the availability of an implementation on the host. This is a little bit unfortunate, but until someone decides to implement a full libm for APFloat, we don't have a better way to get this functionality.
llvm-svn: 174561
2013-02-07 00:21:34 +00:00
Edwin Vane
3e6897f32d Turn off uninitialized-use warnings for gcc in cmake build
Added support to the cmake build to turn off uninitialized use warnings
for gcc. This cleans the build up somewhat.

Used logic simpler than found in autoconf by making use of the fact that
although gcc won't complain about unsupported -Wno-* flags it *will*
complain about unsupported -W flags.

Reviewers: gribozavr, doug.gregor, chandlerc
llvm-svn: 174299
2013-02-04 02:32:44 +00:00
Evgeniy Stepanov
51eee1f016 Annotate BumpPtrAllocator for MemorySanitizer.
This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.

llvm-svn: 174051
2013-01-31 09:58:59 +00:00
Chandler Carruth
ae1954050c Add time getters to the process interface for requesting the elapsed
wall time, user time, and system time since a process started.

For walltime, we currently use TimeValue's interface and a global
initializer to compute a close approximation of total process runtime.

For user time, this adds support for an somewhat more precise timing
mechanism -- clock_gettime with the CLOCK_PROCESS_CPUTIME_ID clock
selected.

For system time, we have to do a full getrusage call to extract the
system time from the OS. This is expensive but unavoidable.

In passing, clean up the implementation of the old APIs and fix some
latent bugs in the Windows code. This might have manifested on Windows
ARM systems or other systems with strange 64-bit integer behavior.

The old API for this both user time and system time simultaneously from
a single getrusage call. While this results in fewer system calls, it
also results in a lower precision user time and if only user time is
desired, it introduces a higher overhead. It may be worthwhile to switch
some of the pass timers to not track system time and directly track user
and wall time. The old API also tracked walltime in a confusing way --
it just set it to the current walltime rather than providing any measure
of wall time since the process started the way buth user and system time
are tracked. The new API is more consistent here.

The plan is to eventually implement these methods for a *child* process
by using the wait3(2) system call to populate an rusage struct
representing the whole subprocess execution. That way, after waiting on
a child process its stats will become accurate and cheap to query.

llvm-svn: 171551
2013-01-04 23:19:55 +00:00
NAKAMURA Takumi
bdad03688b [CMake] Move libxml2 stuff from clang to llvm/cmake.
llvm-svn: 170225
2012-12-14 18:30:20 +00:00
Evgeniy Stepanov
d74d632931 Fix Android build of gtest and lib/Support.
llvm-svn: 163131
2012-09-04 09:14:45 +00:00
Benjamin Kramer
b0f40f5deb PR13689: Check for backtrace(3) in the cmake build.
llvm-svn: 163074
2012-09-01 20:50:18 +00:00
Eric Christopher
48ba96b707 Make sure to build libpthread to check for HAVE_PTHREAD_MUTEX_LOCK.
Patch by Brad Smith!

llvm-svn: 163033
2012-08-31 22:39:14 +00:00
Sebastian Pop
6800067200 enable cross compilation with cmake
This patch allows us to use cmake to specify a cross compiler: target different
than host. In particular, it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE
variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them
available at configure time.

Here is the command line that I have used to test my patches to create a Hexagon
cross compiler hosted on x86:

$ cmake -G Ninja -D LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu ..
$ ninja check

llvm-svn: 162219
2012-08-20 19:56:52 +00:00
Sebastian Pop
e6804b03a8 enable Hexagon target from cmake
The patch adds a missing case for the Hexagon target in cmake/config-ix.cmake.

llvm-svn: 162218
2012-08-20 19:56:49 +00:00
Sebastian Pop
0288550576 revert my previous patch
llvm-svn: 161505
2012-08-08 18:04:45 +00:00
Sebastian Pop
53569c7d36 enable Hexagon target from cmake
This patch allows us to use cmake to specify a cross compiler for Hexagon.

In particular, the patch adds a missing case for the target Hexagon in
cmake/config-ix.cmake, and it moves LLVM_DEFAULT_TARGET_TRIPLE and TARGET_TRIPLE
variables from cmake/config-ix.cmake to the toplevel CMakeLists.txt to make them
available at configure time. Here is the command line that I have used to test
my patches:

$ cmake -G Ninja -D BUILD_SHARED_LIBS:BOOL=ON -D LLVM_TARGETS_TO_BUILD:STRING=Hexagon -D TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_DEFAULT_TARGET_TRIPLE:STRING=hexagon-unknown-linux-gnu -D LLVM_TARGET_ARCH:STRING=hexagon-unknown-linux-gnu -D LLVM_ENABLE_PIC:BOOL=OFF ..
$ ninja check

llvm-svn: 161504
2012-08-08 17:45:43 +00:00
NAKAMURA Takumi
d79a015152 autoconf: Re-introduce LLVM_HOSTTRIPLE since r143500, as rework of PR11060.
cmake: Add LLVM_HOSTTRIPLE. For now, it is same as TARGET_TRIPLE.
llvm-svn: 160609
2012-07-22 03:04:52 +00:00
Daniel Dunbar
c69f7c9234 [build] Add build check for ::arc4random().
llvm-svn: 156236
2012-05-05 16:36:16 +00:00
Ted Kremenek
c3352fa310 Add rudimentary CMake logic for detecting Graphviz.
llvm-svn: 156108
2012-05-03 21:51:05 +00:00
Eric Christopher
1ba37ca43c Add InitializeNativeTargetDisassembler function.
Patch by Ojab.

llvm-svn: 153476
2012-03-26 21:56:56 +00:00
Chandler Carruth
f26c121c21 Undo an over zealous rename. This bit of the CMake build really is
dealing in the host triple, be honest about it and document the decision
to default the target triple to the host triple unless overridden.

llvm-svn: 148822
2012-01-24 18:00:44 +00:00
Sebastian Pop
53d6e3b9d3 revert r147542 after comments from Joerg Sonnenberger
llvm-svn: 147608
2012-01-05 18:28:46 +00:00
Sebastian Pop
4f82b3a13f use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
Get back getHostTriple.

For JIT compilation, use the host triple instead of the default
target: this fixes some JIT testcases that used to fail when the
compiler has been configured as a cross compiler.

llvm-svn: 147542
2012-01-04 19:47:22 +00:00
Ted Kremenek
5c8d254db3 Use 'check_symbol_exists' instead of 'check_function_exists' for finding isatty. This change allows Xcode generated projects to have HAVE_ISATTY to be properly defined.
llvm-svn: 147215
2011-12-23 01:31:45 +00:00
Chandler Carruth
18c74d444a Fix InitializeNativeTargetAsmParser in CMake builds by defining the
appropriate macro. Patch by Alexey Prokhin. Fixes PR11498.

llvm-svn: 146239
2011-12-09 03:31:58 +00:00
Dylan Noblesmith
9751c17d0d rename ENABLE_THREADS to LLVM_ENABLE_THREADS
Now that it needs to be exported in a public header (Valgrind.h)
it should be prefixed to avoid collision with other projects.
Add it to llvm-config.h as well.

This'll require regenerating the configure script after this
commit, but I don't have the required autoconf version.

llvm-svn: 145214
2011-11-28 00:48:58 +00:00
Benjamin Kramer
7120c3ef01 Add configure checking for pread(2) and use it to save a syscall when reading files.
llvm-svn: 145061
2011-11-22 12:31:53 +00:00
Sebastian Pop
69b2b86143 rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE
llvm-svn: 143501
2011-11-01 21:31:44 +00:00
Dan Gohman
892b86e74c Remove the Alpha backend.
llvm-svn: 143164
2011-10-27 22:56:32 +00:00
Eric Christopher
9f7d25652d Rename LLVM_MULTITHREADED define and fix build without threads.
Patch by Arrowdodger.

llvm-svn: 140064
2011-09-19 20:43:23 +00:00
NAKAMURA Takumi
4836113d85 CMake: Eliminate unused checks and #undef(s) as below;
STACK_DIRECTION
YYTEXT_POINTER
HAVE_NAMESPACES
HAVE_STD_ITERATOR
HAVE_FWD_ITERATOR
HAVE_BI_ITERATOR
HAVE_GLOBAL_HASH_MAP
HAVE_GLOBAL_HASH_SET
HAVE_GNU_EXT_HASH_MAP
HAVE_GNU_EXT_HASH_SET
HAVE_STD_EXT_HASH_MAP
HAVE_STD_EXT_HASH_SET

llvm-svn: 137423
2011-08-12 03:27:48 +00:00
Evan Cheng
7b4cb12a95 Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.

llvm-svn: 135812
2011-07-22 21:58:54 +00:00
Evan Cheng
bfc0cac54d Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.

llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Evan Cheng
9e8f90a020 Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
llvm-svn: 135219
2011-07-14 23:50:31 +00:00
Dylan Noblesmith
4a1d03f633 remove CMake mode_t define
It's now replaced with a simple ifdef _MSC_VER in the one
place it's needed (clang's FileManager.h header).

llvm-svn: 133711
2011-06-23 12:21:33 +00:00
NAKAMURA Takumi
3788ada5db Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.

llvm-svn: 130657
2011-05-01 13:29:49 +00:00
Oscar Fuentes
a261616b38 Handle changing of LLVM_ENABLE_FFI.
If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it
off, the build will fail in lib/ExecutionEngine/Interpreter because
Interpreter will try still to #include <ffi/ffi.h>, but there are no
include_directories(${FFI_INCLUDE_DIR}) now.

This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if
LLVM_ENABLE_FFI=0. This forces CMake to update config.h.

Patch by arrowdodger!

llvm-svn: 128769
2011-04-02 13:21:12 +00:00
Oscar Fuentes
69c955a67e Supports building with a list of targets that does not contain
X86. Fixes PR9533.

llvm-svn: 128154
2011-03-23 17:42:13 +00:00
Tobias Grosser
7cb4ec5d69 cmake: Add xdot.py support as it already exists in autoconf.
llvm-svn: 126563
2011-02-27 04:11:05 +00:00
NAKAMURA Takumi
55dd89bf51 lib/Support/Errno.cpp: Check strerror_s() with HAVE_DECL_STRERROR_S in config.h.*.
AC_CHECK_FUNCS seeks a symbol only in libs. We should check the declaration in string.h.

FIXME: I have never seen mingw(s) have strerror_s() (not _strerror_s()).
FIXME: Autoconf/CMake may seek strerror_s() with the definition MINGW_HAS_SECURE_API in future.
llvm-svn: 125172
2011-02-09 04:18:48 +00:00
NAKAMURA Takumi
aa8b506820 Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.

llvm-svn: 124950
2011-02-05 15:11:53 +00:00
Oscar Fuentes
11c6d879cd LLVM_ON_WIN32 is not defined on config-ix.cmake. Use something else.
llvm-svn: 124857
2011-02-04 05:40:04 +00:00
Oscar Fuentes
51a072b7d8 Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

llvm-svn: 124816
2011-02-03 20:57:36 +00:00
Oscar Fuentes
c0fc5216b4 Platform tests for sys/uio.h' header and writev' function.
This is the cmake equivalent for r124769.

llvm-svn: 124775
2011-02-03 04:23:07 +00:00
Oscar Fuentes
d79df5b7c8 Adds some platform checks to cmake/config-ix.cmake and fixes checking
for dlopen/dlerror.

Patch by arrowdodger!

llvm-svn: 124590
2011-01-31 18:25:25 +00:00
Oscar Fuentes
da69ba084d Handles libffi on the CMake build.
Patch by arrowdodger!

llvm-svn: 123976
2011-01-21 15:42:54 +00:00
Oscar Fuentes
512d8eb82a Add some platform checks. Also fix a typo on a Makefile.
Patch by arrowdodger!

llvm-svn: 123659
2011-01-17 16:35:14 +00:00
Oscar Fuentes
c9265ce51e Make config.h.cmake similar to config.h.in
Patch by arrowdodger!

llvm-svn: 123539
2011-01-15 13:35:37 +00:00
Oscar Fuentes
9618cded65 Add some platform tests.
Patch by arrowdodger!

llvm-svn: 123388
2011-01-13 19:17:28 +00:00
Oscar Fuentes
f975a7423b Platform tests for argz_* functions.
Patch by arrowdodger!

llvm-svn: 123376
2011-01-13 15:06:32 +00:00
Oscar Fuentes
82cc1fb69c Add to the CMake build some options and platform tests supported by
the traditional build.

Patch by arrowdodger!

llvm-svn: 123233
2011-01-11 12:31:54 +00:00
Oscar Fuentes
184f5d0911 Rewrite handling of LLVM_ENABLE_PIC. It was being processed after
config.h was generated, so it had no effect on it.

Thanks to arrowdodger for pointing out this and a tentative patch.

llvm-svn: 123119
2011-01-09 14:34:39 +00:00
Michael J. Spencer
ce950c50c4 Support/FileSystem: Fix MinGW build. It doesn't have _chsize_s.
llvm-svn: 120826
2010-12-03 18:48:56 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Michael J. Spencer
8daaefa006 Endian: Get rid of LLVM_IS_HOST_BIG_ENDIAN.
llvm-svn: 117124
2010-10-22 18:45:12 +00:00
Michael J. Spencer
93269f7395 Rename LLVM_IS_TARGET_BIG_ENDIAN to LLVM_IS_HOST_BIG_ENDIAN to reflect what it actually means.
llvm-svn: 117092
2010-10-22 08:47:28 +00:00
Michael J. Spencer
b9734a5b12 Support: Add Endian.h
llvm-svn: 117057
2010-10-21 20:28:21 +00:00
Chris Lattner
c9709f154d Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116190
2010-10-11 05:44:40 +00:00
Michael J. Spencer
303f42d7e6 CMake: Fix warning in gtest.
llvm-svn: 115935
2010-10-07 18:12:54 +00:00
Michael J. Spencer
7160458b8e Fix whitespace.
llvm-svn: 114724
2010-09-24 09:00:56 +00:00
Oscar Fuentes
2a81c4abe0 cmake: test for the presence of fenv.h
llvm-svn: 114205
2010-09-17 20:30:48 +00:00
Oscar Fuentes
b2a1074fdf Fix cmake build without native target selected.
The cmake (+ MSVC) build is broken if you don't select your native
target.

e.g. 'cmake -D LLVM_TARGETS_TO_BUILD="MyNonNativeTarget" .'

This is because cmake currently sets the LLVM_NATIVE_* definitions
regardless of whether the native target is selected (causing build
errors).

Patch by Mike Gist!

llvm-svn: 112946
2010-09-03 02:22:23 +00:00
Eric Christopher
da5541e56d Fix LLVM target initialization to deal with sociopathic outside projects
that like to randomly define things like "X86", regenerate autoconf bits
and update cmake.

Fixes PR7852.

Patch by Xerxes Rånby!

llvm-svn: 112499
2010-08-30 18:34:48 +00:00
Oscar Fuentes
38ae8f5381 CMake: set configure macro LLVM_PREFIX
llvm-svn: 110536
2010-08-08 04:32:21 +00:00
Oscar Fuentes
8a58d72172 CMake: configure header llvm-config.h
This is the cmake equivalent of r110532, which fixed bug #7809.

llvm-svn: 110535
2010-08-08 04:17:18 +00:00
Daniel Dunbar
3dd4738933 build: Add LLVM_NATIVE_ARCHNAME, which has the sensible value, without "Target"
appended.

llvm-svn: 110109
2010-08-03 14:26:17 +00:00
Nick Lewycky
4d160cb75c Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also,
Haiku like Linux provides <regex.h>, so use it. Patch by Paul Davey!

llvm-svn: 106620
2010-06-23 06:48:34 +00:00
Jeffrey Yasskin
f468a14fb1 Tell Valgrind when we modify already-executed machine code so it knows
to re-instrument the code.  We depend on the system valgrind.h to
avoid adding a new license.

llvm-svn: 98529
2010-03-15 04:57:55 +00:00
Oscar Fuentes
27c9bbc709 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

llvm-svn: 86954
2009-11-12 05:36:09 +00:00
Oscar Fuentes
555721d2c2 CMake: Remove unnecessary `unset' which was not supported by old cmake
releases.

llvm-svn: 86644
2009-11-10 01:45:05 +00:00
Oscar Fuentes
b05535f7c5 CMake: Detect gv, circo, twopi, neato, fdo, dot and dotty.
Patch by Arnaud Allard de Grandmaison!

llvm-svn: 86547
2009-11-09 15:26:40 +00:00
Daniel Dunbar
8e90c79da7 Fix CMake reporting of target triple.
llvm-svn: 86419
2009-11-07 23:52:27 +00:00
Daniel Dunbar
656c9bf461 Stop running get_target_triple more than we need to.
llvm-svn: 86418
2009-11-07 23:52:20 +00:00
Oscar Fuentes
a0309933c6 CMake: Detect dotty.
Patch by Arnaud Allard de Grandmaison!

llvm-svn: 86153
2009-11-05 19:03:26 +00:00
Oscar Fuentes
5866071c1e CMake: do not test for pthread and dl libraries on Windows (except
Cygwin). Fixes PR 5368.

llvm-svn: 86152
2009-11-05 18:57:56 +00:00
Benjamin Kramer
0613c84aba Teach cmake that mk[sd]temp is defined in stdlib.h on some systems.
This fixes parallel build with clang on glibc platforms.

llvm-svn: 85414
2009-10-28 18:37:31 +00:00
Chandler Carruth
766362c707 Move DataTypes.h to include/llvm/System, update all users. This breaks the last
direct inclusion edge from System to Support.

llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Edward O'Callaghan
af49208035 Fix LLVM CMake build system so that it may now work on Solaris and AuroraUX.
llvm-svn: 83819
2009-10-12 04:00:11 +00:00
Edward O'Callaghan
322db411d4 CMake misses a check for sbrk on NetBSD.
llvm-svn: 83341
2009-10-05 23:05:32 +00:00
Douglas Gregor
a3fb17c280 Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo
llvm-svn: 83203
2009-10-01 17:25:36 +00:00
Jeffrey Yasskin
ae5a12200c 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.

llvm-svn: 82797
2009-09-25 21:07:20 +00:00
Oscar Fuentes
8edea46b44 CMake: New user-settable variable LLVM_TARGET_ARCH useful when
cross-compiling.

Patch by Xerxes Rånby!

llvm-svn: 81722
2009-09-13 22:18:38 +00:00
Gabor Greif
6cd12a9f7f re-apply r80197, now that iterator.h is not mentioned any more
llvm-svn: 80254
2009-08-27 17:07:35 +00:00
Bill Wendling
5f74a3e3b9 --- 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.

llvm-svn: 80197
2009-08-27 03:29:26 +00:00
Douglas Gregor
9382a11722 De-bork CMake build
llvm-svn: 80161
2009-08-26 22:12:02 +00:00
Oscar Fuentes
6bfb6249e6 Ignore -fPIC test on Windows. Suggested by Yonggang Luo.
llvm-svn: 80111
2009-08-26 17:05:06 +00:00
Daniel Dunbar
f965f98687 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)

llvm-svn: 79881
2009-08-24 02:14:39 +00:00
Douglas Gregor
ea200f4d3a CMake configuration: find mkdtemp, mkstemp, mktemp.
llvm-svn: 77219
2009-07-27 18:23:41 +00:00
Dan Gohman
62c8b40b66 Remove the IA-64 backend.
llvm-svn: 76920
2009-07-24 00:30:09 +00:00
Xerxes Ranby
d90b36055d Implement cmake LLVM_MULTITHREADED gcc atomic builtin checks.
llvm-svn: 76221
2009-07-17 19:22:41 +00:00
Jeffrey Yasskin
29ea777c1e 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.

llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Douglas Gregor
b861ff2cf3 Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby
llvm-svn: 74426
2009-06-29 16:25:22 +00:00
Douglas Gregor
bc78f97569 CMake: add configure checks for pthread_rwlock_init and pthread_getspecific
llvm-svn: 74284
2009-06-26 14:35:43 +00:00
Douglas Gregor
f3f924bfb6 Define LLVM_NATIVE_ARCH in CMake, so that lli can actually JIT
llvm-svn: 73616
2009-06-17 17:01:56 +00:00
Douglas Gregor
472479c173 More portability checks for CMake's config.h.
llvm-svn: 72975
2009-06-05 23:46:34 +00:00
Douglas Gregor
8de3150a4d Properly detect malloc_zone_statistics in CMake build system
llvm-svn: 72873
2009-06-04 17:22:52 +00:00
Oscar Fuentes
2468ff90c0 CMake: Use libdl only when available. Fixes build on FreeBSD.
llvm-svn: 72311
2009-05-23 02:37:24 +00:00
Douglas Gregor
1ad25cdc99 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.

llvm-svn: 72018
2009-05-18 17:21:34 +00:00
Douglas Gregor
26745696ef Add terminal width detection to llvm::sys::Process. This is needed to
fix Clang PRs 4148 and 4183.

llvm-svn: 71448
2009-05-11 18:05:52 +00:00
Oscar Fuentes
bf169af79a CMake: Detects libpthread and sets HAVE_LIBPTHREAD.
llvm-svn: 71084
2009-05-06 14:40:37 +00:00
Oscar Fuentes
2da28965f6 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.

llvm-svn: 68428
2009-04-04 22:41:07 +00:00
Nick Lewycky
1a4b5fd173 Remove configurey-fu to autodetect hash_map and hash_set now that they are
no longer used in LLVM.

llvm-svn: 66406
2009-03-09 06:16:26 +00:00
Cedric Venet
243a1d9a39 Add mode_t to the config.h generated by cmake on win32. Used by clang.
llvm-svn: 64555
2009-02-14 16:13:26 +00:00
Oscar Fuentes
049ffc2c59 CMake: when building shared libraries, use -fPIC for compiling
partially linked objects.

llvm-svn: 59699
2008-11-20 03:10:17 +00:00
Oscar Fuentes
5373c4c527 CMake: Option for enabling/disabling threads.
llvm-svn: 59565
2008-11-18 23:45:21 +00:00
Oscar Fuentes
c2a8e16a50 CMake: Removed some cruft.
llvm-svn: 58358
2008-10-29 02:33:15 +00:00
Oscar Fuentes
a96ce230e0 CMake: GetTargetTriple: new module for determining the target
triple. Assign to LLVM_HOSTTRIPLE so it figures in config.h.

llvm-svn: 58176
2008-10-26 00:47:52 +00:00
Oscar Fuentes
edaf4cded2 CMake: MSVC++ no longer uses a special configuration method.
llvm-svn: 58132
2008-10-25 03:29:36 +00:00
Oscar Fuentes
0f25988689 Initial support for the CMake build system.
llvm-svn: 56419
2008-09-22 01:08:49 +00:00